Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error, unexpected '?', expecting variable (T_VARIABLE) #154

Closed
ReeCrema opened this issue Feb 21, 2021 · 8 comments
Closed

syntax error, unexpected '?', expecting variable (T_VARIABLE) #154

ReeCrema opened this issue Feb 21, 2021 · 8 comments

Comments

@ReeCrema
Copy link

Server configuration

Client configuration (Your Computer)

  • Browser: Google Cloud VPS
  • Operating System: Debian 9

Description:

When I start install from the website after choosing a Client version he shows me that erros

`syntax error, unexpected '?', expecting variable (T_VARIABLE)

Backtrace:

#0 [internal function]: POT->loadClass('OTS_DB_PDOQuery')
#1 /var/www/html/system/libs/pot/OTS_Base_DB.php(26): spl_autoload_call('OTS_DB_PDOQuery')
#2 /var/www/html/system/libs/pot/OTS.php(316): include_once('/var/www/html/s...')
#3 [internal function]: POT->loadClass('OTS_Base_DB')
#4 /var/www/html/system/libs/pot/OTS_DB_MySQL.php(25): spl_autoload_call('OTS_Base_DB')
#5 /var/www/html/system/libs/pot/OTS.php(316): include_once('/var/www/html/s...')
#6 [internal function]: POT->loadClass('OTS_DB_MySQL')
#7 /var/www/html/system/libs/pot/OTS.php(373): spl_autoload_call('OTS_DB_MySQL')
#8 /var/www/html/system/database.php(98): POT->connect(Array)
#9 /var/www/html/install/includes/database.php(6): require('/var/www/html/s...')
#10 /var/www/html/install/steps/5-database.php(51): require('/var/www/html/i...')
#11 /var/www/html/install/index.php(216): require('/var/www/html/i...')
#12 {main}`

Steps To Reproduce:

@slawkens
Copy link
Owner

What Php Version?

You can check this by writing in console:

php -v

@ReeCrema
Copy link
Author

PHP 7.0.33-0+deb9u10 (cli) (built: Oct 6 2020 17:08:28) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-0+deb9u10, Copyright (c) 1999-2017, by Zend Technologies

@slawkens
Copy link
Owner

Upgrade your PHP to minimum 7.1, I have currently no other solution for this.

@ReeCrema
Copy link
Author

I upgrade to 7.4

PHP 7.4.15 (cli) (built: Feb 20 2021 05:33:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.15, Copyright (c), by Zend Technologies

but still the same error...

I tryied do in my Local Machine (windows) and everything works...
I think its something because Google Cloud VPS... But I dont find the problem...

@slawkens
Copy link
Owner

You also need to update your apache2/nginx config to use that php version. This problem exist only on php version 7.0 and lower.

@ReeCrema
Copy link
Author

Hello!
Sorry, do you have any tutorials or what I need to conf in apache2?
I was looking, but I found nothing.

@slawkens
Copy link
Owner

Execute this in your terminal:

sudo a2dismod php7.0
sudo a2enmod php7.4
sudo service apache2 restart

@ReeCrema
Copy link
Author

Worked !!!
Thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants