pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Parang Saraf <parang.saraf@gmail.com>
To: pgsql-php@postgresql.org
Subject: problem enabling postgres in php
Date: Wed, 21 Jun 2006 01:26:10 -0400
Message-ID: <46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com> (raw)

hello,

I am working with Postgresql 8.1.3, Apache 2.0.58 and PHP 5.1.4. on windows
2k.

My phpinfo is working fine. But I am not able to enable postgres support.
According to phpinfo the configuration file (php.ini) path is "C:\WINNT".
All my extensions are in the  "C:\php\ext"  dir. I modified the php.ini file
situated in the C:\WINNT dir as follows :

extension_dir = "C:\php\ext  and also removed the ';' (semicolon) infront of
the extension=php_pgsql.dll  with all the other extension being blocked by
semicolon. Then I restarted the comp but it is not reflecting the changes in
the phpinfo.

Under the "php configuration core" phpinfo is showing the extension_dir as
C:\php5 and include_path as ".;C:\php5\pear". But i dont have any directory
named php5. So, i created a directory named php5 in C:\ and copied all the
extension dlls into it and made a folder named pear in it and copied the
php.ini file in it. But it still didnt reflect any changes.

I doubt that it is not reading the php,ini file from the "C:\WINNT"
directory. To check that I tried changing the color code of  "
highlight.string" from DD0000 to FF9900. I again restarted the comp but
still it didnt reflect this change too. So, i think that it is using some
other php.ini file. So, i searched for the php.ini file and i found it in
the following locations :

C:\WINNT\
C:\php5\

So, i made the same changes everywhere including the "php.ini-dist" and "
php.ini-recommended" files found in C:\php dir. But still the problem
persisted. Then I removed the php.ini file from the "C:\WINNT" dir but the
phpinfo still worked even without it being present in the dir.

I also tried reinstalling php several times but that also didnt help. But
what I found strange was that i was not able to remove the "php5ts.dll"
from the C:\WINNT dir and "php5apache2.dll" from the C:\php dir. Everytime
it gave an error that these files are in use. I dont have any information
about these files.

Do i have to modify the "System Path variable" ?? I also tried modifying
that too by adding C:\php and C:\php5 in it. I also added one more system
variable PHPRC with the value C:\WINNT.

But still i am not able to enable the postgres with php. I think there is no
compatibility issues as google search gives some phpinfo links that works
with the same version of php and postgres. When i try to connect to the
database it gives the error "Call to undefined function pg_connect()" which
i think is obvious as phpinfo is not showing postgres in it.

It would be a great help if you could figure out the error and can help me
enabling the postgres in php. I have been trying for the past 3 days to
enable it.

Thanks a lot for spending your valuable time.

Regards
Parang Saraf
parang.saraf@gmail.com

view thread (4+ messages)  latest in thread

Message-ID: <46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com>
Permalink:  ../46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com/
Also on:    postgresql.org/message-id/46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: parang.saraf@gmail.com
  Subject: Re: problem enabling postgres in php
  In-Reply-To: <46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com>
  References: <46ed1b650606202226o5458f380m98ea5e81c03a2587@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox