Ask a Question related to PHP Development, Design and Development.
-
robin dot fredman at armagedon dot org #1
#26226 [NEW]: Suddenly unable to reach the MySQL database
From: robin dot fredman at armagedon dot org
Operating system: Win98
PHP version: 4.3.4
PHP Bug Type: MySQL related
Bug description: Suddenly unable to reach the MySQL database
Description:
------------
I have an Apache webserver up and running, using PHP to communicate with a
MySQL database. The database pretty much handles everything on the page,
so if php can't connect too it, nothing will load.
Reproduce code:
---------------
dbconnect.php:
<?php
$connection = mysql_connect ("localhost", "<username>", "<password>") or
die ( "Could not connect to localhost" );
$database = mysql_select_db ("data_base", $connection);
?>
Expected result:
----------------
I expect to see the whole page load, i.e. that it can connect to the
Database and then proceed to load the rest of the page.
Actual result:
--------------
Instead, I get a white screen with the following text:
Warning: mysql_connect(): Can't connect to MySQL server on 'localhost'
(10055) in E:\Program\Apache Group\Apache2\htdocs\functions\dbconnect.php
on line 2
Could not connect to localhost
I'm not sure wether it is a MySQL error, or if it's PHP. However,
mysqladmin version shows that there is no problems. I am also running
mysqld --log-error, and the log shows nothing faulty. It seems as if php
is unable to access port 3306 or something. When reloaded several times,
the page sometime loads "half-way", i.e. text and some colours, but
usually no pictures. When reloaded a few more times, it's just the result
above again.
--
Edit bug report at [url]http://bugs.php.net/?id=26226&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=26226&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=26226&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=26226&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=26226&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=26226&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=26226&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=26226&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=26226&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=26226&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=26226&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=26226&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=26226&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=26226&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=26226&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=26226&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=26226&r=float[/url]
robin dot fredman at armagedon dot org Guest
-
MySQL Database not retrieving the full database
Hi, I am using MySQL and PHP for my repository. It has 500+ records. till now it was displayiing all records in the database, but since from one... -
suddenly asked for database password
I changed my Ms access database into a arial unicode one and the next time i tried to upload it or see a page which use the website i get the... -
Suddenly unable to contact Coldfusion
I have been running a registered Standard Ed. Coldfusion MX 7 Server with integration into Apache2 on Gentoo now for roughly 1 week. However, after... -
#26226 [Opn->Bgs]: Suddenly unable to reach the MySQL database
ID: 26226 Updated by: iliaa@php.net Reported By: robin dot fredman at armagedon dot org -Status: Open +Status:... -
#26226 [Opn]: Suddenly unable to reach the MySQL database
ID: 26226 User updated by: robin dot fredman at armagedon dot org Reported By: robin dot fredman at armagedon dot org Status: ...



Reply With Quote

