Forum
PHP-FMP Breaks Perch
Hi,
I'm looking into the PHP-FPM SERVER API for handling PHP (it should help boost my server's RAM efficiency).
However, when I activate the ProxyPassMatch in the apache 2.4 conf file with the following code:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/sitename/public_html/$1
The page breaks - it looks like some of the perch functions are breaking, for example the perch_page_attributes() and perch_content() functions, yet perch_layout() works fine.
I know my implementation of PHP-FPM is correct, and it works well for non-perch sites.
Is there a known issue/fix for this?
My Server is on CentOS 7, Apache 2.4 if it helps.
Regards,
My suspicion is that an expected environment variable is being lost.
Are you able to access your diagnostics report? If not, can you show me the output of
print_r($_SERVER);
?Hi,
I can't access the diagnostic report, but here is the $_SERVER export;
Anything look like it might clash with perch?
Hmm, that looks ok.
Can you be more specific about the errors you're getting?
If it helps, the non php-fmp only has 6 variables now missing in $_SERVER:
Any of those look essential to perch?
Sadly I cannot - it just gives a blank screen (removing the perch functions like the attributes one allows the page to load everything up to the next perch function before stopping).
I was mostly looking to see if
REQUEST_URI
andSCRIPT_NAME
were being correctly populated - without those Perch doesn't know how to serve up a page.Do you have an error log of any sort?
I have looked through my error log - but nothing really helps.
I have also tried it on a wordpress installation, and it gives the error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress"
So possibly my php-fpm installation is stopping the server from using MySQL, but I don't know why it would be doing that?
PHP-MySQL is correctly installs, and runs fine. Possibly the ProxyPassMatch ^/(..php(/.)?)$ fcgi://127.0.0.1:9000/home/sitename/public_html/$1 change stops mySQL from working?
Do you have PDO installed? Does
phpinfo()
reveal anything?PHP info has revealed that using proxypassmatch is swapping the PHP version being used by my virtualhost (causing issues) so I'll see if I can resolve this. Seems like it's not a perch issue at least!
Thanks for the help!