phpinfo() doesn"t show postgres as a configured module

phpinfo() doesn"t show postgres as a configured module

am 11.04.2009 02:27:38 von my extraidentity

--_eedd1c34-6a88-45af-98c0-67d47d9a2bda_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable



When I run the PHP function phpinfo() on my server that has both Apache=
and PHP on it=2C it doesn't show postgres as a configured module. I am ru=
nning Apache version 2.0.54 and PHP version 5.2.8 (however the phpinfo() fu=
nction displays that it is version 5.0.4 =3B what is up with that???)

=20

What command do I need to run to get the postgres module to work with P=
HP? I have tried to configure the server this way and it didn't seem to fi=
x it:

=20

./configure --with-pgsql=3D/usr/local/pgsql/ --with-apxs2=3D/usr/local/=
apache2/bin/apxs

make

=20

Any ideas what I am doing wrong?

=20

-Mark


____________________________________________________________ _____
Windows Live=99: Keep your life in sync.
http://windowslive.com/explore?ocid=3DTXT_TAGLM_WL_allup_1a_ explore_042009=

--_eedd1c34-6a88-45af-98c0-67d47d9a2bda_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable







When I run the PHP function phpinfo() on my server that has both Ap=
ache and PHP on it=2C it
doesn't show postgres as a configured mod=
ule. =3B I am running Apache version 2.0.54 and PHP
version 5.=
2.8 (however the phpinfo() function displays that it is version 5.0.4 =3B w=
hat is up
with that???)



What command do I need to run to get the postgres module to work wi=
th PHP? =3B I have tried to
configure the server this way and =
it didn't seem to fix it:




./configure --with-pgsql=3D/usr/local/pgsql/ --with-apxs2=3D/usr/lo=
cal/apache2/bin/apxs


make



Any ideas what I am doing wrong?



-Mark



Windows Live=99: Keep your life in sync. owslive.com/explore?ocid=3DTXT_TAGLM_WL_allup_1a_explore_042 009' target=3D'=
_new'>Check it out.

=

--_eedd1c34-6a88-45af-98c0-67d47d9a2bda_--

Re: phpinfo() doesn"t show postgres as a configured module

am 11.04.2009 02:37:00 von Andrew McMillan

On Fri, 2009-04-10 at 19:27 -0500, my extraidentity wrote:
> When I run the PHP function phpinfo() on my server that has
> both Apache and PHP on it, it doesn't show postgres as a
> configured module. I am running Apache version 2.0.54 and PHP
> version 5.2.8 (however the phpinfo() function displays that it
> is version 5.0.4 ; what is up with that???)
>
> What command do I need to run to get the postgres module to
> work with PHP? I have tried to configure the server this way
> and it didn't seem to fix it:
>
> ./configure --with-pgsql=/usr/local/pgsql/
> --with-apxs2=/usr/local/apache2/bin/apxs
> make
>
> Any ideas what I am doing wrong?

You need to enable it in your php.ini file as an extension, like:

extension=pgsql.so

Cheers,
Andrew.

------------------------------------------------------------ ------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Be cheerful while you are alive.
-- Phathotep, 24th Century B.C.

------------------------------------------------------------ ------------



--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php

Re: phpinfo() doesn"t show postgres as a configured module

am 11.04.2009 02:55:36 von Steve Crawford

my extraidentity wrote:
>
> When I run the PHP function phpinfo() on my server that has both
> Apache and PHP on it, it doesn't show postgres as a configured
> module. I am running Apache version 2.0.54 and PHP version 5.2.8
> (however the phpinfo() function displays that it is version 5.0.4
> ; what is up with that???)
>
> What command do I need to run to get the postgres module to work
> with PHP? I have tried to configure the server this way and it
> didn't seem to fix it:
>
> ./configure --with-pgsql=/usr/local/pgsql/
> --with-apxs2=/usr/local/apache2/bin/apxs
> make
>
> Any ideas what I am doing wrong?
>
Multiple things, possibly. What OS and how did you install PHP and PG?

I'll venture a guess that you somehow installed PHP and/or PG with
whatever system installer your disro uses (yum? apt?...) and it ended up
wherever that distro specifies. Then you compiled some stuff from source
and it ended up in the "normal" locations defined by the source/makefile
defaults and you have ended up with two or more versions (5.0.4/5.2.8)
of PHP. You could even end up with Apache seeing one version and PHP
command-line seeing a different one. Once you sort that out, be sure to
enable PG in php.ini.

