|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-28 15:21 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
Description: ------------ I created the following file in my web root. # more test.php <pre> <?php $link = mysql_connect("10.50.50.4", "phpbb", "PASSWORD"); echo mysql_get_server_info() . "\n"; echo mysql_get_host_info() . "\n"; echo mysql_get_client_info() . "\n"; if ($link) { mysql_close($link); } ?> ok </pre> And when it's run from the CLI version everything is fine. # /usr/local/bin/php -f test.php <pre> 4.0.17-standard 10.50.50.4 via TCP/IP 4.0.16 ok </pre> However when I try to pull it up via the web interface I get: Warning: mysql_connect(): Can't connect to MySQL server on '10.50.50.4' (2) in /export/mirrors2/ragga-jungle.com/phpBB-2.0.6/test.php on line 4 Warning: mysql_get_server_info(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /export/mirrors2/ragga-jungle.com/phpBB-2.0.6/test.php on line 5 Warning: mysql_get_server_info(): A link to the server could not be established in /export/mirrors2/ragga-jungle.com/phpBB-2.0.6/test.php on line 5 Warning: mysql_get_host_info(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /export/mirrors2/ragga-jungle.com/phpBB-2.0.6/test.php on line 6 Warning: mysql_get_host_info(): A link to the server could not be established in /export/mirrors2/ragga-jungle.com/phpBB-2.0.6/test.php on line 6 4.0.16 ok -- SOFTWARE USED: php 4.3.4 (./configure --with-apxs2=/usr/local/apache/bin/apxs --with-gd --with-zlib --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-mysql=/usr/local/mysql --with-xml) mysql 4.0.17 (./configure --without-server --without-debug --without-docs --without-bench --prefix=/usr/local/mysql) apache 2.0.48 (./configure --prefix=/usr/local/apache --with-mpm=worker --enable-modules="so dl rewrite") Here's some output from config.status in the php build directory: hostname = jujitsu uname -m = sun4u uname -r = 5.8 uname -s = SunOS uname -v = Generic_108528-24 /usr/bin/uname -p = sparc /bin/uname -X = System = SunOS Node = jujitsu Release = 5.8 KernelID = Generic_108528-24 Machine = sun4u BusType = <unknown> Serial = <unknown> Users = <unknown> OEM# = 0 Origin# = 1 NumCPU = 2 Reproduce code: --------------- see description Expected result: ---------------- see description Actual result: -------------- see description