pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedCan't Get PHP Going on PostgreSQL
6+ messages / 5 participants
[nested] [flat]
* Can't Get PHP Going on PostgreSQL
@ 2005-03-10 21:08 Van Ingen, Lane <lvaningen@ESNCC.com>
2005-03-10 21:17 ` Re: Can't Get PHP Going on PostgreSQL Thom Dyson <TDyson@sybex.com>
2005-03-10 21:29 ` Re: Can't Get PHP Going on PostgreSQL Gavin M. Roy <gmr@ehpg.net>
2005-03-11 02:00 ` Re: Can't Get PHP Going on PostgreSQL Robby Russell <robby@planetargon.com>
0 siblings, 3 replies; 6+ messages in thread
From: Van Ingen, Lane @ 2005-03-10 21:08 UTC (permalink / raw)
To: pgsql-php
I am new to both PHP and PostgreSQL. Trying to install PHP and PostgreSQL 8.0 on Slackware Linux 10.0.0 .
I am getting the following error out of Apache:
"Fatal Error: Call to undefined function: pg_connect() ...."
PostgreSQL is up and running, and appears to be fine.
Have found a lot of web references to this; the best was http://us2.php.net/pgsql . But am unable
to proceed because I am not sure what to do.
Facts about what I have installed:
- Installed PHP from Slackware binary; I made no special efforts to compile it. According to a PHP utility
function (phpinfo()), looks like it might be configured for MySQL already.
- version info:
PHP = 4.3.7
Linux kernel = 2.4.26
Apache = 1.3.31
How do I find these functions and install OR configure the php.ini file?
I don't think this is hard to fix, but it is beating me up right now. What I need to find a blow-by-blow of
what to do. Can somebody help me?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Can't Get PHP Going on PostgreSQL
2005-03-10 21:08 Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
@ 2005-03-10 21:17 ` Thom Dyson <TDyson@sybex.com>
2 siblings, 0 replies; 6+ messages in thread
From: Thom Dyson @ 2005-03-10 21:17 UTC (permalink / raw)
To: pgsql-php
Your php install doesn't know about (or can't find) the postgresql
extension. Default installs don't usually include postgresql support I
think.
run this command
ldd /usr/local/apache/libexec/libphp4.so
where the second parameter is the location of your php module for apache.
This will list the shared object files that php needs. If you don't see a
line like this
libpq.so.3 => /usr/lib/libpq.so.3 (0x4001b000)
then php was not compiled to include postgresql.
Thom Dyson
Director of Information Services
Sybex, Inc.
pgsql-php-owner@postgresql.org wrote on 03/10/2005 01:08:47 PM:
> I am new to both PHP and PostgreSQL. Trying to install PHP and
> PostgreSQL 8.0 on Slackware Linux 10.0.0 .
> I am getting the following error out of Apache:
> "Fatal Error: Call to undefined function: pg_connect() ...."
> PostgreSQL is up and running, and appears to be fine.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Can't Get PHP Going on PostgreSQL
2005-03-10 21:08 Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
@ 2005-03-10 21:29 ` Gavin M. Roy <gmr@ehpg.net>
2 siblings, 0 replies; 6+ messages in thread
From: Gavin M. Roy @ 2005-03-10 21:29 UTC (permalink / raw)
To: Van Ingen, Lane <lvaningen@esncc.com>; +Cc: pgsql-php
PgSQL support isn't compiled into that. You can make a script like
<?php phpinfo(); ?> to output what support is compiled in. Your best
bet will to be to download the php source and compile it in yourself,
unless there is a pgsql module laying around. I switched from slack a
few years back so I'm not sure what they're doing with the php package
these days. If you decide to compile it from source, just do
a ./configure --with-pgsql (and other options you want/need) and
--with-apxs and that should get you what you need.
Good luck :)
Gavin
On Thu, 2005-03-10 at 16:08 -0500, Van Ingen, Lane wrote:
> I am new to both PHP and PostgreSQL. Trying to install PHP and PostgreSQL 8.0 on Slackware Linux 10.0.0 .
> I am getting the following error out of Apache:
> "Fatal Error: Call to undefined function: pg_connect() ...."
>
> PostgreSQL is up and running, and appears to be fine.
>
> Have found a lot of web references to this; the best was http://us2.php.net/pgsql . But am unable
> to proceed because I am not sure what to do.
>
> Facts about what I have installed:
> - Installed PHP from Slackware binary; I made no special efforts to compile it. According to a PHP utility
> function (phpinfo()), looks like it might be configured for MySQL already.
> - version info:
> PHP = 4.3.7
> Linux kernel = 2.4.26
> Apache = 1.3.31
>
> How do I find these functions and install OR configure the php.ini file?
>
> I don't think this is hard to fix, but it is beating me up right now. What I need to find a blow-by-blow of
> what to do. Can somebody help me?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Can't Get PHP Going on PostgreSQL
2005-03-10 21:08 Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
@ 2005-03-11 02:00 ` Robby Russell <robby@planetargon.com>
2 siblings, 0 replies; 6+ messages in thread
From: Robby Russell @ 2005-03-11 02:00 UTC (permalink / raw)
To: Van Ingen, Lane <lvaningen@ESNCC.com>; +Cc: pgsql-php
On Thu, 2005-03-10 at 16:08 -0500, Van Ingen, Lane wrote:
> I am new to both PHP and PostgreSQL. Trying to install PHP and PostgreSQL 8.0 on Slackware Linux 10.0.0 .
> I am getting the following error out of Apache:
> "Fatal Error: Call to undefined function: pg_connect() ...."
>
> PostgreSQL is up and running, and appears to be fine.
>
> Have found a lot of web references to this; the best was http://us2.php.net/pgsql . But am unable
> to proceed because I am not sure what to do.
>
> Facts about what I have installed:
> - Installed PHP from Slackware binary; I made no special efforts to compile it. According to a PHP utility
> function (phpinfo()), looks like it might be configured for MySQL already.
> - version info:
> PHP = 4.3.7
> Linux kernel = 2.4.26
> Apache = 1.3.31
>
> How do I find these functions and install OR configure the php.ini file?
>
> I don't think this is hard to fix, but it is beating me up right now. What I need to find a blow-by-blow of
> what to do. Can somebody help me?
You need to install with pgsql support.
in your configure:
./configure ... --with-pgsql
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP-PostgreSQL Hosting & Development
* open source solutions - web hosting
****************************************/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Can't Get PHP Going on PostgreSQL
@ 2005-03-11 02:57 Van Ingen, Lane <lvaningen@ESNCC.com>
2005-03-11 06:24 ` Re: Can't Get PHP Going on PostgreSQL Tommy Gildseth <gildseth@start.no>
0 siblings, 1 reply; 6+ messages in thread
From: Van Ingen, Lane @ 2005-03-11 02:57 UTC (permalink / raw)
To: Robby Russell <robby@planetargon.com>; +Cc: pgsql-php
I did a find, and found I have several configuration programs on the system. Assume that since I am
configuring PHP, that should be in a PHP directory. Most likely was /usr/share/libtool/libltdl/configure,
but am not sure of that.
Also, what (files) does it require to do its 'configure', if any?
-----Original Message-----
From: Robby Russell [mailto:robby@planetargon.com]
Sent: Thu 3/10/2005 9:00 PM
To: Van Ingen, Lane
Cc: pgsql-php@postgresql.org
Subject: Re: [PHP] Can't Get PHP Going on PostgreSQL
On Thu, 2005-03-10 at 16:08 -0500, Van Ingen, Lane wrote:
> I am new to both PHP and PostgreSQL. Trying to install PHP and PostgreSQL 8.0 on Slackware Linux 10.0.0 .
> I am getting the following error out of Apache:
> "Fatal Error: Call to undefined function: pg_connect() ...."
>
> PostgreSQL is up and running, and appears to be fine.
>
> Have found a lot of web references to this; the best was http://us2.php.net/pgsql . But am unable
> to proceed because I am not sure what to do.
>
> Facts about what I have installed:
> - Installed PHP from Slackware binary; I made no special efforts to compile it. According to a PHP utility
> function (phpinfo()), looks like it might be configured for MySQL already.
> - version info:
> PHP = 4.3.7
> Linux kernel = 2.4.26
> Apache = 1.3.31
>
> How do I find these functions and install OR configure the php.ini file?
>
> I don't think this is hard to fix, but it is beating me up right now. What I need to find a blow-by-blow of
> what to do. Can somebody help me?
You need to install with pgsql support.
in your configure:
./configure ... --with-pgsql
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP-PostgreSQL Hosting & Development
* open source solutions - web hosting
****************************************/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Can't Get PHP Going on PostgreSQL
2005-03-11 02:57 Re: Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
@ 2005-03-11 06:24 ` Tommy Gildseth <gildseth@start.no>
0 siblings, 0 replies; 6+ messages in thread
From: Tommy Gildseth @ 2005-03-11 06:24 UTC (permalink / raw)
To: pgsql-php
Van Ingen, Lane wrote:
> I did a find, and found I have several configuration programs on the system. Assume that since I am
> configuring PHP, that should be in a PHP directory. Most likely was /usr/share/libtool/libltdl/configure,
> but am not sure of that.
>
> Also, what (files) does it require to do its 'configure', if any?
>
How did you install PHP in the first place? If your using Linux and you
used your distributions package system, it's fairly likely that there
will be a php module for postggresql in your package system as well.
F.ex. on debian it's "apt-get install php4-pgsql" which will install the
module, and activate support for it.
What distribution/os are you using?
Tommy
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-03-11 06:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-10 21:08 Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
2005-03-10 21:17 ` Thom Dyson <TDyson@sybex.com>
2005-03-10 21:29 ` Gavin M. Roy <gmr@ehpg.net>
2005-03-11 02:00 ` Robby Russell <robby@planetargon.com>
2005-03-11 02:57 Re: Can't Get PHP Going on PostgreSQL Van Ingen, Lane <lvaningen@ESNCC.com>
2005-03-11 06:24 ` Tommy Gildseth <gildseth@start.no>
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