500 server error fresh install Prestashop

I recently attempted a fresh install of Prestashop but was confronted with the following error when I tried to install via the GUI.

500 internal server error.

Edit┬ádefines.inc.php file, change┬ádefine(‘_PS_MODE_DEV_’, true) and re-upload with FTP. This will allow errors to be output so we can try ascertain why the 500 server error is occurring.

Try and access the install directory again – typically that’s www.yourdomain.com/install/ . In my case I was then presented this error:

Fatal error: Class ‘ZipArchive’ not found in /var/www/web-owner/data/www/yourdomain.com/classes/Language.php on line 979

(At least I had a clue as to what was causing the 500 server error). PHP requires that the zip extension is active in order for the install to work.

If you have root access to your VPS (especially under CPanel) you can enable this option (tick the box under the PHP settings next to ‘Zip’) via EasyApache 3 (and probably under EasyApache 4 as well) via the “Exhaustive Options List”.

Recompile and voila!

The usual caveats apply about this being the solution in my particular circumstances – and always ensure you can revert your changes from a working backup.

Thanks to this post for steering me in the right direction:

  1. https://www.prestashop.com/forums/topic/579207-error-while-trying-to-install-1702/

See also the introduction to EasyApache here.