Jump to content

mysql not showing up in phpinfo


Recommended Posts

I'm several days into (a new user/learner), and extremely fried on all the forums I've read/guides/tutorials, etc....I despretely need some expert help. No matter what I do - I can't get php to talk with mysql. I followed the Kevin Yank database building guide to a T. Here's what I've done so far:

MySQL version: 5.1.45

PHP version: 5.2.13

Apache version: 2.2.15

 

- Installed MySQL, runs in command prompt.

- Installed zip package of PHP under windows binaries.

- Installed Apache [under: Win32 Binary without crypto (no

mod_ssl) (MSI Installer): apache 2.2.11-win32-x86-no

ssl.msi

- Ran localhost; "it works!"

- Unzipped PHP, saved to C:/PHP directory.

- Made a copy of php.ini-dist to just php.ini (in same

directory)

- Made sure the doc_root (in php.ini) = the htdocs folder.

- Pointed: extension_dir = "C:\PHP\ext"

- Removed the ; for the php_mysqli.dll line

- Removed the ; for session.save_path = "C:\Windows\Temp"

- Opened httd.conf; added "index.php" after "DirectoryIndex

index.html"

- Also in httd.conf; added LoadModule php5_module

"C:/PHP/php5apache2_2.dll" 

    AddType application/x-httpd-php .php 

    PHPIniDir "C:/PHP" at the end.

- Apache reflects the PHP version in the service monitor

window.

- today.php DOES work on localhost (a simple script showing

the date).

- phpinfo DOES NOT show MySQL enabled.

- Oh - in the phpinfo it's telling me the Configuration File (php.ini) Path is in C:\Windows. That's crap - I know it's not there, it's in the C\php folders. Why is it telling me that? I've even tried to copy and paste into the windows folder with php.ini, but nothing still.

 

But now...nothing. All I want to do is do some php/mysql database, but I'm dead in the water...can anyone help?

Link to comment
Share on other sites

The phpinfo() Loaded Configuration File value is the php.ini that is being used. The Configuration File (php.ini) Path is just the default path that php was complied to use.

 

If you check the web server error log you will probably find an error concerning loading the php_mysql.dll file. Assuming they have not fixed the errors, it is because the auxiliary libmysql.dll cannot be found. The best solution for this is to add the c:\php folder to your Windows path statement. You need to reboot your computer to get any change to the Windows path statement to take effect (or you can just log out of Windows and back in.) You also need to stop and start your web server to get any changes to the php.ini to take effect.

 

 

Link to comment
Share on other sites

Thanks for the quick reply and for the help. I see what you mean about the load config file in phpinfo (as mine says none) - but I'm not sure how to update the windows path statement like you suggested with c:\php...I'm sorry I'm new to this...

John 

Link to comment
Share on other sites

  • 3 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.