Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Php Fatal Error. #135

Open
Baju8 opened this issue May 16, 2024 · 1 comment
Open

Php Fatal Error. #135

Baju8 opened this issue May 16, 2024 · 1 comment

Comments

@Baju8
Copy link

Baju8 commented May 16, 2024

When i try to run "php ./index.php" I get the error

PHP Fatal error:  Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file. Encountered an unexpected escape sequence at ["D:\Apps\Putty\id_rsa.ppk"]. in D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\vlucas\phpdotenv\src\Parser\Parser.php:30
Stack trace:
#0 D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\graham-campbell\result-type\src\Error.php(119): Dotenv\Parser\Parser::Dotenv\Parser\{closure}()
#1 D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\vlucas\phpdotenv\src\Parser\Parser.php(29): GrahamCampbell\ResultType\Error->mapError()
#2 D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\vlucas\phpdotenv\src\Dotenv.php(222): Dotenv\Parser\Parser->parse()
#3 D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\vlucas\phpdotenv\src\Dotenv.php(237): Dotenv\Dotenv->load()
#4 D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\index.php(19): Dotenv\Dotenv->safeLoad()
#5 {main}
  thrown in D:\Files\Random\AutoClaimOracle\oci-arm-host-capacity\vendor\vlucas\phpdotenv\src\Parser\Parser.php on line 30

Something to do with this probably : OCI_PRIVATE_KEY_FILENAME="D:\Apps\Putty\id_rsa.ppk"
Im using win 11.

@Jubal-Norman
Copy link

It is treating your backslashes as escape characters. You need to change your \ to / in your file path. Like this:
OCI_PRIVATE_KEY_FILENAME="D:/Apps/Putty/id_rsa.ppk"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants