Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: PHP Apache crashing when PDO loads |
|
Author |
|
bemo
Joined: 23 Aug 2014 Posts: 2 Location: El Paso, tx
|
Posted: Sat 23 Aug '14 8:38 Post subject: PHP Apache crashing when PDO loads |
|
|
PHP 5.1.6, Apache 2.2.4, MySQL 5.5.32, windows 7
I unfortunately do not know how to figure out which versions of VC they were compiled against (though if someone can instruct me how to find out, I will happily get that information). They are built into an installer that I did not create.
Unfortunately changing the versions of anything is not an option.
The problem:
After changing PHP to load as a module, Apache is frequently crashing on the php5ts.dll with the Windows event viewer showing this: http://i.imgur.com/RnfQGKi.png
The Apache Access logs show nothing more than:
[Sat Aug 23 01:14:54 2014] [notice] Parent: child process exited with status 255 -- Restarting.
Followed by a reboot of Apache.
I have isolated this to an issue with the php_pdo.dll file that I am using though I can't seem to find a resolution. The simplest way to recreate my issue is to use the AB utility within Apache to access a page that is nothing more than a stub class.
I am using the following command to test it:
ab -n3000 -c10 http://localhost/test.php
Test.php contains this:
Code: |
<?
class blah extends pdo
{
}
|
that code almost consistently fails around 100 requests.
If I modify that code to remove the PDO extension, it will execute for 30k requests without an issue.
The only thing particularly odd about this setup is that I could not find a way to make the php5apche2_2 work stock. I did try using the php5apache2.dll from this site however I could not seem to make it work (I did install VC8 however I still had issues, perhaps related or perhaps because I have later versions of VC on there).
Any help at all would be greatly appreciated. I've tried a number of things:
Swapping versions of PHP doesn't seem to resolve it:
php 5.2.0, php 5.3.2
I've tried various versions of the libmysql.dll (stock is 5.0.22, I've tried 5.0.51a, libmysql from my mysql folder).
I've also tried moving libmysql.dll around quite a bit without much success.
Here is the relevant bit from my httpd.conf (can provide full conf and php.ini if desired):
LoadModule php5_module C:/php516/php5apache2_2.dll
PHPIniDir "C:/php516"
Loadfile "C:/php516/libeay32.dll"
Loadfile "C:/php516/ssleay32.dll"
LoadFile "C:/php516/php5ts.dll"
Loadfile "C:/php516/libmysql.dll"
Loadfile "C:/php516/ext/php_pdo_mysql.dll"
Loadfile "C:/php516/ext/php_mysql.dll"
AddType application/x-httpd-php .php
I will say that the mysql extension will not load if either of the 3 pieces are missing from the bottom ---- though I've had success loading the extension with libmysql.dll in c:\windows however the crashing issue still occurs.
The only other change that could possibly be related is that previously the pdo dlls were getting loaded via dl() in our code base, now they are loaded in php.ini.
ANY help is appreciated. Thank you! |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7398 Location: EU, Germany, Next to Hamburg
|
Posted: Sat 23 Aug '14 17:35 Post subject: |
|
|
Use a recent PHP version like 5.5 or if you have to 5.4
5.1 is outdated. |
|
Back to top |
|
glsmith Moderator

Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 24 Aug '14 2:08 Post subject: |
|
|
... which will probably force you to upgrade your 7½ year old version of Apache. |
|
Back to top |
|
bemo
Joined: 23 Aug 2014 Posts: 2 Location: El Paso, tx
|
Posted: Mon 25 Aug '14 16:18 Post subject: |
|
|
Unfortunately given our unique situation, upgrading has to be kept as an absolute worst case scenario. Thanks for the responses, though. |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7398 Location: EU, Germany, Next to Hamburg
|
Posted: Mon 25 Aug '14 16:38 Post subject: |
|
|
A good start is to make a parallel installation on a different port to see if it runs at all and if your PHP scripts run with that new version. A good start point is http://www.apachelounge.com/viewtopic.php?t=2394 |
|
Back to top |
|
|
|
|
|
|