Prestashop: Installing Prestashop 1.7.5.x with PHP 5.6 fails

Created on 16 Apr 2019  路  31Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
I had the same issue of L3o-pold 1 month ago (https://github.com/PrestaShop/PrestaShop/issues/12779)
By changing of PHP version (v5.6.40 -> v7.0) I have found a solution and I passed the cap of 12%.
Right now, at 23% of installation process, I have an another issue. I have the error :

Warning: Invalid argument supplied for foreach()

Do you know what to do to fix it ?
Is it due to the fact, as L3o-pold, I can not activated OPCache (_as our website is in on shared hosting at Infomaniak_) ?

Thank you for your answers and your help.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://example.com/e-commerce/install page with a web hosting in PHP 5.6 and Prestashop 1.7.5.0 or 1.7.5.1
  2. Follow the install steps until the installation start
  3. See error

Screenshots
erreur_installation_presta_1751_01

Additionnal information
PrestaShop version: Prestashop 1.7.5.1
PHP version: 5.6.40 and then 7.0

1.7.5.1 IN No change required

All 31 comments

Hi @wikao2,

Could you please try to upgrade your PHP version to 7.1.

Thanks!

This could be related to a connectivity issues we currently have on *.prestashop.com.

Would you mind trying again in a few minutes?

@khouloudbelguith
I switched to PHP v 7.2 but it did not fix the problem

@wikao2, it could be a problem of a network which is not available, as described in this issue: #10456 Thanks to checking again & feedback.

@khouloudbelguith
How and where can I "replace the current PHP with asynchrone JS code" as ttoine said as a solution ?

Hi @wikao2

This is not related to OPcache, which is not required for running PrestaShop. OPCache just improves performance.

Did you try again to rule out the platform issues that we had yesterday?

@eternoendless
Do you want to talk about the connectivity issues that Quetzacoalt91 mentioned yesterday?
I just try again, but it still does not work in PHP v 7.0
It goes quickly from 12-13% to 24-25%, then it runs for almost 1 minute and there again error
_Warning: Invalid argument supplied for foreach ()_

You say that this is not related to OPCache, maybe, (very surely even) but when L3o-pold (and me) mentioned the 500 error that occurred at 12-13% of the installation of Prestashop under PHP 5.6 .40, your colleague khouloudbelguith replied that she could not reproduce the error, that she was very good at installing Prestashop 1.7.5.1 and that, basically, it was not linked, this time, to the PHP version, implied "Circulate, there is nothing to see". But I was able to solve this issue of error 500 by changing version of PHP.

So you are certainly an expert in Prestashop (since you are developing it), and I am very badly placed to say that you are always wrong but when you do not find the solution to an issue that your users encounter, it would be good to explore other tracks including those evoked by users themselves because they, even if they are not experts, have a different look, a different approach and they have information that you do not have (as here OPCache which can not be enabled on shared hosting).
What I'm saying is that if your colleague khouloudbelguith did not stop at "I can not reproduce the problem, it's that there is no problem" (as a saying Shadock " If there is no solution, it is that there is no problem ") and that she had continued to seek the solution by having a different approach, she would have found that it was necessary to change version of PHP to resolve 500 L3o-pold error.

To come back to my issue, it is not a problem of version of PHP (because I tried in PHP 7.2, there is always the problem), it is not a problem of platform or connection to Prestashop.com as said Quetzacoalt91 because I just tried, it still does not work, and you say it's not related to OPCache.
So what other track are you proposing?

Could you please provide more information about your hosting ? your provider and the plan you are using, Apache version, Mysql version, configuration information of the server if any is provided ?

We are in shared hosting at Infomaniak
PHP: 7.0 (before 5.6.40)
Apache: 2.4.34
MySQL (not sure): 5.6

Offer: web

I can give you more infos about PHP info, but there are (too) many

Hi @wikao2,

are you trying to install the shop behind a proxy server?
It could be a problem & it will be stopped by the proxy filters.
Thanks!

could you please enable PHP 7.2 on your hosting?
@khouloud, this is a share hosting, there is no proxy.

@khouloudbelguith
No I did not install the shop behind a proxy server.
In fact, we already have a shop running with Prestashop 1.6.1.5.
We bought on Addons a module to migrate from Prestashop 1.6.1.5 to Prestashop 1.7.5.1
A support person of this module told me to create a folder at the root of the site, to put the Prestashop 1.7.5.1 files (downloaded from Prestashop's website), to create a database for Prestashop 1.7. 5.1 and go to the address https://my.web.site/presta1751/ to install Prestashop 1.7.5.1
That's where I am.

@ttoine
I have enable PHP 7.2, I even drop the Prestashop 1.7.5.1 data base to have a clean version, but it still does not work, sorry. I'm still stuck at 23% with the same error

@wikao2, for upgrading your shop, you can use the 1-click upgrade module of PrestaShop: https://github.com/PrestaShop/autoupgrade/releases/tag/v4.7.0

Thanks!

did you check the read and write rights on the installation folder? what is your hosting provider expecting for a CMS ?
BTW, using "migration pro" is a good idea if you are using a shared hosting. The migration process is very smooth and well adapted to low budget/performance servers.

if I understand well, you have already a 1.6 shop running on the same hosting, right?
in this case I would try to enable PHP 7.1 in the hosting configuration and check if the current shop is still ok. Then, delete folder "presta1751" and its content, and recreate it and check the rights. Then, relaunch the 1.7.5 installer.

After browsing through various forums on the Internet about the problem I'm experiencing, I've already changed the rights (recursively) Presta1751 files and subfolders to 755
Otherwise, actually, I already have a shop running Prestashop 1.6.1.5. It works "relatively" well in PHP 7.1. "Relatively" because I have some problems with a "homemade" module developed by the previous webmaster. However, it is a module that runs in back office and that we do not need all the time. When we need it, I go back to the store in PHP 5.6 because it is very easy to change PHP version with Infomaniak.
In addition, we will call on a developer to update the various homemade modules. So this concern with the homemade modules will not be one in a while.
What annoys me now is this problem of installation of version 1.7.5.1 of Prestashop

(_Small precision that may be important_) In step "System Compatibility", in addition to the message about PHP Accelerator, I had a warning "_ICU system package and the intl PHP extension_ ". However, it's the same problem as with "_PHP Accelerator_" (OPCache), being in shared hosting, I can not "_upgrade the ICU system package and the intl PHP extension_".
I specify that because my problem during the installation intervenes at 23% at the time of the "_Creation of the default shop and the languages_". It may be related, right?

ok so your installation fails during the installation of the languages, and you need the intl PHP extension for that.
you can not enable that by yourself, but this is something to ask to the support of your hosting provider. they will be able to tell you if they can do it or what is the workaround on their platform.

ping @khouloudbelguith could you please try an to install the 1.7.5.1 with "intl" PHP extension disabled? and check what is the issue with the ICU system package ?

Hi @ttoine,

I will check & feedback.
Thanks!

@ttoine, I cannot complete the install of the PrestaShop 1.7.5.1 when "intl" PHP extension disabled.
image
PS: I tried with PHP5.6.40
Thanks!

thanks :-)
could you please confirm that this also the case with 1.7.4, or if this is a regression ?

@khouloudbelguith
And if you try not by disabling the extension INTL but with an "old" version of ICU (52.1 in this case) ?

@wikao2 could you please provide the same screenshot than Khouloud ? so we could see the warnings and the state of the "next" button

@wikao2, I tried with an "old" version of ICU 52.1 & it is OK.
I attached a video record
https://drive.google.com/file/d/1sGO-88ezqb97Wz_ISPKHqAjsb0ppZfMq/view
@ttoine, I tried with PS1.7.4.4 & intl disabled, I have a green validation.
The installer now check the intl extension with this PR https://github.com/PrestaShop/PrestaShop/pull/11937
Thanks!

@khouloudbelguith you rock, thanks a lot for your time.
@wikao2 so maybe you have an issue with the file system. You should just delete the folder and files, and create a new folder with the good rights, upload fresh prestashop files and start the installation.

@ttoine
So you think that I just have to delete the presta1751 folder, that I recreate it, that I put Prestashop 1.7.5.1 files back there, and that I restart an installation right?
What do you mean by "good rights" ? What rights do I have to put? 755? 666?

start with 755.
but your hosting provider should provide the information about that in their documentation. sometimes, 644 is enough. that's the issue with shared hosting...

@wikao2, giving files or folders a "write permission" is called "doing a CHMOD 755" or "a CHMOD 775", depending on the host.
Some hosts might require you to use CHMOD 777, although it is not recommended for anything more than a one-time need.
If you have to use CHMOD 777 in order to install PrestaShop, make sure to switch to a safer setting (for instance, 775 for folders and 664 for files) once you are done installing.
Read your host's documentation carefully.
For more details, you can follow our official documentation http://doc.prestashop.com/display/PS17/Installing+PrestaShop

Hi @wikao2,

Since we had no news from you for more than 30 days, I'll close this ticket. Feel free to open another one if you can give specific details.

Thanks!

I had the same problem and was due to sql_mode having ONLY_FULL_GROUP_BY

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PrestaShark picture PrestaShark  路  3Comments

centoasa picture centoasa  路  3Comments

esistgut picture esistgut  路  3Comments

marionf picture marionf  路  3Comments

nrcjea001 picture nrcjea001  路  3Comments