You are here: Re: A PHP/MySQL Connnector Problem « PHP Programming Language « IT news, forums, messages
Re: A PHP/MySQL Connnector Problem

Posted by TonyB on 11/05/13 11:40

It's looking better................

Copying libmysql.dll to apache2/bin eliminated the "Unable to load
dynamic library
'C:/core/web/php512/ext/php_mysql.dll'" message from the Apache
log...... Now, during a restart of Apache, the log (below) is clean of
startup error messages. (The error in the last line of the log is
coming from the application). The server now appears to be locating
functions in php_mysql.dll.

[Mon Feb 20 08:25:40 2006] [notice] Child 684: Child process is exiting
[Mon Feb 20 08:25:40 2006] [notice] Parent: Child process exited
successfully.
[Mon Feb 20 08:25:45 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.2
configured -- resuming normal operations
[Mon Feb 20 08:25:45 2006] [notice] Server built: Oct 9 2005 19:16:56
[Mon Feb 20 08:25:45 2006] [notice] Parent: Created child process 4316
[Mon Feb 20 08:25:45 2006] [notice] Child 4316: Child process is
running
[Mon Feb 20 08:25:45 2006] [notice] Child 4316: Acquired the start
mutex.
[Mon Feb 20 08:25:45 2006] [notice] Child 4316: Starting 250 worker
threads.
[Mon Feb 20 08:25:53 2006] [error] [client 127.0.0.1] PHP Warning:
mysql_connect() [<a
href='function.mysql-connect'>function.mysql-connect</a>]: Unknown
MySQL server host 'mysql' (11001) in
C:\\core\\web\\Apache2\\htdocs\\app1\\helloMySQL.php on line 34

I don't understand why this is now working when the folder containing
libmysql.dll was on the path (see the echo output below); but it's
working so that's good... From a DOS window, echoing the path results
in the output below; the folder ..\php512 appears to be on the path
and this is where libmysql.dll was (and is) sitting..

C:\Documents and Settings\HP_Administrator>echo %PATH%

C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Python22;\C:\WINDOWS\

core\web\php512;;C:\PROGRA~1\COMMON~1\MUVEET~1\030625;C:\PROGRA~1\COMMON~1\MUVEE
T~1\030625

So, for my PC, one additional step (step 4) is added to the connector
setup procedure:.

1. In php.ini, enable php_mysql.dll by uncommenting
"extension=php_mysql.dll".
2. In php.ini, set "extension_dir" to the folder containing
php_mysql.dll which on my PC is C:/core/web/php512/ext/
3. Windows system PATH. Add ";\%SystemRoot%\core\web\php512" which
places libmysql.dll on the PATH.
4. Copy php_mysql.dll to ../Apache2/bin.

Thanks for your suggestion.

The next step is to figure out why "mysql" is the wrong name for the
mysql instance on my pc... The php page is bombing here:

$link = mysql_connect('mysql', 'root', '<password>')
or die('Could not connect: ' . mysql_error());

According to the server information section of MySQL Administrator, the
network name of the MySQL server is localhost.... lets see if changing
mysql to localhost has an effect.....


-Tony

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация