Solved

PHP5 and MySQL 3.23

Posted on 2004-09-22
8
886 Views
Last Modified: 2013-12-12
I've installed IIS, PHP5 and MySQL 3.23 on my local webserver
I edit php.ini file to enable loading extension libraries file.
Problem come to when I load MySQL library file: php_mysql.dll
A warning displaywhen I brower a *.php file from webserver. The warning is:
PHP Startup: Unable to load dynamic library 'C:\PHP5\ext\php_mysql.dll' - The speciafied module could not be found.
I don't know why even though I checked carefully the path in php.ini and in my hard disk. Both is the same. The other extension libraries is loaded ok, for example php_mssql.dll or php_snmp.dll
Could you show a way to fix this problems
Thanks!
0
Comment
Question by:nguyen_vantuananh
8 Comments
 
LVL 32

Expert Comment

by:ldbkutty
ID: 12120819
have you Copied php_mysql.dll to c:\windows\system32 ?
0
 

Author Comment

by:nguyen_vantuananh
ID: 12121216
I also try to copy that file to $system$ folder, but cant solve problem
0
 
LVL 4

Expert Comment

by:cachedVB
ID: 12122033
maybe its one built for php3 and php5 doesnt support it anymore
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!

 
LVL 1

Expert Comment

by:NchMch
ID: 12137508
To install MySQL 3.x extension with PHP 5 (assuming you've installed it in C:\PHP5\):
1. in php.ini:
   extension_dir = "C:\PHP5\ext"
uncomment
   extension=php_mysql.dll

2. Make sure C:\PHP5\ext\php_mysql.dll exists.

3. Copy libmysql.dll (it should be in C:\PHP5\ directory) to C:\WINDOWS\system32\. If you don't move libmysql.dll to  C:\WINDOWS\system32 you are likely to get "can't load c:\php5\ext\php_mysql.dll" [looks familiar? ;)]

Here is the official information:
http://www.php.net/manual/en/faq.databases.php#faq.databases.mysql.php5

0
 

Author Comment

by:nguyen_vantuananh
ID: 12139519
Thank NchMch!
Your solution is OK.
By the way, could you show me how I can change the host name of MySQL server. Normally, my web server have a name, for example SERVERTEST, but in connect string, I must use LOCAHOST to connect to MySQL server.
Exactly, I want to use the name SERVERTEST in connect string.
Can you help me?
0
 
LVL 1

Expert Comment

by:NchMch
ID: 12142119
I understand you want to change hostname used in yuur PHP scripts. Normally, you should use 'localhost' for development. You can try using different name, though:

1) If SERVERTEST is only your made-up local name, and it's not supposed to resolve to your network card IP you can modify your "C:\WINDOWS\system32\drivers\etc\hosts" file so SERVERTEST always resolves to 127.0.0.1. Add the following line:
127.0.0.1       SERVERTEST

2) If SERVERTEST is your network host, and it resolves for example to "192.168.0.1" you can use the "bind-address" option in your my.cnf or my.ini to make your MySQL server listen on this IP.
To make it listen on specified IP only (eg. 192.168.0.1):
    * Add bind-address=192.168.0.1 to section [mysqld] of my.ini (/my.cnf)

Note, that if you don't specify bind-address, MySQL will listen on all addresses available.
Still, you need to allow access to it by creating/modifying the appropriate accounts.
You can do so using the GRANT command or by using some frontend, like phpMyAdmin or MySQL-Front.
- connect to your server as root
- choose the 'user' table in 'mysql' database
- you will see user accounts table, modify the 'host' value of each user to match your needs (use % to allow access from all hostnames - not very secure solution, though).

0
 
LVL 1

Accepted Solution

by:
NchMch earned 49 total points
ID: 12142224
One additional warning here - be VERY careful NOT to disallow access to user 'root' from host 'localhost' because you might not be able to access your database then. Also, it's better not to use 'root' user to access your MySQL database via PHP scripts - for example, malicious/untested script could damage your database. Create additional user, with restricted permissions. Read this - http://dev.mysql.com/doc/mysql/en/Adding_users.html .
If you prefer GUI tools, I think you can also use MySQL Administrator (http://dev.mysql.com/downloads/administrator/index.html), but reading information in the above URL is still recommended.
0
 

Author Comment

by:nguyen_vantuananh
ID: 12148857
OK, everything is so clear to me now. Thank for your help. :)
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
show child records separated by commas 12 33
Wordpress and Wufoo 1 36
Make check boxes work 8 40
How to hide contact form only if no validation errors 4 20
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

679 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