Search code examples
phpopencartopencart2.xhttp-status-code-500opencart2.3

OpenCart error 500 only for index.php


I have been trying to manually migrate OpenCart 2.3.0.2 from Plesk to cPanel and so far it has been working ok. I've uploaded all the files into the file manager's root directory and set both config.php files, the first one under the root directory, and the second one under the admin directory.

Now here goes the problem. Whenever I try to load the page (example.com), I get error 500. However, when I try to access the example.com/admin page, that one loads successfully. I have managed to log in there a half a dozen times. Also I have created a info.php file containing phpinfo(); and have put the latter file within the root directory. So then I tried to access example.com/info.php and that file loaded too. But getting example.com to work always returns error 500. I have even tried reuploading and replacing index.php file, but to no avail.

Please note that I have double and triple checked the config.php and admin/config.php files for typing errors and I'm pretty confident there are not any.

Any ideas what I should try next?


Solution

  • I don't know how I hadn't even noticed the existence of error_log file in root directory earlier, but while examining it I stumbled upon:

    PHP Fatal error: Call to undefined function utf8_substr() in /home/mydomain/public_html/system/storage/modification/catalog/model/tool/image.php on line 11.

    Searching online accordingly it returned this SO thread. I followed the instructions given in the last post of the original poster and my problem was solved. Both my website and the /admin work properly.