Solved

PHP5 and MySQL 3.23

Posted on 2004-09-22
8
890 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
[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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

738 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