Title: pope framework messes with apache error code &amp; displays php errors
Last modified: February 1, 2020

---

# pope framework messes with apache error code & displays php errors

 *  Resolved [Becki Beckmann](https://wordpress.org/support/users/becki/)
 * (@becki)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/)
 * 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.php`
 * and 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/](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

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Becki Beckmann](https://wordpress.org/support/users/becki/)
 * (@becki)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12389944)
 * Hello again 😉
 * just to make things sure I reproduced this behaviour on another server. It’s 
   also an OpenSuse 15.1 Box with PHP 7.2.5
 * Running the latest wordpress 5.3.2 with standard theme twenty sixteen and latest
   nextgen gallery 3.2.23 which is the only plugin being activated.
 * then I went into theme twentysixteen functions.php and modified function code
   to force an error function_exists(…) -> function_exists123(…)
 * refresh the page and voila … php error displays right in the web browser.
 *     ```
       Error thrown
   
       Call to undefined function function_exists123()
       ```
   
 * even though php.ini states display_errors = off. Also apache does not report 
   a 500 fatal error. just a 200 OK
 * `79.242.28.21 - guest [02/Feb/2020:10:01:25 +0100] "GET / HTTP/2.0" 200 75 "https://
   wpdev.beckspaced.com/"`
 * once i de-activate nextgen gallery plugin all is back to normal.
 * no php error messages in the browser.
 * apache gives a 500 error
 * `79.242.28.21 - guest [02/Feb/2020:10:19:57 +0100] "GET / HTTP/2.0" 500 2850 "
   https://wpdev.beckspaced.com/"`
 * and the php error shows up in the logs
 * `[02-Feb-2020 09:20:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined
   function function_exists123() in /.../.../functions.php:35`
 * As nextgen gallery states php 7.3 in the requirements I also installed php 7.3.14
   on the server with the exact same results.
 * perhaps someone can look into this? I would be more than grateful 😉
 * thanks a lot for your help
    greetings Becki
 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12398142)
 * Hello [@becki](https://wordpress.org/support/users/becki/),
 * We have already shared this forum thread with the development team.
    As soon 
   as we have some feedback, we will let you know.
 *  Thread Starter [Becki Beckmann](https://wordpress.org/support/users/becki/)
 * (@becki)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12398441)
 * Hello [@gabyimagely](https://wordpress.org/support/users/gabyimagely/) ,
 * thanks for getting back on that issue.
    looking forward to some feedback from
   the dev team.
 * greetings
    Becki
 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12407651)
 * Hello [@becki](https://wordpress.org/support/users/becki/),
 * Our developers let us know that it seems a conflict with the shutdown handler
   we register in nggallery.php.
 * You can avoid the problem by adding define(“NGG_DISABLE_SHUTDOWN_EXCEPTION_HANDLER”,
   TRUE); to your wp-config.php
 * Nevertheless, this is known to break the attach-to-post popup window partially(
   it results in some different margins and paddings — but still usable).
 * We hope that this helps!
 *  Thread Starter [Becki Beckmann](https://wordpress.org/support/users/becki/)
 * (@becki)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12408904)
 * Hello [@gabyimagely](https://wordpress.org/support/users/gabyimagely/),
 * thanks for the quick fix! Applied, tested and it is working 😉
    perhaps the dev
   team will be able to also fix the attach-to-post popup in a future release? that
   would be awesome!
 * thanks again & greetings to you & dev team for your time, help & service
    Becki

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘pope framework messes with apache error code & displays php errors’ is
closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Becki Beckmann](https://wordpress.org/support/users/becki/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/pope-framework-messes-with-apache-error-code-displays-php-errors-2/#post-12408904)
 * Status: resolved