Koozali.org: home of the SME Server

PHP

J.Holwerda

PHP
« on: June 11, 2002, 06:13:50 PM »
Hi when i Try too get a PHP script running i get this error

Attempting to connect...


Warning: Access denied for user: 'www@localhost' (Using password: NO) in /home/e-smith/files/primary/html/admin/db_mysql.php on line 29

Warning: Supplied argument is not a valid MySQL-Link resource in /home/e-smith/files/primary/html/admin/db_mysql.php on line 37


when i look in the script line 25 too 39 this is what i find

 function connect() {
    // connect to db server

    if ( 0 == $this->link_id ) {
      if ($this->password=="") {
        $this->link_id=mysql_pconnect($this->server,$this->user);
      } else {
        $this->link_id=mysql_pconnect($this->server,$this->user,$this->password);
      }
      if (!$this->link_id) {
        $this->halt("Link-ID == false, connect failed");
      }
      if ($this->database!="") {
        if(!mysql_select_db($this->database, $this->link_id)) {
          $this->halt("cannot use database ".$this->database);
        }
      }
    }
  }

This is what i wanna make a forum. can any1 tell me what i have to change to make the forum work.

i am getting crazy

my email is holwerda@chello.nl
my msn is waldpiek2k@hotmail.com

Dan Brown

Re: PHP
« Reply #1 on: June 11, 2002, 08:07:11 PM »
You need a valid MySQL username and password.  DON'T USE THE ROOT USER.  Check out my HOWTO at http://www.familybrown.org/howtos/mysql-password-howto.html for more information about both why to not use the root user, and how to make a new one.