php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45512 php_mysql.dll can't be loaded
Submitted: 2008-07-14 15:30 UTC Modified: 2008-07-22 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: jianglinchun at live dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.2.6 OS: windows xp(sp3)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jianglinchun at live dot com
New email:
PHP Version: OS:

 

 [2008-07-14 15:30 UTC] jianglinchun at live dot com
Description:
------------
I have problem with configure php_mysql for php-5.2.6-Win32.

The same problem:
1. http://we.designandco.de/2008/06/19/php-526-win32-wtf-happened-to-the-mysql-extension/

2. http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2)-td17201936.html

------begin httpd.conf------
#php
LoadFile "D:\open source\php\php-5.2.6-Win32\php5ts.dll"
LoadModule php5_module "D:\open source\php\php-5.2.6-Win32\php5apache2_2.dll"
PHPIniDir "D:\open source\php\php-5.2.6-Win32"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
------end httpd.conf------

------begin php.ini------
; Directory in which the loadable extensions (modules) reside.
extension_dir = "D:\open source\php\php-5.2.6-Win32\ext"
------begin php.ini------


Reproduce code:
---------------
When those code are executed.
<?php
phpinfo();
?>

mysql will be found nowhere.

Expected result:
----------------
php_mysql.dll should be loaded!


Actual result:
--------------
php_mysql.dll doesn't loaded

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-14 18:19 UTC] jani@php.net
Check phpinfo() for what php.ini file is actually loaded and used..
 [2008-07-15 01:03 UTC] synaptic dot axon at gmail dot com
Time to get serious, jani...
 [2008-07-15 02:27 UTC] jianglinchun at live dot com
Finally. I solved this problem by copy libmysql.dll from Php home directory to c:\windows.

1. I am very sure that I configured php module for apache correctly.
2. I changed my enviornment variable to add "D:\open source\php\php-5.2.6-Win32" to the path
3. restart apache
4. make suare the php.ini was loaded correctly
5. I visit the phpinfo.php page. I found that the enviornment variable wasn't refreshed. I tried to restart apache a couple of times. But the path variable were still the same.
6. I copy libmysql.dll to c:\windows and restarted apache. I found mysql information on my phpinfo.php page finally.

I thought:
1. The enviornment variable should refreshed correctly. This maybe a problem
2. Home directory and extention directory are strongly demanded to be added the enviornment variables.

Hope this help your guys. :D A nice day. :D
 [2008-07-19 09:24 UTC] carsten_sttgt at gmx dot de
> 1. The enviornment variable should refreshed correctly.
> This maybe a problem

A service (Apache) recognize an environment variable change only with a Windows restart.


> 2. Home directory and extention directory are strongly
> demanded to be added the enviornment variables.

Only the PHP dir should be in your PATH:
http://de.php.net/manual/en/install.windows.manual.php

(LoadFile is also not neccesary, if the PHP dir is in your PATH)
 [2008-07-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-11-04 10:39 UTC] ymzuowei at gmail dot com
the system can not load libmysql.dll correctly, add the directory of libmysql to PATH or copy it to %WINDOWS%/system32/
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 12:01:28 2025 UTC