Install PrestaShop on Loopia hosting

PrestaShop (e-commerce platform) cannot be installed on Loopia hosting by default because the installation process does not allow the @ sign in the MySQL (database engine) username. This guide shows how to edit one validation file so the PrestaShop installer accepts the @ sign and lets you complete the setup.

This can easily be fixed by editing a file so that the installation script allows the @ sign.

Edit the Validate.php file

Before uploading the PrestaShop files to our server, you must edit the file /classes/Validate.php to update the username validation pattern.

Search for the line below (around line 760):

public static function isUnixName($data)
{
	return preg_match('/^[a-z0-9\._-]+$/ui', $data);
}

In this function you must add the @ sign so that it looks like below:

public static function isUnixName($data)
{
	return preg_match('/^[@a-z0-9\._-]+$/ui', $data);
}

Save the file and upload it to us. You should now be able to complete the installation process as usual.

Tested versions

This has been tested with PrestaShop versions 1.4.6.2 and 1.4.9. The step may change in future versions of PrestaShop.

Was this article helpful?

Related Articles