2

I'm new to laravel, My commands of PHP artisan were working fine in localhost. When i shifted my project to live server the commands stopped working and gives me following error:

Warning: require(): Invalid date.timezone value 'GST', we selected the timezone 'UTC' for now. (I fixed this by defining my timezone) Parse error: syntax error, unexpected '?' laravel/framework/src/Illuminate/Foundation/helpers.php on line 500

There are actually no errors the project is working fine,My PHP version is 7.2.10. I'm inside the directory where PHP artisan is installed but of no use. I hope I have to clear the cache but how can I clear cache when my artisan commands are not working? Any ideas?

Saurabh Mistry
  • 12,833
  • 5
  • 50
  • 71
Sania Ishaq
  • 67
  • 10

4 Answers4

2

try to change version in apache

find total install version in server

sudo update-alternatives --config php

then select one version then check php version again.

sudo php -v

second way u can do by this command

sudo a2dismod php5.6   //disable old version 
sudo a2enmod php7.2    //enable new version

and restart apache2 server

sudo service apache2 restart 

and check php version

sudo php -v

for more better understanding see

Jignesh Joisar
  • 13,720
  • 5
  • 57
  • 57
0

did you install composer and packages? with composer install command on the server.

0

You should perform below steps.

1) First you have to check the apache is starting or not.

2) Then you have to Install the composer and command like (i.e. composer update)

3) You have to clear cache and command like below

1) php artisan config:cache
2) php artisan view:clear

0

Downgraded the PHP version to 7.1 and upgraded the system to same php version. Got some exceptions later but it resolves the issue.

Sania Ishaq
  • 67
  • 10