Jump to content

Syntax error on installing Prestashop Basic edition 8.1.1


jameswill

Recommended Posts

Hello,

I was in the process of installing Presta Shop basic edition 8.1.1 downloaded from https://prestashop.com/prestashop-edition-basic/  on Centos 7 with PHP 7.2/7.3, MYSQL 5.7, Apache 2.4.

(Checked demo data , all modules while install)

However , when script tries to install modules , I got HTTP 500 error . So to debug further I tried enabling debug via

config/defines.inc.php i.e :

/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', false);
}  

 

And tried to re-install to check the exact error . The script throws the following error i.e :

1/1)
ParseError

syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST)
in ps_edition_basic.php line 29
at ModuleDataProvider->PrestaShop\PrestaShop\Adapter\Module\{closure}('ps_edition_basic')in ModuleDataProvider.php line 331

 

However, script seems to be working fine on PHP 7.4.

Have enclosed the screenshot of the same .

I can see that Prestashop 8.x.x supports 7.2 and above .

https://devdocs.prestashop-project.org/8/basics/installation/system-requirements/#php-requirements

 

Are PHP requirements changed or is this a bug ?.  Could you please kindly replicate this at your end and fix this?

presta_err.png

Edited by jameswill (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello,

I've got the same problem , when trying to install PS 1.8.1.1 on my testing Centos 7.9 (with Apache/2.4.6 (CentOS) PHP/7.4.33 and MySQL version: 5.5.68-MariaDB) . And just like severall of my predecessors said the error messages started with module-installing sections and it looks just like :

[Wed Nov 01 01:53:21.506077 2023] [php7:notice] [pid 16046] [client 192.168.xx.xx:37144] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 01:53:22.574129 2023] [php7:notice] [pid 16047] [client 192.168.xx.xx:37145] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 01:53:22.820724 2023] [php7:notice] [pid 16054] [client 192.168.xx.xx:37146] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/ContainerTsfCJnz/appAppKernelProdContainer.php on line 3416, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 01:53:27.796655 2023] [php7:notice] [pid 16054] [client 192.168.xx.xx:37146] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/ContainerCj5fiol/appAppKernelProdContainer.php on line 2868, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 01:59:29.457321 2023] [php7:notice] [pid 16047] [client 192.168.xx.xx:37202] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/550725 2023] [php7:notice] [pid 16054] [client 192.168.xx.xx:37203] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php?restart=true
[Wed Nov 01 01:59:31.206709 2023] [php7:notice] [pid 16045] [client 192.168.xx.xx:37204] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/Container8F1Qxxl/appAppKernelProdContainer.php on line 2906, referer: http://192.168.vv.vv/prestashop3/install/index.php?restart=true
[Wed Nov 01 01:59:36.933756 2023] [php7:notice] [pid 16045] [client 192.168.xx.xx:37204] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/ContainerRHATLcZ/appAppKernelProdContainer.php on line 3416, referer: http://192.168.vv.vv/prestashop3/install/index.php?restart=true

(of course I've changed the last octets of IP addresses ) 

From the browser point of view - this looks like : 

 

2023-11-0102_26_10-AsystentinstalacjiPrestaShopOpera.thumb.png.5fe26b4e96d76ea96bcc0c45614dd25a.png

 

 

2023-11-0102_18_46-AsystentinstalacjiPrestaShopOpera.thumb.png.3baf1448e417eb26c4812e57aad44420.png

 

 

Do You PS Guys & Developers - know - WHAT is the real REASON OF THIS DISTURBING PROBLEM ??

And HOW TO better TROUBLESHOOT IT ???

 

(No, that's obviously not the problem of configuration php - I've tested severall configurations esp. with very enlarged time_liimits ... and so on - and nothing makes the difference at all !) 

Additionally - the problem DOES NOT affect the PS 1.7.xx versions - but only 1.8 releases !!

Regards 

Edited by markooff (see edit history)
Link to comment
Share on other sites

UPD 2 :

 

Just for testing purposes - I've tried to install another PS 1.8.1.1 with explicite NONE of modules (with unchecked option []Install Modules )

and the reason was

2023-11-0102_52_32-AsystentinstalacjiPrestaShopOpera.thumb.png.60b371a8b0fdcd636ac84c5d34677ea3.png

As You can see - there is the same error - 500 - appearing on the browser screen . And on the lower level (apache logs) - it looks like

 

[Wed Nov 01 02:50:01.465258 2023] [php7:notice] [pid 18023] [client 192.168.xx.xx:37562] PHP
 Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestas
hop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv
/prestashop3/install/index.php?step=welcome
[Wed Nov 01 02:50:02.557204 2023] [php7:notice] [pid 18054] [client 192.168.xx.xx:37563] PHP
 Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestas
hop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv
/prestashop3/install/index.php?step=welcome
[Wed Nov 01 02:51:17.552235 2023] [php7:notice] [pid 18022] [client 192.168.xx.xx:37582] PHP
 Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestas
hop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv
/prestashop3/install/index.php
[Wed Nov 01 02:51:17.603721 2023] [php7:notice] [pid 18044] [client 192.168.xx.xx:37583] PHP
 Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestas
hop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv
/prestashop3/install/index.php
[Wed Nov 01 02:51:20.518494 2023] [php7:notice] [pid 18044] [client 192.168.xx.xx:37583] PHP
 Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestas
hop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv
/prestashop3/install/index.php
[Wed Nov 01 02:51:20.596271 2023] [php7:notice] [pid 18022] [client 192.168.xx.xx:37582] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:24.609062 2023] [php7:notice] [pid 18022] [client 192.168.xx.xx:37582] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:24.664067 2023] [php7:notice] [pid 18025] [client 192.168.xx.xx:37584] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:35.159658 2023] [php7:error] [pid 18054] [client 192.168.xx.xx:37588] script '/var/www/html/prestashop3/install/sandbox/anything.php' not found or unable to stat, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:35.175930 2023] [php7:notice] [pid 18024] [client 192.168.xx.xx:37586] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:35.231977 2023] [php7:notice] [pid 18023] [client 192.168.xx.xx:37587] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:37.713038 2023] [php7:notice] [pid 18024] [client 192.168.xx.xx:37586] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:37.748135 2023] [php7:notice] [pid 18023] [client 192.168.xx.xx:37587] PHP Notice:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/html/prestashop3/install/controllers/http/smarty_compile.php on line 26, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:38.145719 2023] [php7:notice] [pid 18054] [client 192.168.xx.xx:37588] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/ContainerIuYwF60/appAppKernelProdContainer.php on line 3416, referer: http://192.168.vv.vv/prestashop3/install/index.php
[Wed Nov 01 02:51:42.744926 2023] [php7:notice] [pid 18054] [client 192.168.xx.xx:37588] PHP Notice:  Trying to get property 'theme_name' of non-object in /var/www/html/prestashop3/var/cache/prod/ContainerRtOxXAf/appAppKernelProdContainer.php on line 2868, referer: http://192.168.vv.vv/prestashop3/install/index.php

 

Link to comment
Share on other sites

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...