@birdietorerik
I never used forge / envoyer. I manage my own servers on AWS. So I know a bit about server paths etc...
Having said that, Forge is meant to make life easy for people who are not server experts.
Anyways, Backtracking to a previous post in this thread, you said you got a different error when you did this:
php8.1 /home/forge/test.easyflow.golf/current/artisan schedule:run
The error was:
The stream or file "/home/forge/test.easyflow.golf/releases/20240911092916/storage/logs/laravel-2024-09-11.log" could not be opened in append mode: Failed to open stream: Permission denied
The exception occurred while attempting to log: Class "App\Jobs\ProcessGpsDataJob" not found
Context: {"exception":{}}
There are 2 errors being highlighted in this:
- First error - not able to find the class "App\Jobs\ProcessGpsDataJob". This should ideally be in this path: "/home/forge/test.easyflow.golf/current/app/Jobs/ProcessGpsDataJob.php".
If you have ssh access to your server please check using
"ls /home/forge/test.easyflow.golf/current/app/Jobs/"
If you don't ave ssh access, please check whether the file exists in you latest git repository branch which was pushed to forge.
- Second error: When an error occurs, laravel will try to log it to the latest file in storage/logs/. But linux servers are very strict. It is mandatory that the "user" performing the task has permission to do so. this is generally achieved by running
sudo chmod -R 775 storage
I'm assuming that forge does this automatically.
I believe a forge expert can solve this for you. But, till then, you can try this:
- Confirm that the file ProcessGpsDataJob.php exists in the git repo in this path: app/Jobs/ProcessGpsDataJob.php"
- If you have ssh access to the server confirm that it is in this path on the server:
/home/forge/test.easyflow.golf/current/app/Jobs/ProcessGpsDataJob.php
- try
sudo chmod -R 775 storage in /home/forge/test.easyflow.golf/current/@birdietorerik