Solved

PHPmyadmin

Posted on 2008-06-26
21
1,049 Views
Last Modified: 2013-12-13
When combining Apache, MySQL, PHP, and PHPmyadmin, there is a host of users reporting:

Can't load MySQL extensions. Check PHP configuration.

None of the suggested rededies seem to work for me to solve this 'final set up problem'.
Does anyone know if Vista could be a cause of same?
I have not elected to go down the WAMP route yet.
0
Comment
Question by:Mosher1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
  • 3
  • +2
21 Comments
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21874322
Can you create a PHP page with <?phpinfo; ?>, and attach the result?
0
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21874326
sorry, that should have been:

<?phpinfo();?>
0
 
LVL 2

Expert Comment

by:JurgenvH
ID: 21874770
Is your MySQL-extension set in php.ini?
Open your php.ini (phpinfo() will tell you where to find if you don't know) and search for extension=mysql.so or extension=php_mysql.dll
There should not be a ; at the beginning of this line.
Next make sure the extension is available in your extensiondir (setting found in php.ini; something like extension_dir = "C:/php/ext/")
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

by:Mosher1
ID: 21877169
Hi

Is this the file that you are after.

Mosher1
PHP-listing.doc
0
 

Expert Comment

by:goliathdrakken
ID: 21877421
based on your phpinfo posting your server is not configured to use mysql. you need to edit your php.ini file (C:\Server\PHP\php.ini )

un comment the following line:
;extension=php_mysql.dll

you may also need to add the php directory to you PATH environmental variable.
1.)right click my computer and select properties
2.)click the advanced tab
3.)click environmental variables
4.)locate Path in system variables and click edit
5.)add a semicolon (;) to the end of the string and add your php path to the end: C:\Server\PHP
6.)restart computer
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 21882309
HI yah, what goliathdrakken , you should do the samething

i am just adding a link, if you need any extra help to install php .

http://fosiul.co.uk/subcategory.aspx?Id=97

and also sometime, if you dont add  a new Variable PHPRC and Variable value C:\PHP\ . it does give some problem


HOpe your problem would be solved.
0
 

Author Comment

by:Mosher1
ID: 21885928
Hi Both

extension=php_mysql.dll was already uncommented.

I've added the 2 variables paths, but still same error message.
Annoying because 3 out of the 4 applications work in this setup(Apache/MySQL/PHP)
Just PHPmyadmin that doesn't.
Any further thoughts.
Thanks

Mosher1
0
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21886062
Can you post your php.ini file (located at C:\Server\PHP\php.ini)?
0
 

Author Comment

by:Mosher1
ID: 21889869
Hi Rob

Heres the file copied to word - cant send ini files.

Mosher1
PHP-ini.doc
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 21900153
HI yah
is your phpmyadmin configuraton is ok ??
I know its reasy easy to configure ,
but still .. its better to check.

like this extionstion, is this enable or disable ??
$cfg['Servers'][$i]['extension'] = 'mysql';
0
 

Author Comment

by:Mosher1
ID: 21903291
Hi

Just wondering what Rob makes of the php.ini file.
The line extension=php_mysql.dll in itself appears to be correctly stated if this is indeed what the error message is referring to.

Mosher1
0
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21916030
If you look at the output of phpinfo(), you'll see that the value of "extension_dir" is "C:\php5".  However, in your php.ini file, you appear to have it set to "c:\Server\php\ext".

So for some reason, it's not liking the value in php.ini.

Try changing it to c:/Server/php/ext (i.e. remove the quotes and change the backslashes to regular slashes).  Restart your computer and see if the phpinfo() output has the correct value.
0
 
LVL 2

Expert Comment

by:JurgenvH
ID: 21916944
And if all else fails, copy your ext-dir to both places and see if that works. If so, delete one of them and you'll know which is the one you should keep.
There's nothing wrong with some trial and error sometimes... :-)
0
 

Author Comment

by:Mosher1
ID: 21918456
Hi Rob
I can see what you mean, I think. PHP's path to the extensions for some reason is C:\php5(as is the reference to the PEAR folder)
 This whole installation came from:
www.wikihow.com/Install-Apache,-MySQL,-PHP,-and-phpMyAdmin-on-a-Windows-PC
but I can't see how this extension path has been created in the PHP engine section.
Changing the php.ini file as you suggested makes no difference to the error message.

I looked at Jurgens's suggestion which I think suggests copying the contents of the ext folder to C:\php5 and presumably changing the extension dir in php.ini accordingly. Still no change. Perhaps Jurgen could confirm if that is what he meant.

Much appreciated.

Mosher1
0
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21918736
After you make any changes to php.ini, you should restart your computer to make sure they take effect.  Have you done this?
0
 

Author Comment

by:Mosher1
ID: 21919419
Hi Rob

Yes restarted each time.
Just to reflect, Apache, MySQL and PHP are all located on C:\Server as the installation notes suggested.
The only thing that occurs to me is that the latest version of PHP may contain some changes since the notes were written. If so would this just be a case of locating the relevant files where the PHP engine expects to find them, and is that C:\php5?

Mosher1
0
 
LVL 2

Expert Comment

by:JurgenvH
ID: 21925855
Actually, that was my idea.
But I was walking through all the posts so far and the question that popped into my head was: have you alteady tried placing your php.in in the C:\Windows\ directory? I know phpinfo() says it loaded another file but sometimes windows and php can trick you allot. Afterwards restart and see what happens...
0
 

Author Comment

by:Mosher1
ID: 21928739
Hi Jurgen
Yes tried a copy of php.ini in C:/Windows/php presumably. No joy. Still puzzled by where the PHP listing gets extension dir as c:/php5, as Rob pointed out. Incidentally, the last few lines of the Apache config file read:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
 #PHPIniDir "C:/Server/PHP/"
  #LoadModule php5_module "c:/Server/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

ScriptAlias /php "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

There seems to be more reference to php5 in the commented lines than the others. However if you swap the Script and Action lines for PHPiini dir and load module leaving addtype (as can be found in other install instructions on the web) Apache returns errors.
Don't know whether these lines are significant as Apache "runs all services" as they stand.

Thanks for the continued interest.

Mosher1

0
 
LVL 9

Expert Comment

by:Rob Siklos
ID: 21928854
Any reason why you're running PHP as a CGI instead of an Apache module?
0
 

Author Comment

by:Mosher1
ID: 21929789
Hi Rob

Just followed the 4 steps in the link given earlier. I don't understand the difference between these two I'm afraid. Only logic tells me that there is some form of conflict in what I see, as you have pointed out.
Why might you select one method over another?
 My final step is to load my sports club database and make occasional adjustments before placing back on web - once I've acquired the knowledge.

Thanks

Mosher1
0
 

Accepted Solution

by:
Mosher1 earned 0 total points
ID: 21974869
There does not appear to be a quick fix by installing in this way. So I tried WAMP5 at this link:

http://www.tinkertech.net/tutor/wamp/index.html

First time I have ventured down this road, but phpmyadmin worked first time.

Conclusion: don't try and and install the component parts separately go straight to the above.

The current problem ends here.

Thanks

Mosher1
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question