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

Fatal error: Uncaught TypeError: Argument 3 passed #84

Open
Briozs opened this issue May 24, 2023 · 4 comments
Open

Fatal error: Uncaught TypeError: Argument 3 passed #84

Briozs opened this issue May 24, 2023 · 4 comments

Comments

@Briozs
Copy link

Briozs commented May 24, 2023

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
Copy link
Owner

hitrov commented May 25, 2023

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

@mtik
Copy link

mtik commented Aug 30, 2023

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
Copy link
Owner

hitrov commented Aug 31, 2023

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

@mtik
Copy link

mtik commented Aug 31, 2023

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.

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

3 participants