1

I have a website made on Laravel 5.3 that was working fine under PHP 7.0

I found some errors on the site and after looking online for a solution, the unanimous cause was that the laravel and php versions are not compatible.

I then went to check my composer.json file and saw that the minimum version of php needed is 7.1 and up.

I told my hosting company to update PHP to 7.2 on my staging server and now when I try to access it, I get an error:

Oups ! Page not found ! (Error 404)

Error. Any idea if there's anything I need to do?

My Error Log: https://wetransfer.com/downloads/a89f6b95d3ab9bf1b4a8f231250de96220190730104107/cef049

Robin
  • 65
  • 1
  • 12
  • You need to add some more information. Logs, etc so we can see what laravel is doing. – LLJ97 Jul 30 '19 at 10:20
  • laravel 5.3 doesnt require php 7^. it works fine on php 5.6 but since you updated your PHP, do the same with laravel and update it. you can follow these guides for existing projects. https://laravel.com/docs/5.4/upgrade#upgrade-5.4.0 https://laravel.com/docs/5.5/upgrade https://laravel.com/docs/5.6/upgrade https://laravel.com/docs/5.7/upgrade https://laravel.com/docs/5.8/upgrade – N69S Jul 30 '19 at 10:39
  • @LLJ97 I just added the error log – Robin Jul 30 '19 at 10:41
  • You have to check the permissions of your application. Laravel tried to open a file in a folder without permission. If you're on linux you have to use `chmod` to give them. – LLJ97 Jul 30 '19 at 10:45
  • After I changed "laravel/framework" to "5.7.*" to go along with the php update. – Robin Jul 30 '19 at 10:49
  • I stopped getting the 404 error but now im getting these errors: http://az.kiriarabia.com/ar – Robin Jul 30 '19 at 10:49
  • @LLJ97 if you can, please check the page I mentioned, its a staging server. – Robin Jul 30 '19 at 10:49
  • `mcrypt` is deprecated with php 7.1 and removed with php 7.2. It is possible that you have set `rijndael-128` as your cipher in `config/app.php`. If so change it to `AES-CBC-256` – LLJ97 Jul 30 '19 at 10:54
  • It was set to MCRYPT_RIJNDAEL_128, I now changed it to 'cipher' => AES-CBC-256, but the issue is still there – Robin Jul 30 '19 at 11:00
  • Please refer to this question, which is exactly your problem. https://stackoverflow.com/questions/41031076/php7-1-and-laravel-5-3-function-mcrypt-get-iv-size-is-deprecated – LLJ97 Jul 30 '19 at 11:03

1 Answers1

0

From the error log, by default the storage folder has root permission, change the ownership of the storage folder to apache, as the apache writes logs on the storage folder

Ganesh
  • 25
  • 6