How can I check if I have mysqli in my web server

2019-08-13 18:19发布

问题:

I'm using...

  • PHP version 5.4.28
  • Filezilla
  • Wordpress
  • cPanel
  • MediaTemple hosting

I get this error Fatal error: Call to undefined function mysqli_connect(), after trying to connect to my database with mysqli functions. I've read online that either mysqli isn't enabled, it may not be installed. I know I have to check my php.ini file located in /usr/local/lib/, but I don't how know look for that. I'm using cPanel's WHM and it looks like this... cpanel WHM

Any suggestions?

回答1:

If you have WHM you can see and install PHP modules via Easy Apache.

1) Search "Easy Apache" in search box of WHM

2) Click "show more" from DEFAULT profile.

3) You can see all installed modules. Check for MySQL Improved. It's mysqli.



回答2:

You need to create phpinfo page in your account through cPanel file manger and then try to browse that to check all php information of your server.

Here are the php code of phpinfo page.

<?php
phpinfo();
php?>