Jump to content

Recommended Posts

i all,

 

So since yesterday we randomly are experiencing server 500 errors. I have been searching for the past 2 days and it is driving me insane I cannot find the issue. When debugging is enabled, everything works fine. When disabled we get internal servers 500 errors in the backend, but also in the front end.

Details
Prestashop version: 1.7.1.2
PHP version: 5.6.33-0+deb8u1
Memory limit: 512M
Domain: www.milanisapparel.com

 

Current .httacces

cc# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on


#Domain: milanisapparel.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

When trying to clear cache we get permission errors even though file permission are correct, i triple checked (755 folders/644 files)
Clear cache error

 

Whoops, looks like something went wrong.
1/1
UnexpectedValueException in smarty_internal_utility.php line 242:
RecursiveDirectoryIterator::__construct(/sites/milanisapparel.com/www/app/cache/dev/smarty/compile/8d/bd): failed to open dir: Permission denied
in smarty_internal_utility.php line 242
at RecursiveDirectoryIterator->__construct('/sites/milanisapparel.com/www/app/cache/dev/smarty/compile/8d/bd', '0')
at RecursiveDirectoryIterator->getChildren() in smarty_internal_utility.php line 242
at Smarty_Internal_Utility::clearCompiledTemplate(null, null, null, object(Smarty)) in Smarty.class.php line 1469
at Smarty->clearCompiledTemplate() in Tools.php line 3013
at ToolsCore::clearCompile(object(Smarty)) in Tools.php line 3027
at ToolsCore::clearSmartyCache() in AdminPerformanceController.php line 872
at AdminPerformanceControllerCore->postProcess() in Controller.php line 194
at ControllerCore->run() in Dispatcher.php line 369
at DispatcherCore->dispatch() in index.php line 95

 

When I try to disable debugging, under advanced parameters -> Smarty cache I get the error:

 

Error: Could not write to file. Make sure that the correct permissions are set on the file /sites/milanisapparel.com/www/config/defines.inc.php

 

What i already have tried:

-Delete and regenerate HTacess file
-Compile and cache folders are empty with just the index.php (/www/cache/smarty/cache and /www/cache/smarty/compile
-Restore backup, older backups have the same problem
-Disabled modules
-Deleted modules

-Checked all file permission, folders are set 755 and files 644.
 

If anyone has any idea it would be much appreciated.

 

20713707.jpeg

Link to comment
Share on other sites

  • razaro changed the title to Server error 500 is driving me crazy.

Try to delete 

/sites/milanisapparel.com/www/app/cache/dev

and

/sites/milanisapparel.com/www/app/cache/prod

 

On side note to try to make test shop and try to upgrade to latest 1.7 and also try some PHP 7 version.

Link to comment
Share on other sites

2 hours ago, razaro said:

Try to delete 


/sites/milanisapparel.com/www/app/cache/dev

and


/sites/milanisapparel.com/www/app/cache/prod

 

On side note to try to make test shop and try to upgrade to latest 1.7 and also try some PHP 7 version.


Ok I deleted the files inside the folders, errors persist.

 

When I try to disable debugging in backend I get:

 

2 errors 
Before being able to use this tool, you need to: <br />- Create a blank .htaccess in your root directory. <br />- Give it write permissions (CHMOD 666 on Unix system).
Error: Could not write to file. Make sure that the correct permissions are set on the file /sites/milanisapparel.com/www/config/defines.inc.php

 

When I try to clear cache in backend I get:

 

Whoops, looks like something went wrong.
1/1
UnexpectedValueException in smarty_internal_utility.php line 242:
RecursiveDirectoryIterator::__construct(/sites/milanisapparel.com/www/app/cache/dev/smarty/compile/8d/bd): failed to open dir: Permission denied
in smarty_internal_utility.php line 242
at RecursiveDirectoryIterator->__construct('/sites/milanisapparel.com/www/app/cache/dev/smarty/compile/8d/bd', '0')
at RecursiveDirectoryIterator->getChildren() in smarty_internal_utility.php line 242
at Smarty_Internal_Utility::clearCompiledTemplate(null, null, null, object(Smarty)) in Smarty.class.php line 1469
at Smarty->clearCompiledTemplate() in Tools.php line 3013
at ToolsCore::clearCompile(object(Smarty)) in Tools.php line 3027
at ToolsCore::clearSmartyCache() in AdminPerformanceController.php line 872
at AdminPerformanceControllerCore->postProcess() in Controller.php line 194
at ControllerCore->run() in Dispatcher.php line 369
at DispatcherCore->dispatch() in index.php line 95

 

Now I can get back in the admin area when I turn debugging off, some pages/functions in backend still end up with Internal server errors. During checkout we also get the blank page when debugging is off(internal server error).

 

Other useful info:

SERVER INFORMATION

  • Server information: Linux #68 SMP Wed Jan 10 12:08:52 CET 2018 x86_64
  • Server software version: Apache
  • PHP version: 5.6.33-0+deb8u1
  • Memory limit: 512M
  • Max execution time: 60
  • Upload Max File size: 2M

 

 DATABASE INFORMATION

  • MySQL version: 10.1.30-MariaDB-1~jessie
  • MySQL server: localhost
  • MySQL name: milanisapparel_com_MilaniP
  • MySQL user: mila_com_MilaniP
  • Tables prefix: pr_
  • MySQL engine: InnoDB
  • MySQL driver: DbPDO

 

 STORE INFORMATION

  • PrestaShop version: 1.7.1.2
  • Shop URL: http://milanisapparel.com/
  • Current theme in use: alysum

Error_backend.jpg

Displayed Error:

Warning on line 2181 in file /sites/milanisapparel.com/www/classes/controller/AdminController.php
[2] file_put_contents(/sites/milanisapparel.com/www/config/xml/default_country_modules_list.xml): failed to open stream: Permission denied

Warning on line 2185 in file /sites/milanisapparel.com/www/classes/controller/AdminController.php
[2] file_put_contents(/sites/milanisapparel.com/www/config/xml/modules_native_addons.xml): failed to open stream: Permission denied

 

Edited by milanisapparel (see edit history)
Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...