PHP Fatal error: Uncaught Error: Class 'mysqli' not found in

nokiajav

New Member
Messages
28
Reaction score
1
Points
3
I have already tried thousands of combinations and every time I change the PHO version, mysqli and all its derivatives disappear, no matter if it is ndmysqli or mysqli, pdo whatever, in the phpinfo there is nothing of these libraries when I change the version. There must be a problem with my account on the server or something.

Even wordpress doesn't work, which normally can work with one or the other library, but since it doesn't exist it fails.

I suppose that some administrator must investigate the case to be able to solve the problem that exists, since there is no way to make it work in another different version. Thanks for all your help
 

Attachments

  • error.JPG
    error.JPG
    28.4 KB · Views: 3

kraitreuter

New Member
Messages
7
Reaction score
0
Points
1
i am at the x15 and i don't know nothing about back-end, i just want to publish my papers and the professors want it right up (and i want to show it done on my own domain so i need to show them the site done, that i can do on wordpress... beside that could you please sorrry any grammar mistakes (brazil here lol) and try to give step-by-step instructions so i can run some tentatives too? i had problems with the free package of 0x0webhxst cuz they just kicked off all my progress and data after i change to my own domain (wich is hostinger, by the way, if it matters) so i'm pretty fucked up, heeeeeeelp (i don't know how to shout out a post and i cant contact the admins directly, there's any email where i can search from any answer?
 

kraitreuter

New Member
Messages
7
Reaction score
0
Points
1
with wordpress it says that it does'nt have php (the server), so i changed to the native version and i'm having bugs all up... it's kinda working but any changes are being saved
 

nokiajav

New Member
Messages
28
Reaction score
1
Points
3
Solved, a week ago I got an error 403 Forbidden - Access to this resource on the server is denied! which did not allow me to access any .php file on the server.

In the end, they helped me and it turned out that the problem was in the .htaccess file, which had some fixed lines of something from php7.2. When I renamed that file everything was fixed and also fixed the PHP version change and the libraries that were not installed, all because of the same problem of .htaccess.

Surely when changing php version sometime that was written in the file and that's why I would not let me change the version. I leave it here in case it happens to someone else.
 

nehakakar

New Member
Messages
8
Reaction score
0
Points
1
Hi, I am trying to migrate to php 7.4 but when I switch to version 7.4 from the control panel, and I set the options
mysqlnd, nd_mysqli, nd_pdo_mysql so that I have activated access to mysql server I get the error:
Code:
 PHP Fatal error: Uncaught Error: Class 'mysqli' not found in
when I try to do:
PHP:
 $ this-> conn = new mysqli (DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
The same code works in PHP 7.2 on the server.

I have tried to change other versions like php 7.3, 7.4 and I get the same error, it only works fine for me on php 7.2 which is what I currently have.

In my local I have tested the code and it works fine in php 7.2 and php 7.4.24.

I have read in the forum other users with the same problem, it seems that the library is not installing correctly when changing the version of php.

Any solution? Thanks
Check if the MySQLi extension is installed by running a PHP file with phpinfo() and looking for the "mysqli" section.
If MySQLi is not installed, enable it through your hosting control panel or PHP configuration file (php.ini).
If the issue persists, contact your hosting provider's support for assistance in enabling the MySQLi extension or resolving configuration issues.
 

nokiajav

New Member
Messages
28
Reaction score
1
Points
3
Check if the MySQLi extension is installed by running a PHP file with phpinfo() and looking for the "mysqli" section.
If MySQLi is not installed, enable it through your hosting control panel or PHP configuration file (php.ini).
If the issue persists, contact your hosting provider's support for assistance in enabling the MySQLi extension or resolving configuration issues.
Thank you! But as I said the problem has been solved, it was because of the .htacces file.

Everything works perfectly now. Thanks
 
Top