problem enabling postgres in php

problem enabling postgres in php

am 21.06.2006 07:26:10 von Parang Saraf

------=_Part_115493_30191704.1150867570739
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

------=_Part_115493_30191704.1150867570739
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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





------=_Part_115493_30191704.1150867570739--

Re: problem enabling postgres in php

am 21.06.2006 15:57:15 von Jason Minion

When you run phpinfo, one of the values it shows on the screen will be
the location of the php.ini file that it is using. Also, some people
have found that they need to add a trailing slash to the extension dir,
mine is:
=20
extension_dir =3D "c:/php/ext/"

Jason Minion
jason.minion@sigler.com

________________________________

From: pgsql-php-owner@postgresql.org
[mailto:pgsql-php-owner@postgresql.org] On Behalf Of Parang Saraf
Sent: Wednesday, June 21, 2006 12:26 AM
To: pgsql-php@postgresql.org
Subject: [PHP] problem enabling postgres in php


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 :=20

extension_dir =3D "C:\php\ext and also removed the ';' (semicolon)
infront of the extension=3Dphp_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.=20

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.=20

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 :=20

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.=20

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.=20

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.=20

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.=20

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.=20

Thanks a lot for spending your valuable time.

Regards
Parang Saraf
parang.saraf@gmail.com


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: problem enabling postgres in php

am 22.06.2006 20:19:45 von operationsengineer1

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

feel free to peruse these instructions:

http://www.geocities.com/operationsengineer1/

i'd focus on the pgsql instructions - since that seems
to be where the issue lies.

good luck.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around=20
http://mail.yahoo.com=20

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: problem enabling postgres in php

am 22.06.2006 20:33:35 von Tobias Boes

copy the php_pgsql.dll to the bin folder of your apache. That might work.
Ensure that the right php.ini gets allocated.

regards

Tobias
----- Original Message -----
From: "Jason Minion"
To: "Parang Saraf" ;
Sent: Wednesday, June 21, 2006 3:57 PM
Subject: Re: [PHP] problem enabling postgres in php


When you run phpinfo, one of the values it shows on the screen will be
the location of the php.ini file that it is using. Also, some people
have found that they need to add a trailing slash to the extension dir,
mine is:

extension_dir = "c:/php/ext/"

Jason Minion
jason.minion@sigler.com

________________________________

From: pgsql-php-owner@postgresql.org
[mailto:pgsql-php-owner@postgresql.org] On Behalf Of Parang Saraf
Sent: Wednesday, June 21, 2006 12:26 AM
To: pgsql-php@postgresql.org
Subject: [PHP] problem enabling postgres in php


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


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend