Any assistance on this would be much appreciated. Below is the following apache error log:
[Mon Dec 05 07:59:03.607817 2022] [php:error] [pid 33662] [client ipv6address:55984] PHP Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file. Encountered an invalid name at [<?php exit('No direct script access allowed'); ?>]. in /var/www/mywebsite.com/invoiceplane/vendor/vlucas/phpdotenv/src/Parser/Parser.php:30\nStack trace:\n#0 /var/www/mywebsite.com/invoiceplane/vendor/graham-campbell/result-type/src/Error.php(118): Dotenv\Parser\Parser::Dotenv\Parser\{closure}()\n#1 /var/www/mywebsite.com/invoiceplane/vendor/vlucas/phpdotenv/src/Parser/Parser.php(31): GrahamCampbell\ResultType\Error->mapError()\n#2 /var/www/mywebsite.com/invoiceplane/vendor/vlucas/phpdotenv/src/Dotenv.php(222): Dotenv\Parser\Parser->parse()\n#3 /var/www/mywebsite.com/invoiceplane/index.php(16): Dotenv\Dotenv->load()\n#4 {main}\n thrown in /var/www/mywebsite.com/invoiceplane/vendor/vlucas/phpdotenv/src/Parser/Parser.php on line 30
Great job, man! Would you mind if we keep this topic open? A lot of users are going to run into this issue
Also: please do not forget to rename your ipconfig.php file to something only you know
orrrrr protect it through your nginx config orrrr move it outside the document_root
Ok, so due to the upgrade in the packages that are included in 1.6, the config file needs to be moved. Can you move it to some subfolder like application or something and then go into the index.php file and modify the following lines:
Line 14: if (!file_exists('[PUT YOUR NEW IPCONFIG PATH HERE]/ipconfig.php')) {
Line 19: $dotenv = Dotenv\Dotenv::createImmutable(__DIR__, '[PUT YOUR NEW IPCONFIG PATH HERE]/ipconfig.php');
Line 303: define('IPCONFIG_FILE', FCPATH . '[PUT YOUR NEW IPCONFIG PATH HERE]/ipconfig.php');
Then move the config file to this location. Let’s do this first and see if that fixes the issue. If not, let me know.
On visiting the installation page it gives the following error.
Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file. Encountered an invalid name at []. in [[PATH]]/vendor/vlucas/phpdotenv/src/Parser/Parser.php:30 Stack trace: #0 [[PATH]]/vendor/graham-campbell/result-type/src/Error.php(118): Dotenv\Parser\Parser::Dotenv\Parser{closure}(‘Encountered an …’) #1 [[PATH]]/vendor/vlucas/phpdotenv/src/Parser/Parser.php(31): GrahamCampbell\ResultType\Error->mapError(Object(Closure)) #2 [[PATH]]/vendor/vlucas/phpdotenv/src/Dotenv.php(222): Dotenv\Parser\Parser->parse('load() #4 {main} thrown in [[PATH]]/vendor/vlucas/phpdotenv/src/Parser/Parser.php on line 30
On deleting first line from ipconfig.php starts the installation However on filling the database details installer gives another error.
Failure Cannot connect to the database server with the provided database information. Please check the credentials and try again.