Could not connect to the database server

Joomla version 1.0 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
malks
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Feb 14, 2012 5:15 am

Could not connect to the database server

Post by malks » Tue Feb 14, 2012 5:27 am

Hi,

I've inherited a Joomla! install that I'm trying to get working. I've done all the usual things and I'm pretty sure the database is there and I can connect to it. Output of the Post Assistant is below and I've also created a simple test.php (content below) that connects successfully, but I cannot get Joomla! to connect. I was going to do a fresh install of Joomla! 1.0 but couldn't find an install package to do that with. How do I find out what Joomla! is complaining about?

Sorry for the very basic question on a very old version, but any help appreciated.

Malks.

My test.php which connects successfully and lives in the root directory of the Joomla! install.

Code: Select all

require( 'configuration.php' );
// $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix );

$link = mysql_connect($mosConfig_host, $mosConfig_user, $mosConfig_password, true);
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully<br />';
if (!mysql_select_db( $mosConfig_db, $link )) {
	die('Could not select database: ' . mysql_error());
}
echo $mosConfig_db . ' selected successfully<br />';
$query = "SELECT * FROM " . $mosConfig_dbprefix . "contact_details";
$result = mysql_query($query);
if (!result) {
	die('Invalid query: ' . mysql_error());
}
while ($row = mysql_fetch_assoc($result)) {
	echo $row['name'] . '</br>';
}
mysql_close($link);
Output of Post Assistant
Last PHP Error(s) Reported :: Forum Post Assistant (v1.2.0) : 13th February 2012 wrote:[13-Feb-2012 22:57:37] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2ts.lin' - /usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2ts.lin: undefined symbol: executor_globals_id in Unknown on line 0
Forum Post Assistant (v1.2.0) : 13th February 2012 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 1.0.15-Stable (Daytime) 22 February 2008
Joomla! Configured :: Yes | Writable (644) | Owner: malkouna (uid: 609/gid: 609) | Group: malkouna (gid: 609) | Valid For: 1.0
Configuration Options :: Offline: 0 | SEF: 0 | SEF Suffix: N/A | SEF ReWrite: N/A | .htaccess/web.config: Yes | GZip: 0 | Cache: 0 | FTP Layer: N/A | SSL: N/A | Error Reporting: | Site Debug: 1 | Database Credentials Present: Yes

Host Configuration :: OS: Linux | OS Version: 2.6.38.7 | Technology: i686 | Web Server: Apache | Encoding: gzip, deflate | Doc Root: /home/malkouna/public_html/farmguide | System TMP Writable: Yes

PHP Configuration :: Version: 5.2.17 | PHP API: cgi-fcgi | Session Path Writable: Yes | Display Errors: 1 | Error Reporting: 6135 | Log Errors To: error_log | Last Known Error: 13th February 2012 23:02:23. | Register Globals: | Magic Quotes: | Safe Mode: | Open Base: | Uploads: 1 | Max. Upload Size: 64M | Max. POST Size: 256M | Max. Input Time: 60 | Max. Execution Time: 300 | Memory Limit: 512M

MySQL Configuration :: Version: 5.1.56 (Client:5.1.56) | Host: --protected-- (--protected--) | Collation: utf8_unicode_ci (Character Set: utf8) | Database Size: 29.56 MiB | #of _FPA_TABLE: 117
Detailed Environment :: wrote:PHP Extensions :: date (5.2.17) | libxml () | openssl () | pcre () | zlib (1.1) | bcmath () | bz2 () | calendar () | ctype () | curl () | dbase () | dom (20031129) | hash (1.0) | filter (0.11.0) | ftp () | gd () | gettext () | session () | iconv () | standard (5.2.17) | json (1.2.1) | mbstring () | mcrypt () | mhash () | mime_magic (0.1) | mssql () | mysql (1.0) | SimpleXML (0.1) | odbc (1.0) | posix () | pspell () | Reflection (0.1) | imap () | SPL (0.2) | mysqli (0.1) | soap () | sockets () | exif (1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $) | tidy (2.0) | tokenizer (0.1) | wddx () | xml () | xmlreader (0.1) | xmlrpc (0.51) | xmlwriter (0.1) | xsl (0.1) | zip (1.8.11) | cgi-fcgi () | magickwand (1.0.8) | uploadprogress (1.0.1) | PDO (1.0.4dev) | pdo_sqlite (1.0.1) | SQLite (2.0-dev) | pdo_mysql (1.0.2) | ionCube Loader () | Zend Optimizer () | Zend Engine (2.2.0) |
Potential Missing Extensions :: suhosin |

Switch User Environment (Experimental) :: PHP CGI: Yes | Server SU: Yes | PHP SU: Yes | Custom SU (Cloud/Grid): No
Potential Ownership Issues: Maybe
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | mambots/ (755) | language/ (755) | templates/ (755) | cache/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/templates/ (755) |
Templates Discovered :: wrote:Templates :: SITE :: mbt shopping (1.0) | limbocms (1.0) | siteground25 (1.0) | farmguide (1.0) | farmguide (1.0) | Rays of Sunlight (1.1) | Red Evolution Twenty Nine (1) | dwd_greybusiness (1.0) | madeyourweb (1.3) | rhuk_solarflare_ii (2.2) | siteground28 (1.0) | siteground26 (1.0) | farmsilver (2.2) |
Templates :: ADMIN :: Joomla Admin (1.0) |

malks
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Feb 14, 2012 5:15 am

Re: Could not connect to the database server

Post by malks » Tue Feb 14, 2012 7:24 am

I found what the problem was, a custom component being displayed on the home page, had some hard wired connection details in it. Once this was fixed the site was fine. Still curious to find where logging would have happened and if it would have been useful.

Sorry for the noise.


Locked

Return to “Installation - 1.0.x”