-
Local Machine Live Server I am getting this error when I move my laravel project to live server .What would be the problem and how can I get around it. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Are you sure your live server is PHP 7.2? https://github.com/symfony/polyfill-php80/blob/master/bootstrap.php#L23 The error seems to hint at return types not being supported. |
Beta Was this translation helpful? Give feedback.
-
I have a similar problem when using composer or artisan command but no problem in cgi.
In my case, i specify the php version in command and it work.
Make sure your apache/nginx is listening the port of php7. |
Beta Was this translation helpful? Give feedback.
-
I finally fixed it by deploying the Laravel app on fresh server with
I followed the procedures outlined here to install the environment >> Also I installed Apache and mysql Then configured server to enable .htaccess by adding this to my vhost:
Added the following on 000-default.conf whereby public is my public folder in my laravel app
Then have mod_rewrite enabled.
Finally restart apache service;
I hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Why this happens. I uploaded laravel project on the server where PHP is 7.3 I change it to 7.4 and back to 7.3 and it runs. No matter it is PHP 7.3 or 7.4 but the first setup shows the error and changing and back to the same fixes it...? |
Beta Was this translation helpful? Give feedback.
-
Your laravel version not compatable with your Server |
Beta Was this translation helpful? Give feedback.
I finally fixed it by deploying the Laravel app on fresh server with
I followed the procedures outlined here to install the environment >>
PHP Install
[https://www.cloudbooklet.com/how-to-install-php-7-3-on-ubuntu-18-04/]
Also I installed Apache and mysql
Then configured server to enable .htaccess by adding this to my vhost:
Edited 000-default.conf
sudo nano /etc/apache2/sites-available/000-default.conf
Added the following on 000-default.conf whereby public is my public folder in my laravel app
Then have mod_rewrite enabled.