Solved

Windows PHP5 MySQL installation problems

Posted on 2004-07-30
8
48,677 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

737 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