Hello,
today I did install MODx on a web server. The installation was easy, no problems. Even my database could be connected.
No, for the first time, I wanted to login to the Manage Section with the username and password I entered at the installation. Right after I put in my username and password an clicked on "Login" I got the following error message:
<b>Warning</b>: Wrong parameter count for mysql_connect() in
<b>/mnt/ja1/08/243/00000017/htdocs/modx/manager/includes/extenders/dbapi.mysql.class.inc.php</b>
on line <b>85</b>
<b>Warning</b>: Wrong parameter count for mysql_connect() in
<b>/mnt/ja1/08/243/00000017/htdocs/modx/manager/includes/extenders/dbapi.mysql.class.inc.php</b>
on line <b>85</b>
<b>Warning</b>: Wrong parameter count for mysql_connect() in
<b>/mnt/ja1/08/243/00000017/htdocs/modx/manager/includes/extenders/dbapi.mysql.class.inc.php</b>
on line <b>85</b>
....
This message appears in an extra window and can only be closed.
Here’s the code from line 78 - 99 of the mentioned file:
function connect($host=’’,$dbase=’’, $uid=’’,$pwd=’’, $persist = 0) {
global $modx;
$uid = $uid ? $uid : $this->config[’user’];
$pwd = $pwd ? $pwd : $this->config[’pass’];
$host = $host ? $host : $this->config[’host’];
$dbase = $dbase ? $dbase : $this->config[’dbase’];
$tstart = $modx->getMicroTime();
if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {
$modx->messageQuit("Failed to create the database connection!");
exit;
} else {
$dbase = str_replace(’`’, ’’, $dbase); // remove the `` chars
if (!@ mysql_select_db($dbase)) {
$modx->messageQuit("Failed to select the database ’" . $dbase . "’!");
exit;
}
$tend = $modx->getMicroTime();
$totaltime = $tend - $tstart;
if ($modx->dumpSQL) {
$modx->queryCode .= "<fieldset style=’text-align:left’><legend>Database connection</legend>" . sprintf("Database connection was created in %2.4f s", $totaltime) . "</fieldset>
";
}
$this->isConnected = true;
Web Server:
* PHP version: 4/5
* MySQL version: 5.0.21
Browser/Client:
* Mozilla Firefox 2.0 / IE6
* WinXP Prof SP2
MODx:
* 0.9.5
* No changes, just installed MODx
Thanx for your help
-
MODX Staff
- 10,725 Posts
Please provide a specific PHP version being used; sounds like you are using PHP 4.2 or lower.