compatibility bug with litespeed's PHP build (SAPI)
I believe I have run into a compatibility bug with litespeed's SAPI when using a matching build of the cpanel PHP for apache
PHP can be executed from the command line of course - we use this for various reasons, typically in cron to execute things like WordPress maintenance and avoid wasteful use of the webserver
When litespeed's PHP is run from the command-line, I discovered at least two problems, there may be more - and I suspect it's from SAPI not falling back when it cannot discover a litespeed parent?
First, it doesn't match how apache's PHP calculates/recognizes the locally executing script's path as the base for require/include - it assumes the cli path I think, so locally referenced files fail to be found
Secondly instead of returning null for apache_request_headers, it actually fails entirely, which causes eaccelerator to throw an opcode error and crash.
This is very easy to reproduce in your lab.
Just make sure you have a working WordPress install and go to shell, move to a directory outside of WordPress itself.
(apache's php called directly, loading wordpress index.php directly)
(litespeed's php called directly, loading wordpress index.php directly)
now we make it work by forcing the directory
the crash has been fixed in lsapi_main.c, please try rebuild you lsphp5 binary. PHP LSAPI packages has been updated.
The reason why it does not do a chdir like cli-php will take more time to figure out.
Thanks for the quick fix - will have to build much later tonight because it's an active server and can't risk the loads.
At first I didn't think that PHP does a chdir to the executing script's directory but I guess it does since wordpress tries to use require('./wp-load.php') which implies a local directory, and it works from apache's version.
Does the "Build Matching PHP Binary" auto-download the newest LSAPI or should I manually replace it somewhere first?
(by the way 4.1.10 definitely fixes the supercache gzip problem, many thanks)
|All times are GMT -7. The time now is 12:52 AM.|