Problem with apache, php and mysql after FC4 upgrade: SegmentationFault ...

Mark Linford mlinford at santarosa.edu
Thu Jun 16 14:36:46 UTC 2005


On Wed, 2005-06-15 at 21:29 -0400, craig thomas wrote:
> On Wed, 2005-06-15 at 12:38 -0700, Mark Linford wrote:
> > On Wed, 2005-06-15 at 12:26 -0700, bruce wrote:
> > > i'd advise you to create a simple php test to simply connect to the db, and
> > > see if you get this to work.. shouldn't be more than 10-20 lines of code....
> > 
> > I just did that. Just a simple connect to the database and give me your
> > status kinda-thing. Strangely, from the command line (php ./test.php),
> > it works fine, no errors, etc. It's only when it's run with apache that
> > it seg-faults.
> 
> Sounds odd. Post the script so we can try it.

OK, here it is:

<?php

$link = mysql_connect("localhost", "test", "test") or die ("could not
connect");

echo "Hello World\n";

mysql_select_db("test", $link);

var_dump($link);

?>

When run from the command line, it connects to the db, prints the
ubiquitous "Hello World", and dumps the info on the $link resource.
However, when run through apache, it segfaults at the mysql_connect call
(it never gets to print "Hello World"). Obviously, that's a test account
in the mysql connection above, but I've tried it with real, privileged
accounts and gotten the same behavior. 


Argh.

Mark




More information about the fedora-list mailing list