Bug #21138 | mysql_real_connect() failing when connecting to remote hosts on Apache-2.2/PHP-5 | ||
---|---|---|---|
Submitted: | 19 Jul 2006 8:53 | Modified: | 28 Sep 2006 12:59 |
Reporter: | Mo McRoberts | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.22 | OS: | Solaris (Solaris/sparc) |
Assigned to: | CPU Architecture: | Any |
[19 Jul 2006 8:53]
Mo McRoberts
[19 Jul 2006 8:54]
Mo McRoberts
Configuration options used for PHP, Apache and MySQL
Attachment: configuration-options.txt (text/plain), 2.95 KiB.
[19 Jul 2006 8:55]
Mo McRoberts
Output of ‘ldd’ on the MySQL client binary, the PHP module and the Apache httpd binary
Attachment: ldd-output.txt (text/plain), 4.92 KiB.
[19 Jul 2006 10:01]
Valeriy Kravchuk
Thank you for a problem report. Please, send the exact code of demo PHP application/web page that demonstrates the behaviour described. Please, send also the results of: SELECT user, host FROM mysql.user;
[19 Jul 2006 10:12]
Mo McRoberts
Test case: <?php $link = mysql_connect('server.domainname.com', 'username', 'password', true); echo mysql_error(); ?> Running this from the command-line succeeds. Running this from within Apache fails. Local database connections (hostname is empty or 'localhost') succeeds. It doesn't matter what authentication details are supplied in the failure case, or indeed which server (I have several to choose from, running various different versions of MySQL)—a connection is never established so no authentication ever happens. Running ‘mysql -uusername -ppassword -hserver.domainname.com’ on the same server also succeeds. If you really want the output from ‘mysql.user’, I can paste it, though it should be irrelevant (and I'd just be picking one server at random).
[28 Aug 2006 12:59]
Valeriy Kravchuk
Please, try to repeat with a newer version, 5.0.24. If you'll be able to repeat the same behaviour described, plese, send a list of exact steps you had performed to configure and build PHP 5.1.4 with MySQL support.
[28 Sep 2006 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".