hitrov / oci-arm-host-capacity

This script allows to bypass Oracle Cloud Infrastructure 'Out of host capacity' error immediately when additional OCI capacity will appear in your Home Region / Availability domain.
MIT License
991 stars 500 forks source link

Php Fatal Error. #135

Open Baju8 opened 6 months ago

Baju8 commented 6 months ago

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 commented 5 months ago

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"