Php artisan optimize: error 500

Hey!
I’m running several IN5 installations to test, as I’m often running into problems when updating my productive IN5 instance.
I forgot the password to one of my test apps, so I tried this: Resetting User Password From Server/Database - #2 by hillel
After that I ran php artisan optimize.
That worked:

 INFO  Caching the framework bootstrap files.

  config .......................................................... 107ms DONE
  routes .......................................................... 162ms DONE

But since then I get an error 500 when directly assessing this instance, and also when trying /update?secret=secret.
I then copied over the latest full zip file, but it didn’t help.
There’s nothing in laravel.log nor in the server log files.
Do you have any idea what I could do?

Hi,

Are there any details about the 500 error in storage/logs?

Hey Hillel
Thanks for your reply!

No, absolutely nothing. Just the daily cron success logs:

[2022-08-26 00:00:02] production.INFO: updating currencies  
[2022-08-26 06:00:02] production.INFO: Performing Autobilling 2022-08-26 06:00:02

I’m definitely running PHP 8.1.

try running

composer dump

if that doesn’t yield any results, you may want to change APP_DEBUG=false to APP_DEBUG=true

then run optimize again and access the site, you should at least see an error page with the exact error message at that point.

1 Like

Hey @david
Thanks a lot!
There was an error with the log files:

file_exists(): open_basedir restriction in effect.

I found a solution here: php - Laravel: Move files from local server to Production server and I am getting this error open_basedir restriction in effect - Stack Overflow

  1. Delete bootstrap/cache/config.php
  2. Delete all log files in storage/logs.
1 Like

Thanks for sharing the solution!

We’ve heard reports of the “open_basedir restriction in effect.” error forever, I didn’t know there was a manual workaround.

1 Like