0

I am trying to run a xslt process:

$xslt = new XSLTProcessor(); 

Pretty standard, however I am a bit miffed as it is generating a server 500 error, I have attempted to locate the PHP error log to no avail, and checked through the httpd error log so which I see no error relating to this issue.

I am currently running a Centos v6 64bit OS with PHP 5.3.3 (latest) installed, I have done a yum install of php-xml as php-xsl does not exist and I am wondering if anyone else out there can shed any light into why this is dieing when on my local windows machine it is happy days!

1 Answer 1

3

Error 500 indicates a parse error or another fatal error, so my first guess is that the XSLTProcessor class is missing (the XSL module hasn't been loaded). Be sure that xsl.so has been added as a loaded extension (extension=xsl.so) and that it was installed together with the xml modules (it should be - as far as I can see it lives in the php-xml for Centos).

Do a phpinfo() call, and see if xsl / xml is available there. Check the value of error_log to see where specific PHP errors are logged, verify that error_reporting is not set to E_NONE / 0 and be sure that log_errors is turned on (if it isn't, you won't see any errors in the error log or the php log).

If you're still no wiser, simply try to do var_dump(class_exists("XSLTProcessor")) to see if the class is available at all.

While this is not the exact answer for what you need to do, it should provide you with enough information to find out what's wrong from the information you've provided.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, the issue was when installing php-xml the php-common conflicted with php-common53 for the update of php on Centos, it seems to be a known bug, I un-installed Centos and installed Ubuntu to rectify my issue pretty major surgery to get around the issue though :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.