NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
$SITE[] - where is this defined?


Joined: 03 Sep 2005
Posts: 1
Reply with quote
I'm new to PHP and new to PHPed...searched the forums for this, but did not find any answers.

Here's what I'm stuck on...

I setup a new workspace and project. Used the DB-Form wizard to create a form to enter data into my MySQL database. The problem is that the variable $SITE[] is used in many places inside of db_myutil.php, ut I cannot see that it is defined anywhere. The error I'm getting exactly is:

Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in c:\program files\nusphere\techplat\apache\htdocs\testsite\includes\db_myutil.inc on line 7
Can't connect to MySQL server on 'localhost' (10061)

The function being called is

dbconnect($site["dbhost"], $site["dblogin"], $site["dbpass"], $site["dbname"], $site["dbport"]);

However, I'm not sure where $site["dbhost"], etc. is defined. The debugger indicates they are undefined.

What am I missing?

Thanks,
Dan
View user's profileFind all posts by dbartramSend private message


Joined: 31 Aug 2005
Posts: 44
Location: Bamberg, Germany
Reply with quote
I think you must define them by yourself in some config-include:
file: config.inc.php
Code:

...
$db['user'] = 'root';
$db['pass'] = '';
$db['host'] = 'localhost';   // def: localhost
$db['port'] = '';   // def: 3306
...


or whatever variables are required and include that file into your project.

marcus
View user's profileFind all posts by MarcusSchwarzSend private messageVisit poster's websiteICQ Number
$SITE[] - where is this defined?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic