PDA

View Full Version : Make phpmyadmin work with mysqli



PATRICIAF5
09-19-11, 04:41
Does anybody know how to make phpmyadmin work with mysqli?
I am getting a "Cannot load mysqli extension. Please check your PHP configuration" error in phpmysql

I've built apache2.2/php5.2.4 with mysqli support, phpinfo lists mysqli as enabled:


MysqlI Support enabled
Client API library version 5.0.45
Client API header version 5.0.45
MYSQLI_SOCKET /var/lib/mysql/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

77wmaster
09-19-11, 05:22
You can delete the /var/cpanel/usecpphp file with Easy Apache built binary or remove this you can change the /scripts/makecpphp.profile.yaml file to include MySQLi support.

PATRICIAF5
09-19-11, 06:04
77wmaster Thank You,
I already tried these ways and did not get any result in phpmyadmin behavior.

It definitely listed mysqli, when it was rebuilding php:

-- Begin opt 'Mysqli' --
-- Begin dryrun test 'mysql compilation test' --
-- End dryrun test 'mysql compilation test' --
-- Begin step 'to config options' --
-- End step 'to config options' --
-- End opt 'Mysqli' --
...cut...

--with-mysqli=/usr/bin/mysql_config

...cut...

checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
Can anyone suggest anything more?

77wmaster
09-19-11, 06:28
According to PHP: Mysqli - Manual (http://www.php.net/mysqli), there is no requirement of Embedded MySQL for MySQLi. In any case, if the other MySQL extensions are enabled, it is possible PHP is defaulting to them, rather than the MySQLi extension.

PATRICIAF5
09-19-11, 06:44
Alright , Without mysql extension, I had restored php but got that same message from phpmyadmin.

But one point I understand is that - horde now displays blank page if I try to login through cpanel "webmail" shortcut. I assume it happens, cause it cannot find mysql extension.
If I login through domainname/webmail, it works fine.

77wmaster
09-20-11, 02:20
The message I receive from PHPMyAdmin is:
QT : Cannot load mysql extension. Please check your PHP configuration
which is because I do not have it installed:

Code:

[[email protected] php-5.2.4]# php -m
[PHP Modules]
bcmath
calendar
ctype
date
dom
filter
ftp
hash
iconv
imap
json
libxml
mcrypt
mysqli
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
But, PHPMyAdmin seemed to work OK. Adding data worked without any issue.

10NANCY
09-20-11, 21:22
Hi,
Also I am facing this problem.

PATRICIAF5
09-21-11, 01:43
Hello 10nancy,
I got it working eventually, but it is kinda pointless cause cPanel overwrites phpMyAdmin config.inc.php file on update, switching it back to plain mysql.

77wmaster
09-21-11, 05:06
Hi nancy,
I got it working eventually, but it is kinda pointless cause cPanel overwrites phpMyAdmin config.inc.php file on update, switching it back to plain mysql.

If it only requires modifications to the configuration file, then utilize the /scripts/postupcp to restore your changed version. Quick pseudo code:


# mkdir /root/custom_configs
# cp /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php /root/custom_configs/phpmyadmin_config.inc.php
# echo "cp -f /root/custom_configs/phpmyadmin_config.inc.php /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php" >> /scripts/postupcp
# chmod +x /scripts/postupcp