From:             evan at mirrored dot ca
Operating system: Solaris 8
PHP version:      4.3.4
PHP Bug Type:     MySQL related
Bug description:  mysql functions availiable from cli but not from apache module

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

-- 
Edit bug report at http://bugs.php.net/?id=27079&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27079&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27079&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27079&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27079&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27079&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27079&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27079&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27079&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27079&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27079&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27079&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27079&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27079&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27079&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27079&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27079&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27079&r=float

Reply via email to