Describe the bug
It is a fresh install of prestashop and i got this error at 23% "Cannot download language pack "en""
To Reproduce
Steps to reproduce the behavior:
Just install prestashop 1.7.4.3 with PHP 7.2 (i don't know if it's because of php version)
Screenshots
Additionnal information
PrestaShop version: 1.7.4.3
PHP version: 7.2
Hi @titamrtn,
I did not manage to reproduce the issue with PS 1.7.4.3 & PHP v7.2.
The installation is ok.
But, it could be a problem of a network which is not available, as described in this issue: #10456 Thanks to check again & feedback.
Network work fine. But i tried the _"workaround"_ set .... $is_addons_up = false;
but still have the same result.
@titamrtn, if you try to enable the debug mode & re-install the shop, is there any exception?
You can enable the Debug Move using an FTP client (for instance the free Filezilla tool) to edit the config/defines.inc.php file. Find the following line in the file:
define('_PS_MODE_DEV_', false);
… and change it to:
define('_PS_MODE_DEV_', true);
Thanks!
There is no exception, just a deprecated warning on step 3 :"System compatibility"
Deprecated: Function create_function() is deprecated in /var/www/html/ps/var/SymfonyRequirements.php on line 551
Deprecated: Function create_function() is deprecated in /var/www/html/ps/var/SymfonyRequirements.php on line 700
Deprecated: Function create_function() is deprecated in /var/www/html/ps/var/SymfonyRequirements.php on line 551
Deprecated: Function create_function() is deprecated in /var/www/html/ps/var/SymfonyRequirements.php on line 700
Also i tried download and install ps 1.7.4.4 and i have the same issue
Hi @titamrtn,
About the Deprecated: Function create_function() is deprecated in /var/www/html/ps/var/SymfonyRequirements.php
, it is a different issue. Here's the PR: https://github.com/PrestaShop/PrestaShop/pull/9409 to solve the issue.
It is fixed in the next release 1.7.5.0.
What is the country/language did you chose during the install?
Thanks!
I tried both french and english. Got similar error Cannot download language pack "fr/en". There is no default language pack included in installation? I think it can be good to have default language(maybe english) which can be used when download failed.
@titamrtn, is there any errors in your PHP file log?
Thanks!
Nothing in php and apache2 log
@titamrtn, could you try to install Prestashop in another host, check & feedback.
Thanks!
I got same result in another host. I also tried in another computer with same config. Still have the same error.
Hi @khouloudbelguith ,
Is there any way to download language pack manually and skip this part of installation?
Hi @titamrtn,
Try to remove ./app/Resources/translations/en-US/en-US.zip and retry. Look like something goes wrong during download.
Thanks!
There is no ./app/Resources/translations/en-US/ directory. the only directory is /app/Resources/translations/default
@titamrtn, 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!
Hello
I actually faced same issue running Prestashop from docker container based on docker-compose file which it self cause issues at the beginning of containers setup
Ps version 1.7.4.4, second refresh and program run correctly
Something is unstable!
Hi @alouimohamedhabib,
Did you use this solution https://github.com/PrestaShop/PrestaShop#docker-compose to deploy PrestaShop?
Thanks!
In my case i used both the docker-compose file from downloaded zip und from github repo https://github.com/PrestaShop/docker
I have the same problem with installing 1.7.4.4 on Fedora 29 with apache httpd. I think the problem is that the default configuration of SELinux and the new default way of running PHP with FastCGI (php-fpm) are inconsistent. Or I misconfigured the SELinux in some strange unknown to me way.
I did some debugging of the installation of PrestaShop and turns out all the "curl_exec" calls during the installation return "false", and when it fails to download the translations it throws exception and halts the installation. Unfortunately I have no idea (yet) how this SELinux thing works, so I cannot precisely configure it to allow my php-fpm service to access the internet, but when I shut it down with "setenforce 0", then the install of PrestaShop pass Ok. Another way out of this situation is, I guess, to switch the php to run in the old way with mod_php in httpd.
So I'll have to learn a bit SELinux to understand how to tune it to let my php-fpm to communicate with the world. Does anybody have some quick advice on the subject?
You can check what is needed to do on "httpd" you can use:
getsebool -a | grep httpd
or directly:
setsebool -P httpd_enable_cgi on
setsebool -P httpd_unified on
setsebool -P httpd_builtin_scripting on
Thank you very much for the guideline.
I checked those 3 options, and they were already enabled (I suppose by default), but it wasn't enough.
I saw in my /var/log/audit/audit.log that it adds the following lines during the PrestaShop installation:
denied { name_connect } for pid=xxxx comm="php-fpm" dest=80 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=0
So I searched a little further and found this article at Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1528722
I tried the first suggestion and enabled the 'httpd_can_network_connect'.
After that the installation of PrestaShop 1.7.4.4 passed well.
I am not sure if that is the optimal thing to do from security point of view though...
Thanks again.
I have the same problem on Ubuntu 18 with prestashop 1.7.4.4 and php 7.2
Hi @neocarvajal,
As I said before, it could be a problem of a network which is not available.
Thanks to check again & feedback.
Hi,
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
I invite you to contact our support team: http://addons.prestashop.com/en/388-support to help you solve your issue.
Thanks!
Hello! Same problem. Prestashop 1.6.23 Cannot install language "Русский (Russian)"
HI @kalugauli,
This issue is currently closed, can you open a new one with more information about your configuration.
Thanks!
you can read my tutorial in comment this
https://github.com/PrestaShop/PrestaShop/issues/10161#issuecomment-465403165
This video has the fix (a hack!) https://www.youtube.com/watch?v=_rVxHGdzSeY
Just remember to remove the comments after successful installation :)
Change the PHP version to 7.1 or 7.2 , restart all services. Drop your database and create a new one. Best you restart your system too. Then begin your prestashop installation again.
Hope this helps someone.
Error because of Slow network
I successfully installed using the command line.
Summary: I installed it all day.Found that the language pack cannot be downloaded because of the network.
I ended up using SS proxy.finish installation.
Share as follows:
php index_cli.php --db_server=127.0.0.1:8889 --db_name=prestashops --db_user=root --db_password=root --language=en —country=fr —firstname=Demo —lastname=Prestashop —[email protected] —password=prestashop_demo —db_create=1
I solved with setsebool -P httpd_can_network_connect on
Most helpful comment
Thank you very much for the guideline.
I checked those 3 options, and they were already enabled (I suppose by default), but it wasn't enough.
I saw in my /var/log/audit/audit.log that it adds the following lines during the PrestaShop installation:
denied { name_connect } for pid=xxxx comm="php-fpm" dest=80 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=0
So I searched a little further and found this article at Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1528722
I tried the first suggestion and enabled the 'httpd_can_network_connect'.
After that the installation of PrestaShop 1.7.4.4 passed well.
I am not sure if that is the optimal thing to do from security point of view though...
Thanks again.