Jump to content

PHP & MySQL connect issue


mrcolj

Recommended Posts

I've seen a lot of people who can't get PHP5 and MySQL5 to talk to each other, and I haven't seen anyone transcend it.  Maybe there's an error in the wizard or something.

I'm WIMP based; my PHP files load fine, and I can get around MySQL fine; the MySQL extensions are set up in exactly the same way as the other extensions which have loaded correctly. But when you go to http://www.colinjensen.com/phpinfo.php there is no mention of MySQL (except in the windows path.) Any suggestions on where I go from here to diagnose things?

I have other extensions enabled in the same way, so I'm enabling them correctly. MySQL is just not being recognized.  I have PHP.ini in e:\php, php.ini looking in e:\php\ext for extensions, have libmysql.dll in e:\php and php_mysql.dll and php_mysqli.dll in e:\php\ext; and the latter two uncommented in the php.ini.  I've tried both the limysql and php_mysql and php_mysqli which come from mysql.com and those that come from php.net.

Any suggestions from you php pros (or you amateurs who got it working)?
Link to comment
Share on other sites

I don't see your PHP dlls folder or any path pointing to it. One problem with PHP on windows, is that it can not find the dynamic link libraries if they are not given a mapping. Placing them in the system folder doesn't help and should be avoided at all costs. PHP files are not system files so they should never be placed in the system folder. Plus by setting up a good directory structure you can keep track of your PHP install which makes updates easier, also avoiding version collisions!

Create a folder in your php directory e:\php, call it 'dlls'

You should now have

[code]e:\php\dlls[/code]

Open that directory, move the following dll files into that directory [b]dlls[/b]!

ssleay32.dll
ntwdblib.dll
msql.dll
libmysql.dll
libmhash.dll
libmcrypt.dll
libeay32.dll
gds32.dll
fdftk.dll


Go to >> My Computer >> right click >> scroll down >> Properties >> left click
System Properties >> at the top, left click the Advanced tab
left click the Environment Variables... tab
Environment Variables, lower window >> System Variables

Scroll the lower window and find Variable >> Path >> left double click

Edit system Variables, Variable Value

Go to the end of the Variable Value Input

If the last character is * ; * < semi-colon, add what is below!


[code]e:\php;e:\php\pear;e:\php\dlls[/code]


If the last character is not * ; * < semi-colon, add what is below!

[code];e:\php;e:\php\pear;e:\php\dlls[/code]

left click OK (3) times

then open your PHP.INI file (e:\php\php.ini)

Make sure this line is uncommented

[code];extension=php_mysql.dll[/code]

It should look like this... (without the semi-colon)

[code]extension=php_mysql.dll[/code]

Change....

[code]include_path = ".;C:\php5\pear"[/code]

To...

include_path = "e:\php;e:\php\pear;."


NET STOP iisadmin

enter Y

Wait till it's done

NET START w3svc


me!


Link to comment
Share on other sites

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.