1

I just installed PrestaShop 1.7.2.0 and I'm getting error 500 when I'm trying to access /admin. My admin folder on FTP is renamed to admin[random_string] (how? why?). Frontend seems to be working ok.

When I remove /admin/.htaccess I get 404, when I put it back, I get 500. I did change anything inside of it.

What could be a problem?

defuzed
  • 568
  • 5
  • 17
o..o
  • 1,789
  • 5
  • 31
  • 59
  • Any help pls? Will appreciate anything – o..o Aug 01 '17 at 05:24
  • a) have you deleted the `install` folder (not sure right now if this is still necessary with 1.7.x)? b) if that doesn't work / is not needed please look at the contents of the apache logs *edit: just read your comment to the first answer* - you shoudl be able to find said log in `/hosting/www/[your_site]/www/error.log` – defuzed Aug 01 '17 at 15:42

3 Answers3

2

After the installation if you have not renamed the admin folder PrestaShop does it for you, for security reason. So in your case the folder was renamed as admin[random string], if you want you can rename it as you want.

Obviously now to access to the backoffice you have to use the 'new' path, for example in your case, http://www.myshop.com/admin[random string]/ and not http://www.myshop.com/admin/

marsaldev
  • 3,338
  • 2
  • 16
  • 27
  • Well, the same result (error 500) I get even accessing http://www.myshop.com/admin881ooxfdf/ – o..o Aug 01 '17 at 10:30
  • Have you activated the debug mode? – marsaldev Aug 01 '17 at 10:32
  • If you think `define('_PS_MODE_DEV_', true);`, yes, but still I see just error 500 :| – o..o Aug 01 '17 at 10:33
  • Yes, have you activated the display errors and changed the error level to display on your hosting? – marsaldev Aug 01 '17 at 10:35
  • I have this in my .user.ini file: `log_errors = 1 error_reporting = E_ALL & ~E_DEPRECATED error_log = /hosting/www/sperkovani.cz/www/error.log `When I try to divide by zero in a script not related to Prestashop, I get an error record. But this error 500 of prestashop administration is not writing to log... – o..o Aug 01 '17 at 10:37
  • Try this settings: `display_errors = On` `error_reporting = 32759` – marsaldev Aug 01 '17 at 10:40
  • I changed the file to `log_errors = 1 display_errors = On error_reporting = 32759` but with no change of result – o..o Aug 01 '17 at 10:45
  • Ok, renaming .htaccess in admin folder helped. Should I keep it disabled? – o..o Aug 01 '17 at 11:03
  • Can you post, in the question, the content of the .htaccess? – marsaldev Aug 01 '17 at 11:34
1

If your server is running Windows, comment this two rules under admin[random_string]/.htaccess

# If the URL is a legacy on index.php?controller=..., do not rewrite (let the legacy take it)
     RewriteCond  %{QUERY_STRING} (^|&)controller=|(^|&)tab=
     RewriteRule .* - [P]
mikro
  • 125
  • 7
0

Need to increase memory_limit to 512M and max_execution_time to 300 in php.ini

    memory_limit=512M
    max_execution_time=300
Koustav
  • 556
  • 5
  • 7