I\'m using PHP5, CodeIgniter and Apache. The localhost php pages were loading fine and then suddenly they started crashing Apache.
The web pages seem to get to diff
This problem often happens in Windows because of smaller Apache’s default stack size. And it usually happens when working with php code that allocates a lot of stacks.
To solve this issue, add the following at the end of apache config file, httpd.conf
<IfModule mpm_winnt_module>
ThreadStackSize 8888888
</IfModule>
AND restart apache. i take this solution from this site.
Copy file php5apache.dll
from xampp\php\
to Windows\System32\
We are running two copies of Apache, each with their own version of PHP.
After searching for this error and trying different suggestions of copying files into the windows system32 folder, I finally found that the issue seems to be multiple copies of libmysql.dll found in the windows path.
After copying the libmysql.dll file into the apache bin folder we no longer have this problem.
I experienced tha same problem when I called
$link = mysql_connect('127.0.0.1', $user, $password);
from a PHPscript when running a clean install of WampServer (http://www.wampserver.com/en/)
I tried to copy DLLs, as suggested above, but I could not get it to work.
Finally I changed to UniformServer (http://www.uniformserver.com/) 5.6.16, and it worked as a charm.
Hope this post can save some time for somebody :-)
In my case it was the php extension APC (php_apc.dll, 3.1.10-5.4-vc9-x86, threadsafe), which caused the error.
I used XAMPP 1.8.2 with PHP 5.4.19 and Apache 2.4.4
Since it could be caused by another extension as well, it might be a good starting point to restore the original php.ini from the xampp distribution. If this one works well, try to change it line by line to your desired configuration (starting with the extension list).
I tried above, but they all did not work.
After long investigation, it was ridiculously easy: in one of my ajax-files I had in the PHP-code the line
mysqlclose();
This was the problem. Everything works fine now.
Just mentioning. Maybe helping people cut their debugtime a bit.