Solved

Windows PHP5 MySQL installation problems

Posted on 2004-07-30
8
48,605 Views
Last Modified: 2013-12-13
Hi folks -  

I'm having a terrible time getting mysql support up for php5 on my devlopment machine.  I'm new to the php environment, and I'm obviously missing something, hopefully something obvious to those more experienced!  Is there some other library I need besides php_mysql and libmysql maybe?

Versions:
php5 (just downloaded)
mysql 4.0.20a-nt  (as reported by c:/php/bin/mysql)
WinXP Pro
IIS

PHP.ini contains:
extension_dir = "c:/php/ext/"
extension=php_mysql.dll

File Locations:
php_mysql.dll is in c:/php/ext/
libmySQL.dll is in c:/windows/system32/

My simple test code:
<?
echo '<br> php running';
$dbcnx = mysql_connect('localhost');
echo '<br> connection ran OK';
?>


Results:
Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0
Content-type: text/html X-Powered-By: PHP/5.0.0
php running
Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\CAFGPHP\test.php on line 4
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/php/ext/php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0

Thanks so much for your help.
0
Comment
Question by:savageanne
8 Comments
 
LVL 1

Expert Comment

by:it-guy
ID: 11679568
Hi savageanne,
Did you add the line "extension=php_mysql.dll" on your own?
I am running an identical setup to you, but I don't have a mysql extension loading into the php.ini file.

If you added it on your own, take it out and try restarting the web service.
0
 
LVL 2

Expert Comment

by:japly53
ID: 11686875
I'm a beginner too, and if you are installing php on your computer. You should get XAMMP, it install everything you need (apache, PHP, mysql, php,etc) Very easy installation, next,next,next, your done!
http://www.apachefriends.org/en/xampp.html

Once you have it installed, you just start the server by clicking on a file.  The you can access your own server by typing http://localhost.  

I also use a php editor called DzSoft PHP Editor:
http://www.dzsoft.com/

I hope this helps.
0
 

Author Comment

by:savageanne
ID: 11690355
Hi folks -

Thanks for your help.  I did solve the problem.  Turns out there were two different copies of libmysql.dll on my machine.  

One was 244 KB dated 5/29/04 and was in the mysql\opt directory.
The other was 228 KB dated 7/13/04 and was in the php\ext directory.  

The 244 KB one was the one I had copied into my system32 directory and that didn't work at all.  Once I copied the correct version from php\ext to system32 all was well.  

Thanks for your suggestions in any case.

- Anne
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Accepted Solution

by:
OzzMod earned 0 total points
ID: 11734792
Closed, 125 points refunded.
Thanks

OzzMod
Community Support Moderator
0
 

Expert Comment

by:gunghoassassin
ID: 11768765
Using php5 with Windows is not yet a good idea.  It seems that there's a pretty common bug with php5 that crashes both apache 1.3 and apache 2 quite often, especially if you're using a high traffic server.
0
 
LVL 10

Expert Comment

by:iamanindian
ID: 13001715
Perhaps this link would be of some help:
http://www.solutions2day.com/small_business_solutions/viewtopic.php?p=6#6

Regards
Iamanindian
0
 

Expert Comment

by:JSalisbury
ID: 14292042
Same problem - same solution !!! Fixed thanks.
I copied the 228K dll from the php installation into windows/system32 and apache started OK.
I'm not quite sure how apache was grabbing the version that came with mysql - I'm just happy it works now.


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
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.

746 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

10 Experts available now in Live!

Get 1:1 Help Now