Page 1 of 1

Why does this problem exist? mysqli not working

Posted: Wed Dec 22, 2021 9:44 am
by Mark1954
Hi Everyone,
The last fix work good. Now I have this one. Here is the line from the code

Code: Select all

 $mysqli = new mysqli('mySQL', 'root', 'P!r2ed40');
I am using PH 8 on Windows 11. the mysqli extension does not have a semicolon.
I don't know what else to do your help is appreciated.
Mark

Re: Why does this problem exist? mysqli not working

Posted: Wed Dec 22, 2021 6:52 pm
by Benjamin
What is the error message?

Re: Why does this problem exist? mysqli not working

Posted: Wed Dec 22, 2021 8:57 pm
by Mark1954
Fatal error: Uncaught Error: Class "mysqli" not found in C:\Apache24\htdocs\Joy\createdb.php:6 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\Joy\createdb.php on line 6

Re: Why does this problem exist? mysqli not working

Posted: Wed Dec 22, 2021 9:22 pm
by Benjamin
Try uncommenting this line in your configuration file, and ensure the path is correct:

extension_dir = "C:\software\php\dist\ext"

Re: Why does this problem exist? mysqli not working

Posted: Thu Dec 23, 2021 7:20 am
by Mark1954
Benjamin,
I'm not sure where you want me to direct the externsion_dir. If it is to my php dir. the I have php 8/*. Can you be more specific?

Re: Why does this problem exist? mysqli not working

Posted: Thu Dec 23, 2021 8:00 am
by Mark1954
actually it is c:\php 8

Re: Why does this problem exist? mysqli not working

Posted: Sat Dec 25, 2021 8:26 am
by Mark1954
I think I got it right. The extension_dir. But it didn't work.

Re: Why does this problem exist? mysqli not working

Posted: Mon May 30, 2022 9:01 am
by ai1ana
maybe add another parameter 'bin'