PHP Exception Problems and eAccelerator 0.9.5.1-3 on FC7
Just before the Christmas break, I installed eAccelerator on our development servers in order to run some benchmark tests on the effects of code caching. As with many a pre-holiday project, I eventualy ran out of time, and promptly forgot that the caching was still up and running when I got back to work today.
Lo and behold, we had a strange problem with exception handling in our project code today. Exceptions we knew should be caught were causing fatal errors. I popped on to the php.net web site and grabbed the following example for a 'noddy' test script to run on the server.
So it ran and I got the following:
0.2
Fatal error: Uncaught exception 'Exception' with message 'Division by zero.'
in /var/www/development/dev1/test/general/trycatch2.php:4 Stack trace:
#0 /var/www/development/dev1/test/general/trycatch2.php(11): inverse(0)
#1 {main} thrown in /var/www/development/dev1/test/general/trycatch2.php on line 4
Not so good... so I googled about a bit and found reference to a problem that may be being caused by eAccelerator here.
I decided to try a little test. I edited the file at /etc/php.d/eaccelerator.ini and changed the line eaccelerator.enable="1" to eaccelerator.enable="0" in order to turn the caching off.
I restarted the server, re-ran the noddy script and got...
0.2 Caught exception: Division by zero. Hello World
... which I was happy about. So it seems that there is a bit of a problem with eAccelerator version 0.9.5.1-3 at the moment. Unfortunately we are stuck with that version until the FC7 version gets updated through yum - either that, or I'll upgrade the server to Fedora core version 8!
About this entry
You’re currently reading “ PHP Exception Problems and eAccelerator 0.9.5.1-3 on FC7 ,” an entry on chris ramsay
- Published:
- 1.3.08 / 1pm
- Category:
- Linux, PHP, Programming










No comments
Jump to comment form | comments rss [?] | trackback uri [?]