The function plugin_version_check_for_updates, present in /includes/functions/plugin_support.php, throws debug-logs each time the admin is accessed in a client's installation:
As you can see from the logs, the Zen Lightbox plugin is trying to determine if there's an update available. The issue is that the site on which Zen Cart is installed has allow_url_fopen set to 0, which prohibits remote use of the PHP file_get_contents function.Code:[14-Oct-2015 17:03:46 UTC] Request URI: /theadmin/login.php?camefrom=server_info.php, IP address: #1 file_get_contents() called at [/var/www/html/example.com/includes/functions/plugin_support.php:38] #2 plugin_version_check_for_updates() called at [/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php:85] #3 require(/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php) called at [/var/www/html/example.com/includes/autoload_func.php:48] #4 require(/var/www/html/example.com/includes/autoload_func.php) called at [/var/www/html/example.com/theadmin/includes/application_top.php:156] #5 require(/var/www/html/example.com/theadmin/includes/application_top.php) called at [/var/www/html/example.com/theadmin/login.php:16] [14-Oct-2015 17:03:46 UTC] PHP Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /var/www/html/example.com/includes/functions/plugin_support.php on line 38 [14-Oct-2015 17:03:46 UTC] Request URI: /theadmin/login.php?camefrom=server_info.php, IP address: #1 file_get_contents() called at [/var/www/html/example.com/includes/functions/plugin_support.php:38] #2 plugin_version_check_for_updates() called at [/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php:85] #3 require(/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php) called at [/var/www/html/example.com/includes/autoload_func.php:48] #4 require(/var/www/html/example.com/includes/autoload_func.php) called at [/var/www/html/example.com/theadmin/includes/application_top.php:156] #5 require(/var/www/html/example.com/theadmin/includes/application_top.php) called at [/var/www/html/example.com/theadmin/login.php:16] [14-Oct-2015 17:03:46 UTC] PHP Warning: file_get_contents(http://www.zen-cart.com/downloads.php?do=versioncheck&id=170): failed to open stream: no suitable wrapper could be found in /var/www/html/example.com/includes/functions/plugin_support.php on line 38 [14-Oct-2015 17:03:46 UTC] Request URI: /theadmin/login.php?camefrom=server_info.php, IP address: #1 in_array() called at [/var/www/html/example.com/includes/functions/plugin_support.php:42] #2 plugin_version_check_for_updates() called at [/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php:85] #3 require(/var/www/html/example.com/theadmin/includes/init_includes/init_zen_lightbox.php) called at [/var/www/html/example.com/includes/autoload_func.php:48] #4 require(/var/www/html/example.com/includes/autoload_func.php) called at [/var/www/html/example.com/theadmin/includes/application_top.php:156] #5 require(/var/www/html/example.com/theadmin/includes/application_top.php) called at [/var/www/html/example.com/theadmin/login.php:16] [14-Oct-2015 17:03:46 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/example.com/includes/functions/plugin_support.php on line 42
Perhaps the function can be re-coded to use a CURL interface?
P.S. I was receiving the same error for the internal Zen Cart version check until I set Configuration->My Store->Show if version update is available to false.
Bookmarks