 |
|
|
|
11-07-2007, 06:40 AM
|
Line 86 problem
|
Posts: 12
Name: bill
|
Hello
I am using xampp as a server for home computer server use.
My web page shows up but some images and other links don't work..
I have to make a line change to line 86, below is the line
PHP Code:
$site[homeurl] = ("http://".$HTTP_HOST."".dirname($SCRIPT_NAME ));
I've tried this
PHP Code:
$site[homeurl] = (http://"localhost""html ));
I still get error line 86
what is it I should put there
many thanks
|
|
|
|
11-07-2007, 06:47 AM
|
Re: Line 86 problem
|
Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
|
At a guess, given that you don't say what the code is from or for
PHP Code:
$site[homeurl] = ("http://localhost/" );
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
11-07-2007, 04:30 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Quote:
Originally Posted by chrishirst
At a guess, given that you don't say what the code is from or for
PHP Code:
$site[homeurl] = ("http://localhost/" );
|
sorry it from my config.php file and it allows all connections to images and other pages at this time when I start the index page thats all it will allow 
|
|
|
|
11-07-2007, 05:01 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
here is the whole script from config.php file..
PHP Code:
<? ////////////////////////////////////////////////////////////////////////// /////////////////// REQUIRED INFORMATION //////////////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// //DATABASE INFORMATION $db[host] ='localhost'; //usually localhost $db[uname] ='root'; $db[pass] =''; $db[name] ='xxxx'; /////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////EVERYTHING BELOW SHOULD NOT NEED BE EDITED//////////////////// ///THESE VARIABLES ARE ALL CONTROLLED FROM THE ADMIN CONTROL PANEL NOW// /////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// //DATABASE ACCESS mysql_connect($db[host], $db[uname], $db[pass]); @mysql_select_db("$db[name]") or die ("<b><center>Unable to access database. Please notify administrator.<br><br>Software by http://www.mygamingladder.com</center></b>"); $settings=mysql_fetch_array(mysql_query("SELECT * FROM settings")); ///////////////////////////////////////////////////////////////////// ///////////////// THEME NAMES ////////////////////////////////////// // THEMES THAT USERS CAN CHOOSE FOR THEIR ACCOUNT $theme[option1] = 'Black'; $theme[option2] = 'Gray'; $theme[option3] = 'Red'; $theme[option4] = 'Blue'; $theme[option5] = 'AngryBlue'; /////////CHOICES ARE GRAY, BLUE, RED, ANGRYBLUE AND BLACK///////// /////////////YOU CAN ALSO MAKE YOUR OWN)///////////////////////// $email[sendaccount] =$settings[email]; $theme[normal] =$settings[theme]; //Default Themes $site[shortname] =$settings[shortname]; $site[longname] =$settings[longname]; $url[forums] =$settings[forumurl]; $out[banner] =$settings[bannerloc]; $out[bannerurl] =$settings[bannerurl]; $misc[joinage] =$settings[joinage]; //Minimum age permitted. $misc[multipleip] =$settings[multipleip]; //Allow multiple signups from the same ip. $misc[tourneyip] =$settings[tourneyip]; //Allow multiple signups on tournament from the same ip. $misc[changeplyrname] =$settings[changeplyrname]; //Allow player name to be changed. $misc[changeteamname] =$settings[changeteamname]; //Allow team name to be changed. $misc[deleteteam] =$settings[deleteteam]; //Allow teams to be deleted. We STRONGLY recommend this to be left on 'no'. $misc[leaveladder] =$settings[leaveladder]; //Allow teams to leave ladders. $misc[challengedown] =$settings[challengedown]; //Allow teams to challenge other teams below them on the ladder. $misc[losercomment] =$settings[losercomment]; //Allow loser comment in match reporting. $misc[winnercomment] =$settings[winnercomment]; //Allow winner comment in match reporting. $misc[invitemembers] =$settings[invitemembers]; // Yes = invite ; No = Add without invite. $uinfo[allow] =$settings[allow]; //Ask for more user information on signup. $uinfo[force] =$settings[uforce]; //Require the extra information on signup. $uinfo[edit] =$settings[edit]; //Allow extra information to be edited after signup. $misc[newplayer] =$settings[newplayer]; //Allow signups, setting no will disable signups. $misc[dobans] =$settings[dobans]; //Allow admins to ban players. $misc[docensors] =$settings[docensors]; //Allow certain words to be censored. $misc[censorschar] =$settings[censorschar]; //Censor character. $timeout[session] =$settings[session]; //Timeout time in seconds for logged in sessions. $misc[passrequests] =$settings[passrequests]; //Allow forgotton password retrieval $misc[flags] =$settings[flags]; //Allow flags for user and team accounts $misc[playerdb] =$settings[playerdb]; //Number of players shown per page on player database. $misc[teamdb] =$settings[teamdb]; //Number of teams shown per page on player database. $misc[ladderdb] =$settings[ladderdb]; //Number of ladders shown per page on ladder database. $misc[standings] =$settings[standings]; //Number of players shown per page in ladder standings. $misc[uservalidate] =$settings[uservalidate]; // Yes= User validates own account, No = Admin validates user account before use $misc[headline] =$settings[headline]; // Yes= Headline only. No = Story and headline. $misc[ranking] =$settings[ranking]; // Non challenge Matches: 1 = Winner moves half way up to losers position(if higher). 2 = Winner takes losers position(if higher) $misc[challranking] =$settings[challranking]; // Challenge Matches: 1= Winner takes losers position(if higher). 2= Winner moves half way up to losers position(if higher). $site[homeurl] = ("http://".$HTTP_HOST."".dirname($SCRIPT_NAME )); <<< this is line 86 need to change this for all page to run on my computer using Xampp server function $dir[base] = getcwd(); $url[base] ="$site[localhost]"; $url[themes] ="$site[localhost]/themes"; $dir[func] ="$dir[base]/functions"; $dir[themes] ="$dir[base]/themes"; $misc[teamlogo] ="$url[themes]/images/defaultteamlogo.jpg"; $misc[playerlogo] ="$url[themes]/images/defaultplayerlogo.jpg"; $misc[mapimage] ="$url[themes]/images/defaultmaplogo.jpg"; $email[localhost] =$settings[localhost]; //set to no if using SMTP; leave unchanged otherwise $email[smtp_server] =$settings[smtp_server]; //url or IP for SMTP server $email[username] =$settings[username]; //username for SMTP authentication; leave blank if not needed $email[password] =$settings[password]; //password for SMTP authentication; leave blank if not needed ////////////////////////////////////////////////////////////////////////// $email[genhelp] ="$email[sendaccount]"; $email[banhelp] ="$email[sendaccount]"; $email[techhelp] ="$email[sendaccount]"; $file[main] ='index.php'; $file[stats] ='stats.php'; $file[admin] ='adminhome.php'; $file[login] ='login.php'; $file[game] ='game.php'; $file[staff] ='staff.php'; $file[rules] ='rules.php'; $file[help] ='news.php'; $file[join] ='join.php'; $file[phome] ='playerhome.php'; $file[edit] ='edit.php'; $file[players] ='players.php'; $file[teams] ='teams.php'; $file[match] ='match.php'; $file[ladder] ='ladder.php'; $file[maps] ='maps.php'; $file[search] ='search.php'; $file[files] ='files.php'; $file[links] ='links.php'; $file[tournament] ='tournament.php'; //Emulate Register Globals if (!ini_get('register_globals')) { $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET); if (isset($_SESSION)) { array_unshift($superglobals, $_SESSION); } foreach ($superglobals as $superglobal) { extract($superglobal, EXTR_SKIP); } } ?>
thanks
Last edited by billju; 11-09-2007 at 05:55 AM..
|
|
|
|
11-07-2007, 05:35 PM
|
Re: Line 86 problem
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
If you had given us the complete error message, we could help you a bit more, but here, I don't see anything wrong on that line.
But those lines:
PHP Code:
$url[base] ="$site[localhost]"; $url[themes] ="$site[localhost]/themes"; $dir[func] ="$dir[base]/functions"; $dir[themes] ="$dir[base]/themes"; $misc[teamlogo] ="$url[themes]/images/defaultteamlogo.jpg"; $misc[playerlogo] ="$url[themes]/images/defaultplayerlogo.jpg"; $misc[mapimage] ="$url[themes]/images/defaultmaplogo.jpg";
are going to be a problem, and maybe they are those trigerring the error.
You cannot address an array like this into a string.
You need to either escape it, or place the array outside the string.
PHP Code:
$url[base] ="{$site[localhost]}";
or
PHP Code:
$url[base] =$site[localhost];
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
11-07-2007, 06:24 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Quote:
Originally Posted by tripy
If you had given us the complete error message, we could help you a bit more, but here, I don't see anything wrong on that line.
But those lines:
PHP Code:
$url[base] ="$site[localhost]"; $url[themes] ="$site[localhost]/themes"; $dir[func] ="$dir[base]/functions"; $dir[themes] ="$dir[base]/themes"; $misc[teamlogo] ="$url[themes]/images/defaultteamlogo.jpg"; $misc[playerlogo] ="$url[themes]/images/defaultplayerlogo.jpg"; $misc[mapimage] ="$url[themes]/images/defaultmaplogo.jpg";
are going to be a problem, and maybe they are those trigerring the error.
You cannot address an array like this into a string.
You need to either escape it, or place the array outside the string.
PHP Code:
$url[base] ="{$site[localhost]}";
or
PHP Code:
$url[base] =$site[localhost];
|
Okay, but the code works fine on a web host...but I am doing this on my home pc...using xampp Apache server...so all settings maybe different as if they were on a Web site...
|
|
|
|
11-07-2007, 10:27 PM
|
Re: Line 86 problem
|
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
|
$site[homeurl] looks a little off to me. PHP would interpet homeurl as a constant var, and would subsitute the literal term homeurl if there were no constant set. This will issue a warning, I don't think a fatal error. I would use the following:
PHP Code:
$site['homeurl'] = ". . .";
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
|
|
|
|
11-07-2007, 11:52 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Quote:
Originally Posted by mgraphic
$site[homeurl] looks a little off to me. PHP would interpet homeurl as a constant var, and would subsitute the literal term homeurl if there were no constant set. This will issue a warning, I don't think a fatal error. I would use the following:
PHP Code:
$site['homeurl'] = ". . .";
|
Okay I did that and the index shows up but if I click a link it says can't find page
below is what happens clicking a link on index page
Quote:
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
11/07/07 23:52:17
Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0
|
|
|
|
|
11-09-2007, 05:54 AM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Hey;
It is in the config.php file I need to find the problem which starts on line 86, I changed the line 86 and the index page shows, but as stated all the other links on the page refer to page can't be found...I believe other settings must be changed.. 
|
|
|
|
11-11-2007, 11:49 AM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
LOL;
So I see no one has an answer to this...
I've changed it to " localhost " but it doesn't allow the other links on the Index page..says can't find page..
So come on, experts..need your input..
     :confuse d: 
|
|
|
|
11-11-2007, 12:00 PM
|
Re: Line 86 problem
|
Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
|
You need to gives US more information
such as config.php from what exactly
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
11-11-2007, 12:53 PM
|
Re: Line 86 problem
|
Posts: 1,606
|
I think localhost/whatever directory name you have the files in under htdocs will do the job. IE directory is mysite localhost/mysite
In all cases I have tried this has worked for me.
Last edited by colbyt; 11-11-2007 at 12:55 PM..
|
|
|
|
11-11-2007, 09:02 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Quote:
Originally Posted by chrishirst
You need to gives US more information
such as config.php from what exactly
|
Okay Once again I will post the config.php file
PHP Code:
<? ////////////////////////////////////////////////////////////////////////// /////////////////// REQUIRED INFORMATION //////////////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// //DATABASE INFORMATION $db[host] ='localhost'; //usually localhost $db[uname] ='root'; $db[pass] =''; $db[name] ='xxxx'; /////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //////////EVERYTHING BELOW SHOULD NOT NEED BE EDITED//////////////////// ///THESE VARIABLES ARE ALL CONTROLLED FROM THE ADMIN CONTROL PANEL NOW// /////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// //DATABASE ACCESS mysql_connect($db[host], $db[uname], $db[pass]); @mysql_select_db("$db[name]") or die ("<b><center>Unable to access database. Please notify administrator.<br><br>Software by http://www.mygamingladder.com</center></b>"); $settings=mysql_fetch_array(mysql_query("SELECT * FROM settings")); ///////////////////////////////////////////////////////////////////// ///////////////// THEME NAMES ////////////////////////////////////// // THEMES THAT USERS CAN CHOOSE FOR THEIR ACCOUNT $theme[option1] = 'Black'; $theme[option2] = 'Gray'; $theme[option3] = 'Red'; $theme[option4] = 'Blue'; $theme[option5] = 'AngryBlue'; /////////CHOICES ARE GRAY, BLUE, RED, ANGRYBLUE AND BLACK///////// /////////////YOU CAN ALSO MAKE YOUR OWN)///////////////////////// $email[sendaccount] =$settings[email]; $theme[normal] =$settings[theme]; //Default Themes $site[shortname] =$settings[shortname]; $site[longname] =$settings[longname]; $url[forums] =$settings[forumurl]; $out[banner] =$settings[bannerloc]; $out[bannerurl] =$settings[bannerurl]; $misc[joinage] =$settings[joinage]; //Minimum age permitted. $misc[multipleip] =$settings[multipleip]; //Allow multiple signups from the same ip. $misc[tourneyip] =$settings[tourneyip]; //Allow multiple signups on tournament from the same ip. $misc[changeplyrname] =$settings[changeplyrname]; //Allow player name to be changed. $misc[changeteamname] =$settings[changeteamname]; //Allow team name to be changed. $misc[deleteteam] =$settings[deleteteam]; //Allow teams to be deleted. We STRONGLY recommend this to be left on 'no'. $misc[leaveladder] =$settings[leaveladder]; //Allow teams to leave ladders. $misc[challengedown] =$settings[challengedown]; //Allow teams to challenge other teams below them on the ladder. $misc[losercomment] =$settings[losercomment]; //Allow loser comment in match reporting. $misc[winnercomment] =$settings[winnercomment]; //Allow winner comment in match reporting. $misc[invitemembers] =$settings[invitemembers]; // Yes = invite ; No = Add without invite. $uinfo[allow] =$settings[allow]; //Ask for more user information on signup. $uinfo[force] =$settings[uforce]; //Require the extra information on signup. $uinfo[edit] =$settings[edit]; //Allow extra information to be edited after signup. $misc[newplayer] =$settings[newplayer]; //Allow signups, setting no will disable signups. $misc[dobans] =$settings[dobans]; //Allow admins to ban players. $misc[docensors] =$settings[docensors]; //Allow certain words to be censored. $misc[censorschar] =$settings[censorschar]; //Censor character. $timeout[session] =$settings[session]; //Timeout time in seconds for logged in sessions. $misc[passrequests] =$settings[passrequests]; //Allow forgotton password retrieval $misc[flags] =$settings[flags]; //Allow flags for user and team accounts $misc[playerdb] =$settings[playerdb]; //Number of players shown per page on player database. $misc[teamdb] =$settings[teamdb]; //Number of teams shown per page on player database. $misc[ladderdb] =$settings[ladderdb]; //Number of ladders shown per page on ladder database. $misc[standings] =$settings[standings]; //Number of players shown per page in ladder standings. $misc[uservalidate] =$settings[uservalidate]; // Yes= User validates own account, No = Admin validates user account before use $misc[headline] =$settings[headline]; // Yes= Headline only. No = Story and headline. $misc[ranking] =$settings[ranking]; // Non challenge Matches: 1 = Winner moves half way up to losers position(if higher). 2 = Winner takes losers position(if higher) $misc[challranking] =$settings[challranking]; // Challenge Matches: 1= Winner takes losers position(if higher). 2= Winner moves half way up to losers position(if higher). $site[homeurl] = ("http://".$HTTP_HOST."".dirname($SCRIPT_NAME )); <<< this is line 86 need to change this for all page to run on my computer using Xampp server function $dir[base] = getcwd(); $url[base] ="$site[localhost]"; $url[themes] ="$site[localhost]/themes"; $dir[func] ="$dir[base]/functions"; $dir[themes] ="$dir[base]/themes"; $misc[teamlogo] ="$url[themes]/images/defaultteamlogo.jpg"; $misc[playerlogo] ="$url[themes]/images/defaultplayerlogo.jpg"; $misc[mapimage] ="$url[themes]/images/defaultmaplogo.jpg"; $email[localhost] =$settings[localhost]; //set to no if using SMTP; leave unchanged otherwise $email[smtp_server] =$settings[smtp_server]; //url or IP for SMTP server $email[username] =$settings[username]; //username for SMTP authentication; leave blank if not needed $email[password] =$settings[password]; //password for SMTP authentication; leave blank if not needed ////////////////////////////////////////////////////////////////////////// $email[genhelp] ="$email[sendaccount]"; $email[banhelp] ="$email[sendaccount]"; $email[techhelp] ="$email[sendaccount]"; $file[main] ='index.php'; $file[stats] ='stats.php'; $file[admin] ='adminhome.php'; $file[login] ='login.php'; $file[game] ='game.php'; $file[staff] ='staff.php'; $file[rules] ='rules.php'; $file[help] ='news.php'; $file[join] ='join.php'; $file[phome] ='playerhome.php'; $file[edit] ='edit.php'; $file[players] ='players.php'; $file[teams] ='teams.php'; $file[match] ='match.php'; $file[ladder] ='ladder.php'; $file[maps] ='maps.php'; $file[search] ='search.php'; $file[files] ='files.php'; $file[links] ='links.php'; $file[tournament] ='tournament.php'; //Emulate Register Globals if (!ini_get('register_globals')) { $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET); if (isset($_SESSION)) { array_unshift($superglobals, $_SESSION); } foreach ($superglobals as $superglobal) { extract($superglobal, EXTR_SKIP); } } ?>
the index page shows up, but click the links it does nothing but say can't find page...   
|
|
|
|
11-11-2007, 09:04 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Here's the problem;
The index page shows up, but you click another link and nothing happens other than page can not be found... 
|
|
|
|
11-11-2007, 09:46 PM
|
Re: Line 86 problem
|
Posts: 1,606
|
Okay maybe you are working with an older script. Look in the directory and see if there is a file named .htaccess. If there is rename it, then and create a new one that contains the following:
PHP Code:
php_flag register_globals on
If that solves your problems, you have an old, crappy, outdated script.
Note: you may need to download notepad2 or other text editor to make these change.
|
|
|
|
11-12-2007, 01:21 AM
|
Re: Line 86 problem
|
Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
|
Okay Once again I will post the config.php file
|
No,
What we NEED is to KNOW is what application and version is that particular config.php from.
Just about every php application ever made will have a config.php as part of it
Somebody may know what you are working on and have the answer without having to delve through all the code.
Also knowing the versions of PHP and MySql on the host server and on your local server may help
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
11-12-2007, 08:42 AM
|
Re: Line 86 problem
|
Posts: 1,606
|
Quote:
//////////EVERYTHING BELOW SHOULD NOT NEED BE EDITED////////////////////
///THESE VARIABLES ARE ALL CONTROLLED FROM THE ADMIN CONTROL PANEL NOW//
///////////////////////////////////////////////////////////////////////
|
Did you read what you posted? Just because the error message is caused by line 86, it does not mean line 86 is what needs to be changed.
|
|
|
|
11-12-2007, 04:42 PM
|
Re: Line 86 problem
|
Posts: 12
Name: bill
|
Quote:
Originally Posted by colbyt
Did you read what you posted? Just because the error message is caused by line 86, it does not mean line 86 is what needs to be changed.
|
Yea, I've read what I wrote. And yes line 86 needs to be changed to " localhost" I am running Xampp on my home computer..it would be the same if I had edited it to say " www.xxxxxxxx.com 
|
|
|
|
11-12-2007, 05:18 PM
|
Re: Line 86 problem
|
Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
|
would you PLEASE PLEASE kindly tell us WHAT YOU TRYING TO SETUP!!!!!!
it is obviously some gaming type of script given the array elements;
Code:
$misc[headline] =$settings[headline]; // Yes= Headline only. No = Story and headline.
$misc[ranking] =$settings[ranking]; // Non challenge Matches: 1 = Winner moves half way up to losers position(if higher). 2 = Winner takes losers position(if higher)
$misc[challranking] =$settings[challranking]; // Challenge Matches: 1= Winner takes losers position(if higher). 2= Winner moves half way up to losers position(if higher).
WHAT IS IT?
WHERE DID IT COME FROM?
WHEN DID YOU DOWNLOAD IT?
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
11-12-2007, 07:10 PM
|
Re: Line 86 problem
|
Posts: 1,606
|
Since you are unwilling to answer the who what when and where that might allow someone to help.
Best wishes.
|
|
|
|
|
« Reply to Line 86 problem
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|