|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-11 23:14 UTC] tony2001@php.net
[2006-07-12 02:04 UTC] rodney at nerdsindenial dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 15:00:01 2025 UTC |
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