Sorry for all the questions but...

I've got my Postgres connection working now, but Apache keeps segfaulting
(actually, Apache as a whole stays up, but the client processes keep
segfaulting) when I load pages that access a Postgres database.

I can sit and reload my main page (which doesn't access the database) forever
and everything works.

If I reload my login page (which does access the database) the Apache
processes segfaults about half the time.  The browser returns "no data" and
the Apache log file tells me it's child process has segfaulted.

Interestingly, the children seem to stay alive to serve an offending page, but
die while serving the next page (so, for example, if I switch between my test
page and my Midgard Admin page the admin page starts returning "no data").

There are no error messages in the log file except the segfault notification.

The relevent code in the page is:

dl("pgsql.so");
$dbconn = pg_pconnect("dbname=xxx user=yyy password=zzz");
$dbresult = pg_exec( 
        $dbconn, 
        "select password, number from students where name='$auth_name'"
        );
$rows = pg_numrows( $dbresult );
$auth_password == pg_result( $dbresult, 0, "password");
$user = pg_result($dbresult, 0, "number");
pg_close( $dbconn );

If tried both "pg_connect" and "pg_pconnect".  I've also tried not closing the
connection (thinking it should be reused anyway).

The other odd behavior I've noticed is that extension_loaded("pgsql.so") never
returns true, even when checked after the "dl" command.

Does anybody have any ideas?  Thanks,

Ami.


--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org

To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]

Reply via email to