Re: [PHP-DB] works on command line, not on server
The Disguised Jedi wrote: try users@httpd.apache.org list On Tue, 25 Jan 2005 14:21:25 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a new installation of php on an existing apache 2 server, and something strange is happening. The file 'test.php' works and connects to the database when run through the command line, but when run from the web server (http://server/test.php) produces a segmentation fault: child pid 29056 exit signal Segmentation fault segmentation faults are a built in feature of the PHP/Apache2 setup whenever you don't use the PREFORK Apache2 worker module - I know barely enough to know this - this is due to threading (which is not supported with ?most? php extension - not sure if php itself has this problem also). Anyway bottom line switch to PREFORK worker module if your not already using it, alternatively you could try to get a stable threaded setup going but before you embark I'd like to paraphrase a higher PHP authority, Rasmus Leidorf (they don't get any higher actually) speaking in relation to using a threaded Apache2 worker module: Your in unchartered territory, good luck. and Nobody knows. php itself does work, and a file with only phpinfo() in it runs fine on both the server and the command line. Has anyone seen anything like this before? Any ideas? ?php $link = mysql_connect(localhost, user, pass) or die(Could not connect); mysql_select_db(disorder) or die(Could not select database); print hello; also you may need/wish to try the newer mysqli_* extension which is geared to the latest versions of MySQL. ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] works on command line, not on server
[EMAIL PROTECTED] wrote: Thanks, I already had prefork installed. I solved the problem by heaven help those that walk the threaded path heh :-) changing to php 5 from php 4. IC interesting to know. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] works on command line, not on server
I have a new installation of php on an existing apache 2 server, and something strange is happening. The file 'test.php' works and connects to the database when run through the command line, but when run from the web server (http://server/test.php) produces a segmentation fault: child pid 29056 exit signal Segmentation fault php itself does work, and a file with only phpinfo() in it runs fine on both the server and the command line. Has anyone seen anything like this before? Any ideas? ?php $link = mysql_connect(localhost, user, pass) or die(Could not connect); mysql_select_db(disorder) or die(Could not select database); print hello; ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] works on command line, not on server
try users@httpd.apache.org list On Tue, 25 Jan 2005 14:21:25 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a new installation of php on an existing apache 2 server, and something strange is happening. The file 'test.php' works and connects to the database when run through the command line, but when run from the web server (http://server/test.php) produces a segmentation fault: child pid 29056 exit signal Segmentation fault php itself does work, and a file with only phpinfo() in it runs fine on both the server and the command line. Has anyone seen anything like this before? Any ideas? ?php $link = mysql_connect(localhost, user, pass) or die(Could not connect); mysql_select_db(disorder) or die(Could not select database); print hello; ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- The Disguised Jedi [EMAIL PROTECTED] PHP rocks! Knowledge is Power. Power Corrupts. Go to school, become evil Disclaimer: Any disclaimer attached to this message may be ignored. This message is Certified Virus Free -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php