From: James E. F. <jf...@ac...> - 2002-01-23 15:54:31
|
On Wed, 23 Jan 2002, Danie Roux wrote: > On Wed, Jan 23, 2002 at 09:22:41AM -0500, James E. Flemer wrote: > > > > Are you running this on unix (what unix/distro/kernel) or > > windows (version)? What version of apache, and what version > > of PHP (from RPM/pkg or from source etc)? > > It's Debian unstable. Apache 1.3.22. PHP 4.1.1. Installed from the > packages. > > > PHP is supposed to gracefully handle calling mysql_*() > > functions when the module is not available... i.e. It > > should give an error message, it should *not* core dump. > > It does not core dump. It does nothing. Viewing the source shows a > completely empty page. The Apache logs only says > > ... "GET /surveys/ HTTP/1.0" 200 0 "-" ... > > And that's it. No other indication. > > If I put a "echo ("Check");" in phpESP.ini right above > > if( !($ESPCONFIG['db_conn'] = @mysql_connect( > > It gets echoed. But if I put the echo above "header( 'HTTP/1.0 503 '." or > at the bottom of the file it doesn't get shown. > > I just checked with w3m, a console web browser. It says > > "This cookie was rejected to prevent security violation. [RFC 2109 4.3.2 > rule 2.1]". Weird. Also does this after installing php4-mysql. But it > still works. Doh! That is it. Thanks for showing me that line. =) Since there is an "@" in front of the mysql_connect(), all error messages are suppressed. This is normally ok, becuase I check the return value. However, when the mysql extension is not loaded, it does not return -- the error is fatal. Would it be possible for you to remove the extension and see if this bit of code catches it (when placed before the mysql_connect())? if(!extension_loaded('mysql')) { echo('<b>Mysql extension not loaded. Aborting.</b>'); exit; } For the rest of you who are having similar problems, please verify that you have the mysql extension loaded, you can do this from the phpinfo() page. -James |