pope framework messes with apache error code & displays php errors
-
Hello there π
first thanks a lot for your awesome plugin!
I want to report a really strange issue with nextgen gallery plugin.
I’m running an OpenSuSE Box 15.1 with PHP 7.2.25 but also testet with PHP 7.3.14
And I’m 100% sure that this is because of nextgen gallery plugin because if I disable the plugin all is fine.
What is the problem?
I have PHP setup to not show any errors via php.ini display_errors = off
If I then force an error by calling a wrong function name, e.g. add_filter123() the PHP error gets displayed right in the browser.Error thrown Call to undefined function add_filter123()Which I really don’t want as I don’t want to leak any error infos via the web browser.
another really strange thing is that Apache does not report the error with a 503 error code as it should
apache simply gives a 200 status which is really not what I want.93.213.227.172 - guest [01/Feb/2020:11:07:14 +0100] "GET http://kohphangannews.org/ HTTP/1.1" 200 89 "https://kohphangannews.org/wp-admin/"So i checked and looked and double checked and double looked to find out what causes the error?
If i de-activate nextgen gallery plugin and produce the same error as above via add_filter123() apache then reports a 503
93.213.227.172 - guest [01/Feb/2020:11:20:35 +0100] "GET http://kohphangannews.org/ HTTP/1.1" 503 280 "https://kohphangannews.org/wp-admin/"and no php error is displayed in the browser as it should as php.ini says display_errors = off
I then did a bit more digging by renaming folders / files to find out which part of nextgen gallery plugin is causing this weird behaviour?
My search ended up with the pope framework /wp-content/plugins/nextgen-gallery/pope/lib
in that folder thers’s an autoload.php
If i then rename e.g. class.pope_cache.php to class.pope_cache.php.123 to produce an error all goes back to normal.Apache reports an error:
93.213.227.172 - guest [01/Feb/2020:11:30:57 +0100] "GET http://kohphangannews.org/ HTTP/1.1" 503 280 "https://kohphangannews.org/"PHP reports an error
[Sat Feb 01 11:37:01.335558 2020] [proxy_fcgi:error] [pid 4346:tid 139872698353408] [client 93.213.227.172:58706] AH01071: Got error 'PHP message: PHP Warning: require_once(class.pope_cache.php): failed to open stream: No such file or directory in /.../.../wp-content/plugins/nextgen-gallery/pope/lib/autoload.php on line 5PHP message: PHP Fatal error: require_once(): Failed opening required 'class.pope_cache.php' (include_path='.:/usr/share/php7:/usr/share/php7/PEAR:/srv/common/libs') in /.../.../wp-content/plugins/nextgen-gallery/pope/lib/autoload.php on line 5', referer: https://kohphangannews.org/wp-admin/plugins.phpand no php errors displayed in the browser
If i rename the file class.pope_cache.php so it gets loaded all is back to strange behaviour
the php error is displayed in the browser
Error thrown Call to undefined function add_filter123()apache gives me a status code of 200 instead of a 503
93.213.227.172 - guest [01/Feb/2020:11:40:39 +0100] "GET http://kohphangannews.org/ HTTP/1.1" 200 89 "https://kohphangannews.org/"and the error log doesn’t report any errors at all which is really not what I want.
php should report an error as it does once I disable the nextgen gallery plugin:[Sat Feb 01 11:20:35.146293 2020] [proxy_fcgi:error] [pid 4344:tid 139873075361536] [client 93.213.227.172:58362] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function add_filter123() in /.../.../wp-content/themes/KohPhanganNews/functions.php:27\nStack trace:\n#0 /.../httpdocs/wp-settings.php(497): include()\n#1 /.../httpdocs/wp-config.php(157): require_once('/srv/www/wpmult...')\n#2 /./httpdocs/wp-load.php(37): require_once('/...')\n#3 /.../httpdocs/wp-blog-header.php(13): require_once('/wpmult...')\n#4 /.../httpdocs/index.php(17): require('//wpmult...')\n#5 {main}\n thrown in /.../httpdocs/wp-content/themes/KohPhanganNews/functions.php on line 27', referer: https://kohphangannews.org/I double and triple checked everything! the error is in the pope framework and I can reproduce this strange behaviour all the time.
from what i can see pope framework seems to be a couple of years old?https://bitbucket.org/photocrati/pope-framework/src/default/lib/
perhaps it is not compatible with newer PHP versions?
I would really, really love to get this fixed.
as php errors not being reported by apache as 503 instead sending a 200 status code?
and displaying the errors in the browser even though display_errors is set to off?this is really strange! Can we fix this?
thanks a lot for your time, help & service π
greetings
Becki
The topic ‘pope framework messes with apache error code & displays php errors’ is closed to new replies.