You are here: Re: Cannot connect to postgresql « PHP Programming Language « IT news, forums, messages
Re: Cannot connect to postgresql

Posted by charles.leviton on 10/21/49 11:56

Thanks. I was planning on doing that as well. But since my script to
just connect to the database itself was not working I thought I might
get any php problems out of the way before seeing if it was phpBB
related.


Jerry Stuckle wrote:
> charles.leviton@gmail.com wrote:
> > Hi all,
> > I am running on Win XP. I have installed Apache 2.2. Works fine.
> > I have installed php-4.4.4-Win32 manually.
> > Apache to php connection is working fine, I tested a couple of trivial
> > php scripts.
> >
> > I have installed PostGreSQL v8. I can do stuff (create table, populate
> > data) thru pgAdminIII tool, so I think that is also fine.
> >
> > I want to install phpBB. When I try to do the set up I get message
> > "The PHP configuration on your server doesn't support the database type
> > that you chose"
> >
> > So it tells me the issue is with php and PGSQL, hence my question here.
> >
> > I have modified php.ini to uncomment the line
> > extension=php_pgsql.dll
> > and restarted the server. No good.
> >
> > I tried running this script that I copied from a site
> > <html>
> > <head>
> > <title>PHP Test</title>
> > </head>
> > <body>
> > <?php echo '<p>Hello World</p>'; ?>
> > <?php $conn = pg_connect("host=localhost port=5432 dbname=postgres
> > user=postgres password=mypasswd");
> > $sql = "SELECT current_date AS today;";
> > $result = pg_query($conn, $sql);
> > $row = pg_fetch_object($result, 0);
> > echo "Today is: " .$row->today;
> > ?>
> > <?php phpinfo(); ?>
> > </body>
> > </html>
> >
> >
> > It prints out the Hello World line. Doesn't print the phpinfo. Nor
> > the current date.
> >
> > Needless to say, I know no php, just want to get the bulletin board up
> > and running on my PC.
> >
> > Could anyone tell me
> > a) If I still need some set-up? I see in many places that I should
> > compile the php source with some options to enable postgreSQL. I
> > really don't want to have to do this if I can avoid it
> > b) Anything wrong with my postgre setup? I have started the postgresql
> > as a service from the control panel.
> > c) Anything wrong with the little script above?
> >
> > Thanks
> >
>
> Since your objective is to get phpBB running, did you ask in the phpBB
> support forum?
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация