Prestashop: fatal error

Created on 22 May 2019  路  32Comments  路  Source: PrestaShop/PrestaShop

Prestashop 1.7.5.2 on php 7.2.18
often I've this error:
Fatal error: require_once(): Failed opening required '/var/www/vhosts/100asa.it/httpdocs/var/cache/dev/appParameters.php' (include_path='/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear_exception:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/console_getopt:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear-core-minimal/src:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/archive_tar:.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/100asa.it/httpdocs/config/bootstrap.php on line 86

1.7.5.2 BO Bug No change required

All 32 comments

Hi @centoasa,

Could you please try to clear the cache manually by deleting all the folder into var/cache (prod & dev).
Thanks to check and feedback.

Thanks!

already done many times, but issue happens again
Also tried to not use prestashop cache, but issue still remain.
Issue happens also when I try to update traffic/seo/setting url

Maybe related to this apache issue?
AH01071: Got error 'PHP message: PHP Fatal error: require_once(): Failed opening required '/var/www/vhosts/100asa.it/httpdocs/var/cache/dev/appParameters.php' (include_path='/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear_exception:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/console_getopt:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear-core-minimal/src:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/archive_tar:.:/opt/plesk/php/7.2/share/pear') in聽/var/www/vhosts/100asa.it/httpdocs/config/bootstrap.php聽on line 86\n', referer: https://www.100asa.it/Back100asa/index.php/sell/catalog/products/89?_token=zz5300G_3YKdCaoCENWDX5Gkhhhhm8tZPyFI-wfxj8Q

@centoasa, the fatal error related to file in the cache
Thanks!
This is afresh installation PS1.7.5.2?

No, is not a fresh installation. Is a 1.7 first release updated from time to time

@centoasa, Could you please try to configure your smarty by disabling the cache, set the option "Template compilation" to Force compilation and clear cache.
Thanks to check and feedback.

Now seems it working well

@centoasa, it is a cache issue.
I close the ticket, feel free to open a new one when needed.
Thanks!

I'd really like to re-enable the cache, so if you could pass on this error to the developers it would be great.

@centoasa, if you enable smarty cache, the issue remains again?
Thanks!

Just enable smarty cache, and I've:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
But website not crashed and relogin seems all works well.
I'm continuing to works and let you know

@centoasa, could you please try to enable the debug mode et provide me the exact exception displayed.
Thanks!

again-->
Fatal error: require_once(): Failed opening required '/var/www/vhosts/100asa.it/httpdocs/var/cache/dev/appParameters.php' (include_path='/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear_exception:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/console_getopt:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear-core-minimal/src:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/archive_tar:.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/100asa.it/httpdocs/config/bootstrap.php on line 86

79.7.101.x is my public ip address--> https://nimb.ws/B5nNxY

to make my webste working, I've to delete manually /var/cache/*

@centoasa, if you set the option "Template compilation" to Force compilation / "Recompile templates if the files have been updated" and clear cache, the cache is enabled in this case => you have the same error?
Thanks!

always-->
Fatal error: require_once(): Failed opening required '/var/www/vhosts/100asa.it/httpdocs/var/cache/dev/appParameters.php' (include_path='/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear_exception:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/console_getopt:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/pear-core-minimal/src:/var/www/vhosts/100asa.it/httpdocs/vendor/pear/archive_tar:.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/100asa.it/httpdocs/config/bootstrap.php on line 86

@centoasa, in my case, I did not manage to reproduce the issue with PS1.7.5.2.
After removal of cache rm -fR var/cache/* thanks to run those commands

php -d memory_limit=-1 ./bin/console cache:clear
php -d memory_limit=-1 ./bin/console cache:clear --env=prod

THanks!

[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
re-activate smarty cache, we hope all continue to works! I keep you updated

just try to rebuild products/home-default images, server crashed, clear again cache directly by server, and prestashop goes up!

Hi @centoasa, when smarty cache is disabled & you try to regenerate images => same issue occurs or not?

Thanks!

@khouloudbelguith yes it's right!
but not only this: I'm trying to update a "ps_facetedsearch v2.2.1 to v3.0.1" prestashop module and all prestashop crashes and crashes the server
https://nimb.ws/buaRit

I've just installed and upgrading other modules without any issue or problems; so I think there's something borken in this module upgrade ps_facetedsearch v2.2.1 to v3.0.1

@centoasa, We released a 3.0.2 which this the upgrade problem is there are many products/categories.

Thanks!

@khouloudbelguith thank you so much, but in my backoffice still see v2.2.1 --> v3.0.1
https://nimb.ws/vREd6X

@centoasa, you can download zip here: https://github.com/PrestaShop/ps_facetedsearch/releases
Can I close this issue? your ps_facetedsearch issue is similar to this ticket: #13938
THanks!

Thanks a lot @khouloudbelguith Now all works charme!
Please close this issue!

@centoasa, great!
Feel free to open a new one when needed.

Thanks!

And now the smarty clear cache button works well!

@khouloudbelguith
Hi,
I had the same problem on a 1.7.5.1. The main problem came from the generation of var/cache/prod|dev/appParameters.php without any permissions set.

AND I followed the @centoasa workaround here.
SO Disabling the Zend Opcache solved the problem.

This issue is very closed and linked to issue #13050.

I think that it would be wiser to re-open the issue while it is not cleared solved with OPcache enabled. And it would be wiser to not consider it as solved with some cache workaround manipulations that we are not sure of the real effects...

Because the problem appears whereas I followed the PHP-FPM optimizations we can expect from the official PrestaShop documentation: See devdocs
So disabling the Zend Opcache does not respect PrestaShop setup optimizations expectations as they are indicated in devdocs, I quote the doc below:

Also, your favorite ecommerce project made sure it鈥檚 fully compatible with OPCache.

Hi @fmipsylone,

Your issue seems to be similar to this: https://github.com/PrestaShop/PrestaShop/issues/10998
& it is fixed by following these steps: https://github.com/PrestaShop/PrestaShop/issues/10998#issuecomment-476361695
Fixed with this PR: https://github.com/PrestaShop/docker/pull/193
Thanks!

Thank you @khouloudbelguith,

This seems to work for me !
Just to notice that opcache.fast_shutdown has been deleted start from PHP 7.2, so the remaining settings I use are:

opcache.revalidate_freq = 0
opcache.validate_timestamps = 1

May be It would be interesting to mention that in PrestaShop devdoc page

Thanks.

@fmipsylone, thanks to open a new issue in the docs repository.

Thanks!

@centoasa, Could you please try to configure your smarty by disabling the cache, set the option "Template compilation" to Force compilation and clear cache.
Thanks to check and feedback.

Hello @khouloudbelguith I've the same problem here, but I cannot access to PS Backoffice to force the cache compilation. How can I get the same result using only files and db access?

I've already checked if the PS_SMARTY_CACHE, PS_JS_THEME_CACHE, PS_CSS_THEME_CACHE params were set to 0 in the PS_CONFIGURATION table and they were; then I set also _PS_SMARTY_FORCE_COMPILE_ to 1. None of these changes helped me.

Thanks

Was this page helpful?
0 / 5 - 0 ratings