Re: I have a problem to connect MySQLi

Flavio Kenji Yanai <[email protected]>
Newsgroups gmane.comp.php.general
Message-ID <CALAhxQ_+nOLauGZkSxi67xLH_zOQ-WBJyc5UesuUg3yYFcT40w@mail.gmail.com>
Hi Ahmed,

Perhaps your mysqli php module isn't enabled, take a look in
https://www.youtube.com/watch?v=4AImF_cVr9Q or
https://stackoverflow.com/questions/8223206/how-to-install-mysqli-on-windows-iis-server
to enable it.

Best Regards
Flavio

On Thu, Feb 15, 2024 at 6:39 AM Ahmed Helmy Ahmed Abdelnaeim <
[email protected]> wrote:

> Dear,
>
> I have installed Apache 2.4 on windows, also PHP 8.3.2, every thing is
> going well except connection with MySQLi.
>
> My code as follow
>
> <?php
> // Connection parameters
> $serverName = "localhost";
> $dbUserName = "root";
> $dbPassword = "password";
> $database = "dbname";
> // Create connection   $conn = new mysqli($serverName, $dbUserName,
> $dbPassword, $database);
> // Check connection
> if (!$conn) {
>    die("Connection Failed: " .mysqli_connect_error());
> }
>
> However it gives me error as follow:
> *"Fatal error*: Uncaught Error: Class "mysqli" not found in
> C:\Apache24\htdocs\01 PHP_Traning\mySQL_01\includes\dbh_custom_inc.php:11
> Stack trace: #0 {main} thrown in *C:\Apache24\htdocs\01
> PHP_Traning\mySQL_01\includes\dbh_custom_inc.php* on line *11"*
>
> Note:
> The same code works in another computers.
>
> Best Regards,
> Ahmed Helmy
>
>
>
>

-- 
Flávio Kenji Yanai (Toccos)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.