bmh Posted December 27, 2009 Share Posted December 27, 2009 Hi, I have installed Apache 2.2.14, PHP 5.2.12 and MySQL 5.1.41 on Windows Vista. Having encountered the error described below, I tried reinstalling several times, but to no avail. I can retrieve the data I am looking for using msqli_fetch_row(), but if I try to get an array using msqli_fetch_array(), Firefox tells me that the connection was reset and a Windows Alert warns me that "Apache HTTP Server stopped working and was closed." I have trawled the bulletin boards without finding a solution, though I did find a suggestion that it might be a configuration problem. This code works fine: <? $link = mysqli_connect('localhost','root','[password]','acme'); $select = "SELECT first_name, last_name FROM customers WHERE id=1"; $result = mysqli_query($link, $select); $row = mysqli_fetch_row($result); echo "<br/>".$row[0]; echo "<br/>".$row[1]; mysqli_close($link); ?> But the following fails: <? $link = mysqli_connect('localhost','root','[password]','acme'); $select = "SELECT first_name, last_name FROM customers WHERE id=1"; $result = mysqli_query($link, $select); $row = mysqli_fetch_row($result); // Crashes whether I try to display results or not... mysqli_close($link); ?> Any suggestions much appreciated, Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/186433-msqli_fetch_row-works-fine-but-msqli_fetch_array-causes-apache-to-crash/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 27, 2009 Share Posted December 27, 2009 Check both the Apache error log and the Windows event log for more information. Problems like this, when they are not due to php bugs (which your problem could be), are usually caused by mismatched versions of files. How did you install php and did you do anything unusual like download additional files to get mysqli to work and/or have a previous version of php installed... Quote Link to comment https://forums.phpfreaks.com/topic/186433-msqli_fetch_row-works-fine-but-msqli_fetch_array-causes-apache-to-crash/#findComment-984501 Share on other sites More sharing options...
bmh Posted December 27, 2009 Author Share Posted December 27, 2009 Thanks! I didn't have to import extensions - I mostly followed the installation instructions given on The Site Wizard (http://www.thesitewizard.com/php/index.shtml). I tried alternative installation methods (including installing Wamp Server 2), but none of them worked out. The event doesn't seem to register in the Firefox Error Console, but on the Apache Error Log it shows up as follows: [sun Dec 27 17:27:45 2009] [notice] Parent: child process exited with status 255 -- Restarting. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.7 for ServerName [sun Dec 27 17:27:45 2009] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations [sun Dec 27 17:27:45 2009] [notice] Server built: Sep 28 2009 22:41:08 [sun Dec 27 17:27:45 2009] [notice] Parent: Created child process 6348 httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.7 for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.7 for ServerName [sun Dec 27 17:27:45 2009] [notice] Child 6348: Child process is running [sun Dec 27 17:27:45 2009] [notice] Child 6348: Acquired the start mutex. [sun Dec 27 17:27:45 2009] [notice] Child 6348: Starting 64 worker threads. [sun Dec 27 17:27:45 2009] [notice] Child 6348: Starting thread to listen on port 80. Quote Link to comment https://forums.phpfreaks.com/topic/186433-msqli_fetch_row-works-fine-but-msqli_fetch_array-causes-apache-to-crash/#findComment-984577 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.