We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
mysql
Topic Started: Feb 4 2005, 01:58 PM (471 Views)
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
i am recieving this error
Code:
 

Warning: mysql_pconnect(): Unknown MySQL Server Host 'http' (1) in /users/coy/17nottingham/testsite/guestbook.php on line 135
Unable to connect to SQL server

on the site i am upgrading for an organisation where i live. (BB)
I need to know the host name but since i am new to mysql i don't know what this would be. if anybody could help i would appreciate it

thanks
Offline Profile Quote Post Goto Top
 
Stefan
Member Avatar
Mew?
[ *  *  *  *  *  *  * ]
Normally, localhost will do.
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
thanks, i have got that to work, but now i get a new error..

EDIT: Fixed my new error (see below)

thanks again for your help...it works brilliantly now
Offline Profile Quote Post Goto Top
 
SkItZo
Support Volunteer
[ *  *  * ]
You could try a few things...here's one

Find:

Code:
 
mysql_select_db("dbasename") or die("Unable to select database");


and replace with:

Code:
 
mysql_select_db("$dbasename") or die("Unable to select database");


If that doesn't work, then find:

Code:
 
mysql_pconnect("localhost","********","******")
             or die("Unable to connect to SQL server");
mysql_select_db("dbasename") or die("Unable to select database");


and replace with:

Code:
 
mysql_connect("localhost","********","******")
             or die("Unable to connect to SQL server");
mysql_select_db("dbasename") or die("Unable to select database");


I think the problem lies with either the "mysql_pconnect" syntax or the "dbasename" not having a $ infront. Tell me if it works or not.
Offline Profile Quote Post Goto Top
 
Ben
Member Avatar
Quantum-locked when observed.

In some hosting services, your database name is preceded by your account's name and an underscore, such as accountname_dbname. :/
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
thankyou shizo!

and thanks tachon, i needed the underscore too...thing is its a shared server that about 12 databases are stored on. a combination of both of your helping worked! cheers
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply