Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-18 Thread Remco Rijnders
In article [EMAIL PROTECTED], 
Alberto Brealey wrote:
   Fatal error: Call to unsupported or undefined function pg_connect() in
   lib.inc.php on line 90

did you try

dl(pgsql.so);

before using any pgsql functions? (you have to do this 'cuz pgsql is loaded
as a module, not compiled into php interpreter).

No, I didn't try that. As I understand it that is not required when
you specify in the php3.ini file that this should be auto loaded. The
auto load for mysql support for example works without a flaw on this
same machine.

Thank you for the suggestion though :)

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 51 days,  7:45
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-18 Thread Andrew Sullivan
On Tue, Jul 18, 2000 at 05:31:15AM +0200, Remco Rijnders wrote:

 So now with the cause pinned down, what can I do to fix this? I'd like
 to run potato on this machine but really need version 7.* of
 postgreSQL because of the foreign key support. Would upgrading just
 the php3-pgsql package work, or would I then also need to upgrade
 apache and all other things?

The PHP3 packages from woody seem to work fine.  If you upgrade them,
though, you'll get an upgraded apache, too.  And apache-ssl from woody
conflicts with ssh, so if you need ssh, you can't have apache-ssl for now.

You could compile the potato version of PHP against postgres 7.  That's what
I did.  Just add a sources line to your sources.list.

 Last question... If this is a known incompatibilty, shouldn't the
 debian packaging mechanism prevent me from making oopsies like this by
 pointing out the dependencies to me?

I don't know.  I do know that you can install the php3-pgsql package without
having PostgreSQL installed, so apparently there is no dependency.

-- 
Andrew Sullivan  Computer Services
[EMAIL PROTECTED]Burlington Public Library
+1 905 639 3611 x158   2331 New Street
   Burlington, Ontario, Canada L7R 1J4



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-18 Thread Remco Rijnders
In article [EMAIL PROTECTED], Andrew Sullivan wrote:
On Tue, Jul 18, 2000 at 05:31:15AM +0200, Remco Rijnders wrote:

 So now with the cause pinned down, what can I do to fix this? I'd like
 to run potato on this machine but really need version 7.* of
 postgreSQL because of the foreign key support. Would upgrading just
 the php3-pgsql package work, or would I then also need to upgrade
 apache and all other things?

The PHP3 packages from woody seem to work fine.  If you upgrade them,
though, you'll get an upgraded apache, too.  And apache-ssl from woody
conflicts with ssh, so if you need ssh, you can't have apache-ssl for now.

You could compile the potato version of PHP against postgres 7.  That's what
I did.  Just add a sources line to your sources.list.

I managed to solve the problem (thanks to your pointer earlier). In
the end I have downloaded php3-pgsql, php3 and apache-common from
woody. All other packages I could keep at the potato version,
including the main apache package.

The program I needed this for now works like a champ :) A thank you to
you and everyone else who attempted to help me. It is very much
appreciated.

Sincerely,

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 51 days,  8:52
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-17 Thread Remco Rijnders
On Fri, Jul 14, 2000 at 09:10:47AM -0400, Andrew Sullivan wrote:
 On Fri, Jul 14, 2000 at 09:15:01AM +0200, Remco Rijnders wrote:
 
  Fatal error: Call to unsupported or undefined function pg_connect() in
  lib.inc.php on line 90
 
 Did you install the PostgreSQL package for PHP?  And did you turn it on in
 the php[3].ini?

Yes, it is called php3-pgsql if I am not mistaken. I have also checked
to see that the file pgsql.so is in /usr/lib/php3/apache/ as where it
should belong if I am not mistaken. I turned it on in php3.ini (see my
original post) and have restarted the apache server.

I think I am doing everything by the book and that is why I am getting
a little frustrated by the error that won't go away.

Thank you for your attempt to help though :)

Sincerely,

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 50 days, 21:34
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-17 Thread Alberto Brealey
On Mon, Jul 17, 2000 at 08:21:05PM +0200, Remco Rijnders wrote:
 On Fri, Jul 14, 2000 at 09:10:47AM -0400, Andrew Sullivan wrote:
  On Fri, Jul 14, 2000 at 09:15:01AM +0200, Remco Rijnders wrote:
  
   Fatal error: Call to unsupported or undefined function pg_connect() in
   lib.inc.php on line 90
  
  Did you install the PostgreSQL package for PHP?  And did you turn it on in
  the php[3].ini?
 
 Yes, it is called php3-pgsql if I am not mistaken. I have also checked
 to see that the file pgsql.so is in /usr/lib/php3/apache/ as where it
 should belong if I am not mistaken. I turned it on in php3.ini (see my
 original post) and have restarted the apache server.

did you try

dl(pgsql.so);

before using any pgsql functions? (you have to do this 'cuz pgsql is loaded
as a module, not compiled into php interpreter).

hope that helps,

Alberto Brealey
[EMAIL PROTECTED]



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-17 Thread Remco Rijnders
On Mon, Jul 17, 2000 at 03:14:05PM -0400, Andrew Sullivan wrote:
  Yes, it is called php3-pgsql if I am not mistaken. I have also checked
  to see that the file pgsql.so is in /usr/lib/php3/apache/ as where it
  should belong if I am not mistaken. I turned it on in php3.ini (see my
  original post) and have restarted the apache server.
 
 Are the versions you have compatible?  The Postgres 7.x version from woody
 does not work the the php3-pgsql package from potato.

As I woke up this morning and was still in bed, my mind slipped to
this problem again (Yes, I realise that is pretty sick :) and all at
once it occurred to me that I had installed the PostgreSQL packages
from woody. I wondered if it made a difference. Then when I got online
to check my mail I saw this reply from you.

So now with the cause pinned down, what can I do to fix this? I'd like
to run potato on this machine but really need version 7.* of
postgreSQL because of the foreign key support. Would upgrading just
the php3-pgsql package work, or would I then also need to upgrade
apache and all other things?

Last question... If this is a known incompatibilty, shouldn't the
debian packaging mechanism prevent me from making oopsies like this by
pointing out the dependencies to me?

Thank you for your time and help!

Sincerely,

Remmy

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 51 days,  6:56
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Getting apache, PHP3, and PostgreSQL working together.

2000-07-14 Thread Remco Rijnders
Hello all,

I am trying to get apache, PHP3, and PostgreSQL to work together on my
Potato machine. I want to use the phpPgAdmin to give me a web
accessible interface to the PostgreSQL database. However trying to use
it gives me the following error:

Fatal error: Call to unsupported or undefined function pg_connect() in
lib.inc.php on line 90

This suggests to me that PHP is unawareof the PostgreSQL database
functions. I have read the readme files that come with php3-pgsql and
searched the web for solutions to this problem. They all seem to
suggest to edit /etc/php3/apache/php3.ini . In that file I have the
following snippets:

extension_dir   =   /usr/lib/php3/apache
...
extension=pgsql.so

After having edited this file I issued an apachectl restart but it
still refuses to use the database functions I need. What do I do
wrong, and, more importantly, how do I fix this?

All help is greatly appreciated.

Sincerely,

A puzzled Remmy.

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 47 days, 10:47
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-14 Thread John Pearson
On Fri, Jul 14, 2000 at 09:15:01AM +0200, Remco Rijnders wrote
 Hello all,
 
 I am trying to get apache, PHP3, and PostgreSQL to work together on my
 Potato machine. I want to use the phpPgAdmin to give me a web
 accessible interface to the PostgreSQL database. However trying to use
 it gives me the following error:
 
 Fatal error: Call to unsupported or undefined function pg_connect() in
 lib.inc.php on line 90
 
 This suggests to me that PHP is unawareof the PostgreSQL database
 functions. I have read the readme files that come with php3-pgsql and
 searched the web for solutions to this problem. They all seem to
 suggest to edit /etc/php3/apache/php3.ini . In that file I have the
 following snippets:
 
 extension_dir   =   /usr/lib/php3/apache
 ...
 extension=pgsql.so
 
 After having edited this file I issued an apachectl restart but it
 still refuses to use the database functions I need. What do I do
 wrong, and, more importantly, how do I fix this?
 
 All help is greatly appreciated.
 

You may need to stop Apache and then restart it; you haven't changed
Apache's configuration you've changed PHP's, so you have to ensure
that the PHP module is unloaded and then re-loaded to give effect to
the change.  The simplest way I've found of doing this is to stop
and restart Apache.



John P.
-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.mdt.net.au/~john Debian Linux admin  support:technical services



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-14 Thread Remco Rijnders
In article [EMAIL PROTECTED], John Pearson wrote:
 I am trying to get apache, PHP3, and PostgreSQL to work together on my
 Potato machine. I want to use the phpPgAdmin to give me a web
 accessible interface to the PostgreSQL database. However trying to use
 it gives me the following error:
 
 Fatal error: Call to unsupported or undefined function pg_connect() in
 lib.inc.php on line 90
 
 This suggests to me that PHP is unawareof the PostgreSQL database
 functions. I have read the readme files that come with php3-pgsql and
 searched the web for solutions to this problem. They all seem to
 suggest to edit /etc/php3/apache/php3.ini . In that file I have the
 following snippets:
 
 extension_dir   =   /usr/lib/php3/apache
 ...
 extension=pgsql.so
 
 After having edited this file I issued an apachectl restart but it
 still refuses to use the database functions I need. What do I do
 wrong, and, more importantly, how do I fix this?

You may need to stop Apache and then restart it; you haven't changed
Apache's configuration you've changed PHP's, so you have to ensure
that the PHP module is unloaded and then re-loaded to give effect to
the change.  The simplest way I've found of doing this is to stop
and restart Apache.

Hi John,

I have tried as suggested:

[EMAIL PROTECTED]:/home/remmy# apachectl stop
/usr/sbin/apachectl stop: httpd stopped
[EMAIL PROTECTED]:/home/remmy# apachectl start
/usr/sbin/apachectl start: httpd started

But I keep getting the same error :( And yes, I have tried to reload
the page in Netscape as well :)

Thank you,

-- 
Remco Rijnders, ICQ: 760542 | Linux adanidas 2.2.14 is up 47 days, 10:19
http://www.starchat.net/| Reporter: Mr Gandhi, what do you think of
Phone:(+31) 70 3467809  |   Western Civilization?
Cellular: (+31) 6 22091723  | Gandhi:   I think it would be a good idea.



Re: Getting apache, PHP3, and PostgreSQL working together.

2000-07-14 Thread Andrei Ivanov
All apache needs at this point is the php module. I assume you have that.
But you also need php with postgreSQL support, which is not there by
default. apt-get it ( I dont know the name of it, but this was a case for
me when I was getting mysql to work with php), and you should be fine.
Andrei

-
 Andrei S. Ivanov  
 [EMAIL PROTECTED]
 http://arshes.dyndns.org  
 UIN 12402354

 For GPG key, go to above URL/GnuPG
-