Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] [Solved] Installation Script : DB Host value
#3
Found out, that my problem is related to the connection method (especially to the new_link parameter in the mysql_connect() function) :

./inc/db_mysql.php

	function connect($hostname="localhost", $username="root", $password="", $pconnect=0, $newlink=false)
	{
		if($pconnect)
		{
			$this->link = @mysql_pconnect($hostname, $username, $password) or $this->dberror();
		}
		else
		{
			$this->link = @mysql_connect($hostname, $username, $password, $newlink) or $this->dberror();
		}
		return $this->link;
	}

If I remove the $newlink parameter from the @mysql_connect() function, I can connect to the DB without problems.

./inc/db_mysql.php

			$this->link = @mysql_connect($hostname, $username, $password) or $this->dberror();

It works also, if I choose the @mysql_pconnect() function as the default connection type (simply change the $pconnect=0 to $pconnect=1)

./inc/db_mysql.php

	function connect($hostname="localhost", $username="root", $password="", $pconnect=1, $newlink=false)

Maybe there is a developer, who can have a look at this ?!?!?


Messages In This Thread
RE: Installation Script : DB Host value - by bollmann - 05-14-2007, 08:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)