10/10/2018, 09:31
Ức chế PHP5 & MySQL5
Chào các bác,
Em đang vô cùng ức chế với 2 cái này suốt mấy ngày nay. Không làm sao cho thằng MySQL hoạt động cùng với PHP được.
Em tả lại quá trình làm thế này cho các bác xem nhé:
1) Download & Install MySQL 5.0.27 (Windows Installer). Test query browser -> OK.
2) Download & Install PHP 5.05 (cũng Windows Installer nốt).
3) Create 1 file test.php:
<?php
phpinfo();
?>
http://localhost/test.php -> OK
3) Download 2 file php_mysql.dll & libmysql.dll từ http://dev.mysql.com/downloads/connector/php. Rồi tống thằng php_mysql.dll -> C:PHPext, libmysql.dll -> C:WINDOWSSYSTEM32.
4) Uncomment cái dòng extension=php_mysql.dll trong file php.ini
5) Lần này mở test.php thì nó thông báo lỗi:
"PHP Warning: PHP Startup: Unable to load dynamic library 'C:PHPextphp_mysql.dll' - The specified procedure could not be found. in Unknown on line 0"
Đấy. Các bác xem em làm sai chỗ nào mà nó cứ bung ra cái thông báo dở hơi đó chứ.
Em đang vô cùng ức chế với 2 cái này suốt mấy ngày nay. Không làm sao cho thằng MySQL hoạt động cùng với PHP được.
Em tả lại quá trình làm thế này cho các bác xem nhé:
1) Download & Install MySQL 5.0.27 (Windows Installer). Test query browser -> OK.
2) Download & Install PHP 5.05 (cũng Windows Installer nốt).
3) Create 1 file test.php:
<?php
phpinfo();
?>
http://localhost/test.php -> OK
3) Download 2 file php_mysql.dll & libmysql.dll từ http://dev.mysql.com/downloads/connector/php. Rồi tống thằng php_mysql.dll -> C:PHPext, libmysql.dll -> C:WINDOWSSYSTEM32.
4) Uncomment cái dòng extension=php_mysql.dll trong file php.ini
5) Lần này mở test.php thì nó thông báo lỗi:
"PHP Warning: PHP Startup: Unable to load dynamic library 'C:PHPextphp_mysql.dll' - The specified procedure could not be found. in Unknown on line 0"
Đấy. Các bác xem em làm sai chỗ nào mà nó cứ bung ra cái thông báo dở hơi đó chứ.
Bài liên quan
C:\WINDOWS\php.ini
extension_dir = "C:/PHP/ext/"
Các bác chả đọc kỹ j cả
Để mai em thử cài 2 thằng này xem sao
Installing the extensions is easy. You have to verify two settings in your php.ini configuration file and copy the extensions to the php extension directory.
Step by step:
* Unpack the download archive
* Copy the php_*.dll files to your PHP extension directory
You can look up and confiugure the PHP extension directory in your php.ini file. A typical location for the php.ini file is C:\php\php.ini. The PHP extension directory is configured using the extension_dir setting, for example:
extension_dir = C:\php\extensions
Copy the php_*.dll files contained in the download to your PHP extension directory, for example to: C:\php\extensions
* Enable the PHP extensions that you want to use in the php.ini file
Uncomment or add the following lines to your php.ini file:
// MySQL extension
extension=php_mysql.dll
// MySQLi extension
extension=php_mysqli.dll
* Copy the libmysql.dll to the PHP installation directory
A typical location for your PHP installation directory is C:\php . Exchange the libmysql.dll file that is in the directory and overwrite it with the file from the download archive.
Chắc vấn đề ở đây ạ?
Mình cũng cẩn thận thử download cả PHP5 Zip Package về rồi upzip & copy đè cả 2 file trên nhưng cũng ko có j khác biệt.
copy file : libmysql.dll vào c:\php\ hay c:\apache\bin (nếu dùng modules of apache
copy file php_***.dll vào c:\php\ext
cấu hình file php.ini : extension_dir = c:\php\exe
hy vọng bạn chạy được
Tuy nhiên hôm qua mình vừa download thử PHP5.2 thì thấy lần này PHP Installer đã thay đổi, theo đó MySQL Connection Tool được gắn luôn với bộ cài PHP. Khi chạy setup chỉ cần select MySQL trong phần Extension. That's all!
tôi đang dùng bản vetrigo mới nhất:
thông sô:
Apache: 2.0
PHP: 5.2
Mysql:5.0
ngoài ra nó còn tích hợp các tool như:
phpmyadmin 2.9
SQLlite
zend..
bạn có thể download tại đây:
http://download.ttv.vn/