#38070 [Opn->Bgs]: libmysql.dll and/or php_mysql.dll
| From: | tony2001@php.net | Date: | Tue, 11 Jul 2006 23:14:37 +0000 |
| Subject: | #38070 [Opn->Bgs]: libmysql.dll and/or php_mysql.dll | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99349@lists.php.net to get a copy of this message | ||
ID: 38070
Updated by: tony2001@php.net
Reported By: rodney at nerdsindenial dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windows XP Pro/sp2
PHP Version: 5.1.4
New Comment:
You're mixing modules from different versions of PHP.
Previous Comments:
------------------------------------------------------------------------
[2006-07-11 18:45:24] rodney at nerdsindenial dot com
Description:
------------
I have the same problem and have tried most of the proposed solution
(change PHPRC, eliminate all of the php.ini files but one; move
php_mysql.dll and/or libmysql.dll to php/ext and php). I can create and
populate a database
in MySQL v5.1; install and run PHP5.2 (this is from the daily build
directory to pick up the fixes php5_apache2.dll -> php_apache2_2.dll to
solve dependency issues with missing dll for LoadModule php5_module
modules/php_apache2.dll (broken, need new name) in "X":\php\php.ini) I
found this solution and directory in the www.php.net FAQ's. I was able
to run PHP scripts from a mozilla FireFox client on the Apache server
in the .\Apache2.2\httdocs directory including phpinfo(). The Apache
v2.2.2 server installed and ran without a hitch. HOWEVER, I COULD NOT
link to mysql_connect() or any other mysql function within a PHP
script. I finally changed display_startup_errors in the php.ini file
from off-to-on and restarted
the Apache 2.2.2 server. It displayed the following in a warning dialog
box:
PHP Startup: Unable to initialize module
Module compiled with module API=20050613, debug=0, thread-safety=1
PHP compiled with module API=20050922, debug=0, thread-safety=1
These options need to match
OK
I am not able to compile the source for libmysql.dll or php_mysql.d..
(PECL).
It looks like a recompile of the mysql "shared" libraries may solve
either all
or part of the problem. I hope the developers at www.php.net are
listening??
Irie
Rodney
Reproduce code:
---------------
<?PHP
$dbUser = "root";
$dbPass = "";
$dbName = "DVDRentals";
$dbHost = "THIRDWORLD";
if(!($link=mysql_pconnect($dbHost, $dbUser, $dbPass)))
{
error_log(mysql_error(), 3, "/tmp/phplog.err");
}
if(!mysql_select_db($dbName, '127.0.0.1'))
{
error_log(mysql_error(), 3, "/tmp/phplog.err");
}
$queryDVD = "SELECT \* FROM DVDs";
$result = mysql_query($queryDVD, $link1);
$array1 = mysql_fetch($result);
print($array1);
mysql_close($link);
?>
Expected result:
----------------
At least an attempted connect to the database.
Actual result:
--------------
Connect To MySQL Server and List DVD's
Fatal error: Call to undefined function mysql_pconnect() in D:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\listDVDs.html on line
14
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38070&edit=1