0

My Server is Linode and when i have deployed my php application there i got Fata error: Class 'mysqli' not found in Linode Server i have seen and tried the steps given in following link

Fatal error: Class 'MySQLi' not found

but it did'nt solve my issue. Please help to sort out my issue.

Community
  • 1
  • 1
user3653474
  • 3,393
  • 6
  • 49
  • 135
  • Are you certain `MySQLi` is installed? I know you said the linked question didn't help but just want to make certain you've checked that. – James Nov 26 '15 at 05:12
  • James- Can u please tell me how can i check whether mysqli is installed or not. – user3653474 Nov 26 '15 at 05:15
  • If you have root access to the server, run `php -m | grep -i mysql` this will spit out installed packages that contain `mysql` if you have `mysqli` installed then it will be one of the outputs. If you don't have root access then just use `phpinfo();` to find out. – James Nov 26 '15 at 05:19
  • Yes i have root access and i tried it returned mysql mysqlnd pdo_mysql and returned a welcome screen. – user3653474 Nov 26 '15 at 05:22
  • Then you have your answer: mysqli is not installed, so install it. – Shadow Nov 26 '15 at 05:25
  • i used following command sudo yum install php-mysqli to install mysqli but the same issue. – user3653474 Nov 26 '15 at 05:28
  • Have you checked that you have enabled it? Check your `php.ini` file for this line or something similar `extension=mysqli.so` – James Nov 26 '15 at 05:33

1 Answers1

0

MySQLi comes as part of the php5-mysql package and installing this will enable it by default.

As you have it installed as you've mentioned, it may just be that it isn't enabled. Check your php.ini for this or something along these lines; extension=mysqli.so . It may be commented out, or the .so file is present in your extensions directory but not linked to PHP via that extension= directive.

Source: How to install MySQLi

Community
  • 1
  • 1
James
  • 15,754
  • 12
  • 73
  • 91