Don't know if you've tried this, but:
1. Shut down apache -- use "stop", not "graceful" or "restart".
2. shut down postmaster.
3. (be sure you have enough shm and sems -- this is usually only a problem on
Solaris).
4. start up postmaster, let it churn for about 10 secs.
5. restart apache.
I have had a problem with persistent connections and this has fixed it -- before
I did complete shutdown and restart of both postgres and apache, I had just
random things like this going wrong.
cat
Ami Ganguli wrote:
> 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]
--
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]