Whenever I try to view any PDF, it shows me a PDF, but the content of the PDF just says 500 - Server Error. Similarly when I try creating a new invoice, it just says 500 - Server Error.
I have tried changing the setting to snappdf and also reverted to phantom with a personal secret added to ensure its not a limits issue. However, nothing has changed.
I am not using cloudflare and I dont see any other reason why the pdf creation or generation should fail.
Any help would be appreciated.
TLDR Solution:
Ensure that you have enabled allow_url_fopen in your php settings
I discovered that option after making the original post, but all parameters had green checkmarks on them.
However, I had to use v5.3.21 to setup as the latest version wasnt allowing me to reach the setup screen (gave me a 500 Internal Error). So I clicked force update out of curiosity and Iâm back to the 500 Internal Error. Not sure whatâs causing it. Have to fix that before I can come back to pdf generation errors. Any thoughts?
Iâm not referring to the green checkmarks. You mentioned you tried changing the .env value, Iâm suggesting using the health check to ensure your new values were applied. You may need to run php artisan optimize.
Thank you for the prompt replies. I tried to run php artisan optimize, but it gave me the following error:
In Company.php line 29: Trait âAwobaz\Compoships\Composhipsâ not found
Also, on refreshing the page, it still gives me a 500 Server Error
I had freshly installed v5.3.69, but that gave me a 500 error directly and didnt even let me hit the home page or install it. So I installed the last known working version for me, which was v.5.3.21 (by chance, and not by trial and error of all versions between them).
The issue is that while fiddling around with v5.3.21, curiosity got the better of me and I clicked âForce Updateâ on the health status page and it updated to v5.3.70 which straight up gave me a 500 error and I couldnt find any way to revert the upgrade.
Ok, I will try it, thanks. But would like to point out that downgrading to 5.3.68 brings me back to operation. 5.3.69 is the version when I can no longer just extract the version.tar.gz files and keep running.
Edit: By âdowngradingâ I mean extracting the v5.3.68.tar.gz files to the website folder
Okay, so I unziped the invoiceninja.zip, rewriting all files. When I try to load https://www.website.com/update?secret=TheSecretForTheWebsite, it gives me a 500 error. But accessing www.website.com does load a page, but when I go to âaboutâ it is still in 5.3.68, even though the VERSION.txt is 5.3.70.
I again unziped everything to the folder, overwriting everything, but still⌠for some reason the page âaboutâ says 5.3.68, and the update?secrete page gives the 500 error. The error.log entry is the same as before. Not sure if Iâm messing up somewhere, but if I am, not sure where
I deleted the folder, and unzipped invoiceninja.zip, inserted the .env backup, and that seems to get it running. Did I removed anything from the original files that I should replace from my backup to this new installation?
Unfortunately I canât get any pdfs. It gives me a pop up that says Error 500: I ran php artisan optimize and completed successfully, but the error persists. I also did the update?secret page, and seems to have worked, but the pdf error persists.
This makes sense. New packages were added in 5.3.69, so if your system pulls in the v5.3.69.tar.gz file it relies on your system being able to do composer install.
Some shared hosts do not allow the composer install command to run so the installation will fail due to missing packages. In these cases the larger invoiceninja.zip file is required as it contains the full system pre-built.
Ok. I believe I can install composer on my system (but I donât have it right now). I will try to install composer an try again the update from 5.3.68.
When I did the fresh unzip and included the .env backup, I could run the 5.3.71, but could not get pdf working (even after php artisan optimize). What could be the culprit there?
I have installed composer, but still the extracting the 5.3.72.tar.gz gives me the 500 error. Do I also have to provide a composer command?
Edit: To clarify, I have a fully working 5.3.68 installation, and I try to update by extracting the 5.3.72.tar.gz file into the directory. When I try to access the site it gives a 500 error with error.log entry same as previously posted in this thread
Happy to report that running the composer command fixed the installation. PDF creation working well too, and no whitelabel issue (with 5.3.73).
Previously I was not running the composser command and the update still worked. Should this command be run everytime I use the .tar.gz file regardless?