phpMyAdmin: cannot load mysql extension

I know this is a question that many people ask, but the solution seems not to work for me. When I try to access pMA, I get the 'cannot load mysql extension'-error. I checked php.ini, and the extension paths are configured correctly:

(quote)
extension_dir = "C:\Webserver\php\ext"
(...)
extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
(unquote)

I put these extensions in C:\Windows too, I don't remember why. Also, when I try to install CMS Made Simple, I get this error:

(quote)
No valid database drivers appear to be compiled into your PHP install. Please confirm that you have mysql, mysqli, and/or postgres7 support installed, and try again.
(unquote)

It's almost the same kind of error that pMA generates, so I need to get this solved so that I can install CMS Made Simple. Any ideas?
LVL 1
elreteiposAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAelbrechtCommented:
Are you using PHP5 with MySQL5 ? You might have problems then because of not using mysqli (watch the i on the end).

If you are not, then you might wanna restart your apache. Ofcourse you have to check out if these files actually exist on your system in the extension_dir (php.ini directive). Set this to the ABSOLUTE path (in Windows) of the directory with the extensions.

hope this helps ?

cheers
Andy
0
elreteiposAuthor Commented:
> Are you using PHP5 with MySQL5 ?
Yes, I am. What should I do? How can I use that mysqli thing?
0
AndyAelbrechtCommented:
search for an extension named php_mysqli.dll or mysqli.dll somewhere on your system.
enable (or insert) this in your php.ini file, restart apache (or iis) and see what it does.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

elreteiposAuthor Commented:
I tried both

extension=C:\Webserver\php\ext\php_mysqli.dll

and

extension=php_mysqli.dll

but it didn't work. (After restarting Apache, of course.)
0
elreteiposAuthor Commented:
What should I do now?
0
AndyAelbrechtCommented:
tbh, advising you of a solution to this problem, if all previously mentioned do not work, is kinda hard as we are not behind your computer ofcourse. the second thing is (but that's my opinion only) that Apache nor PHP nor MySQL are originally written to work in Windows as production environment.

that said, the best thing you can do is install something like xamp (http://www.apachefriends.org/en/xampp-windows.html) which includes Apache, MySQL and PHP (all latest stable versions) and a very nice control panel with which you can well, control stuff ;-)

this way you will be sure your PHP <> MySQL connection will be made like it is supposed to be made.
0
elreteiposAuthor Commented:
The stupid thing about XAMPP is that it's less flexible then if you install everything apart from each other, so I don't want to use that as webserver. Is there no different way to figure this out?

By the way, should I preconfigure this in php.ini:

(quote)
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in secondes) for connect timeout. -1 means no limit
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off
(unquote)

It's almost the same for MySQLi.
0
AndyAelbrechtCommented:
; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

i think your problem might be here mate; it says "Win32 will only look at MYSQL_PORT" so i highly suggest u fill in a value here ;-)
3306 would be the standard port for mysql if i remember correctly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
elreteiposAuthor Commented:
I'll try it, but I saw that field was only empty in the MySQL section, in the MySQLi section 3306 was filled in. Should I disable the mysqli.dll extension and re-enable mysql.dll extension now?
0
elreteiposAuthor Commented:
I also messed around and I started a program called php.exe. It said that it couldn't load C:\Webserver\php\ext\C:\Webserver\php\ext\php_mysql.dll (this is no typo) so I changed

extension=C:\Webserver\php\ext\php_mysql.dll

to

extension=php_mysql.dll

I restarted Apache and suprisingly enough, it works now! It seems that the "mysql.default_port" problem was the missing link. Thanks!
0
AndyAelbrechtCommented:
you could indeed try that.

also, check your errorlog files (apache) to see if you see anything when apache starts up that involves PHP and MySQL; it might give a warning or an error on startup about which we know nothing.

sidenote: why do you say xampp is less flexible ? it installs your standard mysql, php and apache and after it's installed, you are free to do with the configuration of these programs as you want, meaning you can perfectly tweak it after it's installed ;-)
0
AndyAelbrechtCommented:
ow, cool, you fixed it; so the mysql.default_port was your missing link ?

grats !

cheers,
Andy
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.