We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5472
    • 15 Posts
    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
      • 22303 MODX Staff
      • 10,725 Posts
      Please provide a specific PHP version being used; sounds like you are using PHP 4.2 or lower.
        • 5472
        • 15 Posts
        Quote from: OpenGeek at Jan 29, 2007, 12:31 PM

        Please provide a specific PHP version being used; sounds like you are using PHP 4.2 or lower.

        My Provider (Strato.de) supports PHP 3, 4 and 5.
        How Do I know WHICH version I’m using?
          • 33337
          • 3,975 Posts
          create a simple info.php file, insert this in it:
          <?
          phpinfo();
          ?>
          

          upload it to your server, point your browser to this file, e.g. domain.com/info.php

          You will see the php version there.

          regards.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 5472
            • 15 Posts
            You will see the php version there.

            Thanx, you were right.
            I used PHP 4.1.x
            Changed it to PHP 4.3.8, now everything works laugh

            CU
            clioschrotter