Solved

PHPmyadmin

Posted on 2008-06-26
21
1,029 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
  • 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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Wordpress Query 1 35
how can I dected if URL has variable? 7 23
Not needed 13 58
showing numeric numbers 2 11
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now