php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27079 mysql functions availiable from cli but not from apache module
Submitted: 2004-01-28 15:16 UTC Modified: 2004-01-28 16:56 UTC
From: evan at mirrored dot ca Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.4 OS: Solaris 8
Private report: No CVE-ID: None
 [2004-01-28 15:16 UTC] evan at mirrored dot ca
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-28 15:21 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Ask support questions elsewhere, there is no bug here.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 23:01:26 2024 UTC