Cheers,
Steve

--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php

Re: phpinfo() doesn"t show postgres as a configured module

am 11.04.2009 04:01:59 von Bob McConnell

Steve Crawford wrote:
> my extraidentity wrote:
>>
>> When I run the PHP function phpinfo() on my server that has both
>> Apache and PHP on it, it doesn't show postgres as a configured
>> module. I am running Apache version 2.0.54 and PHP version 5.2.8
>> (however the phpinfo() function displays that it is version 5.0.4
>> ; what is up with that???)
>>
>> What command do I need to run to get the postgres module to work
>> with PHP? I have tried to configure the server this way and it
>> didn't seem to fix it:
>>
>> ./configure --with-pgsql=/usr/local/pgsql/
>> --with-apxs2=/usr/local/apache2/bin/apxs
>> make
>>
>> Any ideas what I am doing wrong?
>>
> Multiple things, possibly. What OS and how did you install PHP and PG?
>
> I'll venture a guess that you somehow installed PHP and/or PG with
> whatever system installer your disro uses (yum? apt?...) and it ended up
> wherever that distro specifies. Then you compiled some stuff from source
> and it ended up in the "normal" locations defined by the source/makefile
> defaults and you have ended up with two or more versions (5.0.4/5.2.8)
> of PHP. You could even end up with Apache seeing one version and PHP
> command-line seeing a different one. Once you sort that out, be sure to
> enable PG in php.ini.
>
> Cheers,
> Steve

If phpinfo() doesn't show the Postgres options, it was compiled without
them. That's the same problem I have with Slackware. The packaged
version of PHP only includes the MySQL addictionware. No matter what I
do, I can't get it configured my way. So I don't install those packages,
but get the source for Apache, PHP and Postgres. That's the only way I
can make sure they get compiled and installed with my choice of options,
not those of someone with a hidden agenda trying to promote an inferior
product.

Bob McConnell
N2SPP


--
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php

Re: phpinfo() doesn"t show postgres as a configured module

am 17.04.2009 00:55:51 von Brian Fehrle

I had this exact same problem too, and a friend and I just got it=20
working. I'll show what we did.
I am running Sabayon Linux 4.1 (built on Gentoo)
PHP 5.2.8-r2
Apache 2.2.11
postgresql-server 8.3.5

Obviously it will depend on your configuration/distro/whatnot how you=20
can change it, but for me, this is how I fixed it. I'm very new to the=20
Linux world so I hope I phrase all this correctly.

First I edited my make file.
# nano /etc/make.conf
In there is a line:
USE=3D"stuffystuff"
At the very end I added "postgres" (minus the quotes) to the line, right=20
before the last quote. (the line was broken up into multiple lines. Each=20
line, except for the last, ends with \, be sure to not change any of that=
..)
Saved the file.

Then I emerged php and told it to use the make file.
# emerge -N dev-lang/php
This recompiled my php, took a little while.

When that was done, I restarted the apache server.
# /etc/init.d/apache2 restart

When it restarted, I ran my php file with phpinfo(); on it and there was=20
a new entry for pgsql listed.

I hope this was of some help, I'm sure if you provide some information=20
on your installation, someone can help do the same thing on your end.

Good Luck,
Brian

my extraidentity wrote:
>
> When I run the PHP function phpinfo() on my server that has both
> Apache and PHP on it, it doesn't show postgres as a configured
> module. I am running Apache version 2.0.54 and PHP version 5.2.8
> (however the phpinfo() function displays that it is version 5.0.4
> ; what is up with that???)
>
> What command do I need to run to get the postgres module to work
> with PHP? I have tried to configure the server this way and it
> didn't seem to fix it:
>
> ./configure --with-pgsql=3D/usr/local/pgsql/
> --with-apxs2=3D/usr/local/apache2/bin/apxs
> make
>
> Any ideas what I am doing wrong?
>
> -Mark=20
>
>
> ------------------------------------------------------------ -----------=
-
> Windows Live=99: Keep your life in sync. Check it out.=20
> 2009>

--=20
Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php