![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2004
Location: Vancouver, Canada
Posts: 7,662
|
Does this PHP code look OK?
PHP Code:
The line the error references is $user = "DB_DB"; But I included the lines around it for better insight.
__________________
ICQ: 2262.73945 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
Have you tried using all lower cases in your username?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: Feb 2004
Location: Vancouver, Canada
Posts: 7,662
|
Quote:
"DB_DB" is to edit out information that's "sensitive".
__________________
ICQ: 2262.73945 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
Perhaps it's because there is a space in this line:
mysql_pconnect(localhost, $user,$pass) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Oct 2002
Location: European Union
Posts: 1,752
|
Try to use single qoutes ' rather then doubleqoutes "
or put qoutes around localhost also... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | ||
Confirmed User
Join Date: Feb 2004
Location: Vancouver, Canada
Posts: 7,662
|
Quote:
Quote:
__________________
ICQ: 2262.73945 |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
put localhost in single qoutes
whitespace such as spaces, tabs, etc in code is ignored seems there s a prob with connection rather than anything else at this point i've never used mysql_pconnect, see if mysql_connect works better for you.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Aug 2001
Posts: 7,817
|
Hope you're putting that function in an include file as opposed to on a page, or have multiple DBs at different locations to use... you only need to connect to a mySQL server once each load.
Matt
__________________
What name is pr0 / Untouched Markets using these days? Untouched Markets - pr0 - Refund My Money Now Someone owes me $2,000 because they didn't do any work that was paid for *pointing at pr0 / William / UntouchedMarkets* See https://gfy.com/fucking-around-and-business-discussion/948258-untouchedmarkets-pr0-refund-money-post16744521.html and for more detailed see https://gfy.com/fucking-around-and-business-discussion/948645-re-recent-bullshit-drama-explained-detail-pr0-untouched-markets.html |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
So Fucking Banned
Join Date: Aug 2003
Location: ICQ #23642053
Posts: 19,593
|
Is your username the same as the database name?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
here is a good sample for you from php manual:
Code:
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die (mysql_error()); db_selected = mysql_select_db('db_name', $link) or die (mysql_error());
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
err in above post
db_selected = $db_selected
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |