简体   繁体   中英

PHP 5.6 to upgrade PHP 7 causes failed opening required include_path='.:/usr/local/php70/pear

We have developed a WordPress/WooCommerce website using PHP 5.6 and we would like to upgrade to PHP7. The website works perfectly on 5.6 but running it on PHP7 would increase the speed of the website.

The change to PHP7 causes the following 500 error:

PHP Fatal error: require_once(): Failed opening required '' (include_path='.:/usr/local/php70/pear') in /home/servername/public_html/customer/customername/wp-content/themes/flux/framework/qode-framework.php on line 4

We did a quick test with a copy of the site on another PHP7 server from another hosting and there PHP7 works fine. So it should be a server setting, but I can't figure it out.

If someone could help me understand the problem, that would be great!

Thanks

Go to /home/servername/public_html/customer/customername/wp-content/themes/flux/framework/qode-framework.php file on line 4 and do like following code for example:

require_once(realpath(__DIR__.'/../vendor/autoload.php'));

or

require_once(realpath(__DIR__.'/../your-file-path'));

or

require_once(realpath(__DIR__.'/your-file-path'));

make sure to use realpath(), this command will convert a relative path to an absolute one

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM