Installed through Softaculous on Cpanel and has been working great for years. I just launched the updated from the previous version to the latest one and got a 500 internal server error.
The error log gives me this:
[19-Sep-2025 14:31:12 Asia/Singapore] PHP Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file. Encountered unexpected whitespace at ['4?????M'?']. in /home/dao2com/public_html/billing/vendor/vlucas/phpdotenv/src/Parser/Parser.php:30
Stack trace:
#0 /home/dao2com/public_html/billing/vendor/graham-campbell/result-type/src/Error.php(119): Dotenv\Parser\Parser::Dotenv\Parser\{closure}('Encountered une...')
#1 /home/dao2com/public_html/billing/vendor/vlucas/phpdotenv/src/Parser/Parser.php(31): GrahamCampbell\ResultType\Error->mapError(Object(Closure))
#2 /home/dao2com/public_html/billing/vendor/vlucas/phpdotenv/src/Dotenv.php(222): Dotenv\Parser\Parser->parse('# <?php exit('N...')
#3 /home/dao2com/public_html/billing/index.php(20): Dotenv\Dotenv->load()
#4 {main}
thrown in /home/dao2com/public_html/billing/vendor/vlucas/phpdotenv/src/Parser/Parser.php on line 30
It’s running under PHP 8.1. I tried changing php to 8.3 same problem.
Any idea is welcome.
Hi @bfred, nice to hear you’ve been using InvoicePlane for years! From what version were you updating your version? For some updates we have different steps that have to be followed, you can see the upgrade guide here Update InvoicePlane - InvoicePlane Wiki
If you followed correctly the steps and are still getting the error, let me know and we will try to dig deeper in the issue.
Indeed there was a ‘red’ as in red color character when I edited the file. I changed the password both in the DB and the file and everything is back to normal.
Thank you very much.
Not sure what modified that string in the file but what is important is that it is back to work!