1

I just recently setup a fresh install of PHP, Mysql and Apache on my Windows 2003 server. Php is working fine and my Navicat MySQL browser can connect to my tables. However no matter what I do. MySQL doesn't show in phpInfo() even though I have the extensions in my ext folder. I installed PHP via the windows binary installer. Any idea what I'm missing? I'm pretty new to PHP is this is the first time I've tried to setup my own server I'm sure I'm missing something simple. Thanks.

--- EDIT ---

So as suggested by Alan Geleynse I added the extension to my php.ini, now Apache crashes every time I try to enable php_mysql.dll any ideas on this one? I may just restart my php from scratch if this is any more trouble.

2
  • 1
    as you're new to PHP would recommend WAMP/XAMPP to get you started - wampserver.com/en apachefriends.org/en/xampp.html - won't help answer your problem though! Commented Oct 13, 2010 at 20:19
  • 1
    @Ross: well, I most definitely would not recommend xampp-like things, especially for someone new. After you make apache/mysql/php work together, you will at least know the minimal basics of apache/mysql/php configuration. I think, if one is genuinely unable to set up the basic apache/mysql/php installation, one is not qualified to write for the web yet. Commented Oct 13, 2010 at 20:42

4 Answers 4

5

You probably need to enable the extension in your php.ini

Search through php.ini for extension and you should see a list, some of which will be commented out. If you remove the comment for MySQL, it should load the extension.

If you do not see it, you should be able to add this line to your php.ini. Make sure that the dll listed is the one you want and is located in your extension directory.

extension=mysql.dll
Sign up to request clarification or add additional context in comments.

8 Comments

Bingo! This was exactly the problem I had the first time I tried installing PHP and MySQL on a new system.
I can't find a list of extensions, probably because I installed php without extensions the first time. I then did a repair install to add the extensions in, however it didn't change my php.ini I'll just have to get move them over from my another ini. Thanks.
I edited my post you suggestion should have worked but instead apache crashes every time I enable the extension.
@NCX001: did you check the event that is generated when apache 'crashes'? What does it say?
@shylent Just that it was terminated unexpectedly.
|
1

Seems the issue was not only a missing php_mysql.dll but I was also missing libmysql.dll The installer still borked the install of the extension files though. Oh well it happens thanks to everyone for the help.

Comments

0

Probably apache crashes because of missing dll. There is probably a directory 'ext' in your php installation dir. Check whether there is a 'php_mysql.dll' file in it. Also, check for directive 'extension_dir' in your php.ini, it must point to the location of extensions directory. For example, I have php installed in 'C:\php' and 'C:\php\ext' folder in it. My php.ini contains line:

extension_dir = "C:/php/ext"

1 Comment

Looks like you got your slashes mixed. Mine is installed in the same place, and my extension dir is set correctly. The DLLs are in the ext folder. I don't know what the problem is.
0

I just fixed this problem on my computer by copying libMysql.dll from the MySql server directory to c:/windows/system32/, just a few minutes ago.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.