Richieboooy Posted July 12, 2023 Share Posted July 12, 2023 I'm trying to install prestashop on my Ubuntu 22.04 LTS Server(with nginx) But the installer always times out when installing the templates. Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 13, 2023 Share Posted July 13, 2023 Hi, PHP has a timeout limit for script execution. You can try increasing this value to allow more time for the template installation process In php.ini file increase the value of max_execution_time setting, for example, to 300 (5 minutes). Restart your PHP and Nginx services after making the change. Try again after making this change. Link to comment Share on other sites More sharing options...
Richieboooy Posted July 13, 2023 Author Share Posted July 13, 2023 6 hours ago, AddWeb Solution said: Hi, PHP has a timeout limit for script execution. You can try increasing this value to allow more time for the template installation process In php.ini file increase the value of max_execution_time setting, for example, to 300 (5 minutes). Restart your PHP and Nginx services after making the change. Try again after making this change. I raised the max_execution_time to 300 but I still get the error. I've looked at the phpinfo and can see that the configh was successfully loaded. Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 14, 2023 Share Posted July 14, 2023 Hi, Also adjust the Nginx timeout settings. Look for the proxy_read_timeout directive in your Nginx configuration file (usually located at /etc/nginx/nginx.conf or within a virtual host configuration file). Increase its value to a higher value, such as 300 (5 minutes). Save the changes and restart Nginx. clear the cache and try again. Link to comment Share on other sites More sharing options...
Richieboooy Posted July 14, 2023 Author Share Posted July 14, 2023 Sadly didn't help. I also tried it on multiple browsers(Chrome, OperaGX) Link to comment Share on other sites More sharing options...
Richieboooy Posted July 15, 2023 Author Share Posted July 15, 2023 On 7/14/2023 at 9:03 AM, AddWeb Solution said: Hi, Also adjust the Nginx timeout settings. Look for the proxy_read_timeout directive in your Nginx configuration file (usually located at /etc/nginx/nginx.conf or within a virtual host configuration file). Increase its value to a higher value, such as 300 (5 minutes). Save the changes and restart Nginx. clear the cache and try again. I followed that tutorial: https://geekrewind.com/how-to-install-prestashop-on-ubuntu-20-04-18-04-with-nginx-and-lets-encrypt/ But since php7.4 is eol I used php8.2 (maybe this helps finding/resolving the problem) Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 17, 2023 Share Posted July 17, 2023 Okay, Let me know the PS version you are trying to install. Link to comment Share on other sites More sharing options...
Richieboooy Posted July 17, 2023 Author Share Posted July 17, 2023 4 hours ago, AddWeb Solution said: Okay, Let me know the PS version you are trying to install. latest Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 18, 2023 Share Posted July 18, 2023 21 hours ago, Richieboooy said: latest okay Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 18, 2023 Share Posted July 18, 2023 (edited) Hi, Kindly follow below steps to check if the issue resolves, Check CPU, memory, and disk usage during the installation process. Monitor the Nginx access and error logs. Clear cache and restart services If this doesn't work still, then Consider creating a new clean installation of PrestaShop just in case if that installs the template files properly. Edited July 18, 2023 by AddWeb Solution (see edit history) Link to comment Share on other sites More sharing options...
Richieboooy Posted July 18, 2023 Author Share Posted July 18, 2023 1 hour ago, AddWeb Solution said: Hi, Kindly follow below steps to check if the issue resolves, Check CPU, memory, and disk usage during the installation process. Monitor the Nginx access and error logs. Clear cache and restart services If this doesn't work still, then Consider creating a new clean installation of PrestaShop just in case if that installs the template files properly. The cpu and cache doesn't seem to be the problem, when I look at the prestashop error log file I see this:https://pastebin.com/WEtLfVPS Link to comment Share on other sites More sharing options...
AddWeb Solution Posted July 19, 2023 Share Posted July 19, 2023 19 hours ago, Richieboooy said: The cpu and cache doesn't seem to be the problem, when I look at the prestashop error log file I see this:https://pastebin.com/WEtLfVPS Hi, The error message you provided indicates that the constant _PS_DO_NOT_LOAD_CONFIGURATION_ is being defined multiple times, which is causing a PHP warning during the template installation process in PrestaShop. This could be a source of the timeout issue you're experiencing. The constant is defined in the file /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26. Verify if the constant is defined there. Also, search for any other occurrences of the constant in your PrestaShop files to check if it's defined elsewhere. If you find multiple occurrences of the constant _PS_DO_NOT_LOAD_CONFIGURATION_, remove all but one of them. Clear the cache and install again. This should resolve the issue. Let me know if this helps. Link to comment Share on other sites More sharing options...
Richieboooy Posted July 19, 2023 Author Share Posted July 19, 2023 2 hours ago, AddWeb Solution said: Hi, The error message you provided indicates that the constant _PS_DO_NOT_LOAD_CONFIGURATION_ is being defined multiple times, which is causing a PHP warning during the template installation process in PrestaShop. This could be a source of the timeout issue you're experiencing. The constant is defined in the file /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26. Verify if the constant is defined there. Also, search for any other occurrences of the constant in your PrestaShop files to check if it's defined elsewhere. If you find multiple occurrences of the constant _PS_DO_NOT_LOAD_CONFIGURATION_, remove all but one of them. Clear the cache and install again. This should resolve the issue. Let me know if this helps. This doesn't seems to be the problem. _PS_DO_NOT_LOAD_CONFIGURATION_ only occures in two files, the first is the mentioned smarty_compile.php and the other is inside the config folder a fallback option. Removing (commenting) these lines resultet in a 500 error to be thrown with the cause that _PS_DO_NOT_LOAD_CONFIGURATION_ isn't defined. I cleard everything, logs, configuration, prestashop webserver dir and remade everything. This now appeard in the logs: 2023/07/19 09:49:28 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/" 2023/07/19 09:49:28 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/" 2023/07/19 09:49:49 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:49:49 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:49:53 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:49:53 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:50:27 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:50:27 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:50:32 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:50:32 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:51:42 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:51:42 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26PHP message: PHP Fatal error: Uncaught Error: Undefined constant "_DB_PREFIX_" in /var/www/prestashop/classes/Configuration.php:175 Stack trace: #0 /var/www/prestashop/classes/Configuration.php(229): ConfigurationCore::loadConfiguration() #1 /var/www/prestashop/config/smarty.config.inc.php(28): ConfigurationCore::get() #2 /var/www/prestashop/install/controllers/http/smarty_compile.php(37): require_once('...') #3 /var/www/prestashop/install/classes/controllerHttp.php(190): require_once('...') #4 /var/www/prestashop/install/index.php(53): InstallControllerHttp::execute() #5 {main} thrown in /var/www/prestashop/classes/Configuration.php on line 175" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:52:15 [error] 3531653#3531653: *247 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "theme_name" on null in /var/www/prestashop/var/cache/prod/ContainerX0LFVLf/appAppKernelProdContainer.php on line 2906" while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?installDatabase=true&_=1689753129566 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" 2023/07/19 09:53:46 [error] 3531653#3531653: *247 upstream timed out (110: Unknown error) while reading response header from upstream, client: 129.143.170.58, server: <MyShopDomain>, request: "GET /install/index.php?installTheme=true&_=1689753129570 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock", host: "<MyShopDomain>", referrer: "https://<MyShopDomain>/install/index.php" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now