[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Windows PHP5 MySQL installation problems

Posted on 2004-07-30
8
Medium Priority
?
48,723 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
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…
The viewer will learn how to count occurrences of each item in an array.
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.
Suggested Courses

649 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