The cron is running as the user alltbilling@server, that is great, however i suspect the content of /home/alltbilling/public_html has wrong file permissions/owner because it was setup by root.
Try loggin in -as root this time- and perform both commands: “cd /home/alltbilling/public_html” then “ls -l” if you see root somewhere there I think that is the problem. Might look into commands as “chmod” and “chown” to fix that, but setting up from 0 (I guess the app doesn’t have usable data yet because the cron never worked) via the alltbilling user would be the way to go as described above.
Thanks for your patience on this.
I logged into WHM as root and ran the commands in terminal, here’s the response. No email received for the task that ran though.
First of some basic understanding: The email is not generated by the command you perform but by the cron deamon spitting out the output of the command.
/usr/bin/ea-php81 -d register_argc_argv=On /home/alltbilling/public_html/artisan schedule:run is the correct command for your setup INSIDE the cron, wich will spit out the ERROR 500 when performed via the cron to your email. Performing the command manually will spit the output in your terminal.
/usr/bin/ea-php81 -d register_argc_argv=On /home/alltbilling/public_html/artisan schedule:run is correct, inside your cron, you may remove the other one there.
As to why you are getting the ERROR 500, your screenshot does not show the user owning the files, I still believe your file permissions are wrong because you unzipped the app via the root user (I can not be sure because the screenshot does not show everything) and that is why your cPanel interface does not list all the app files and the command performed gives the ERROR 500 because it cannot access all files needed.
Again, to assist you, because you obviously have root access to the server, create a test account via WHM “testninja” give in terminal access via the WHM interface. From now on, LEAVE the WHM and root terminal. Login to cPanel as the testninja account, go to the File manager, upload the invoiceninja.zip to the public_html directory, unzip it (extract it) via the cPanel file manager, rename the example.env to .env from within the cPanel file manager. This way you will make sure all permissions are correct. Then inside the cPanel interface go to MySQL Database wizard en create a database testninja_testdb and testninja_testdb user and give it a password, granting all rights from the testninja_testdb user to the testninha_testdb database. Again inside cPanel go to cron manager and setup * * * * * /usr/bin/ea-php81 -d register_argc_argv=On /home/testninja/public_html/artisan schedule:run – Now you can go to https://thedomain-u-use.for-the-test.account/setup and give in the database information you created via the MySQL Database wizard.
All should work fine this way and if that does, we are sure the initial setup, extracting and editing on the alltbilling was done incorrectly giving those errors. Please follow every step carefully.
Can’t tell you how grateful I am for your time on this.
Something that is clearly obvious to you looking from the outside in I had never considered.
So, with your instructions in hand I terminated the account on WHM and set a new one back up, same name etc
I then logged in to cPanel as that user
Installed SSL
Created a MySQL DB
Set the PHP version to 8.1
I then uploaded the ZIP archive for Invoice Ninja 5.5.24
I unzipped these to a temp folder
Went in, checked I could see artisan (bingo)
Then I copied these files to the public_html folder
Renamed the file .env.example to .env
Setup the cron job
Then tried to access the setup through a browser and nada.
I’ve asked the server admins to look into this and will update you as soon as I have any news.
Change NEWACCOUNTNAME to the user you (re)created. After making any changes to your cron setup you’ll want to force a recheck of the cron setting. To do this navigate to http://url/update?secret=
Make sure on the cron settings page inside cPanel an email is set, you should be getting mails each minute to the email address set there, if not there realy is a configuration error with the cPanel server itself rendering me out if idea’s.
If it works remember to add >> /dev/null 2>&1 after the command to stop receiving the email every minute.
I heard back from the server admins and they noticed the account did not have shell access so I provided this.
The cron job does not throw up any errors.
As there are no outputs from manually running this it suggests the command is fine.
I enabled the debug mode in the Laravel software at app/config/app.php but this did not trigger any new entries to show within the storage/logs/laravel.log file suggesting the script is running without issue.
However, the little red triangle was still there.
I logged out and back in
I then ran the “/setup” again but still the triangle was there.
Sorry Hillel but I have various installations of Invoice Ninja running on this server (v4) and to suggest using another host sounds a bit like a copout.
I’ve installed, reinstalled, tested, reinstalled as cPanel user and followed everything suggested in this post and still it refuses to work.