hitrov/oci-arm-host-capacity

Fatal error: Uncaught TypeError: Argument 3 passed

Briozs opened this issue · 4 comments

Briozs commented

Fatal error: Uncaught TypeError: Argument 3 passed to Hitrov\OciApi::checkExistingInstances() must be of the type string, bool given, called in /home/ubuntu/oci-arm-host-capacity/index.php on line 76 and defined in /home/ubuntu/oci-arm-host-capacity/src/OciApi.php:135
Stack trace:
#0 /home/ubuntu/oci-arm-host-capacity/index.php(76): Hitrov\OciApi->checkExistingInstances()
#1 {main}
thrown in /home/ubuntu/oci-arm-host-capacity/src/OciApi.php on line 135
After doing the tutorial got this error. I am assuming this is related to how I declared the variables.
I have never worked with php, therefore I apologize if this is an easy fix.
PHP 7.4.33 (cli) (built: Feb 14 2023 18:31:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
My installed php version.
script
scriptissue

hitrov commented

Please revert index.php and check README for .env file usage

mtik commented

I am getting a "Fatal error: Uncaught TypeError: Argument 1 passed to Hitrov\OciConfig::__construct() must be of the type string, bool given, called in /www/wwwroot/..."

hitrov commented

This could happen when env file wasn’t parsed (not found) - you didn’t rename .env.example to .env, for instance.

mtik commented

Thank you very much for the help. Actually, I did it using cmd in my windows. It worked perfectly. Then I zipped all files and uploaded to my Apache web server and opened the index.php file in browser using domain name.