View Full Version : Parse error: parse error in /nfs/cust/9/92/79/597299/web/index.php on line 27
Big Daddy
05-21-2005, 11:36 AM
I just installed everything, and when I try to pull up my cmps_index page (renamed "index.php") I get this error;
Parse error: parse error in /nfs/cust/9/92/79/597299/web/index.php on line 27
What does this mean, and how do I fix it??
Please help.
Thanks,
Rob
Brian
05-21-2005, 11:55 AM
Looks like you modified the chdir() line incorrectly. Make sure it looks like this:
chdir('/home/yoursite/public_html/forums');
Big Daddy
05-21-2005, 07:09 PM
Looks like you modified the chdir() line incorrectly. Make sure it looks like this:
chdir('/home/yoursite/public_html/forums');
Could be, but the funny thing is that the chdir() line is not on "Line 27" as stated in the error message. But anyways, in the example you gave, I assume "home" is the root folder and the rest are folders inside the root folder. I could be wrong.
I had originally entered my "path to forums" as (/nfs/cust/9/92/79/597299/web/index.php) and it gave me the error. So I changed it.
For my site, the root folder (or the folder where all the website content is located) is called "web". Then, inside that is the "forums" folder which contains all the forums stuff, including "index.php"
So, the chdir() line now reads;
chdir(./web/forums) and what's that "period" (.) for anyway? should it be there??
Is that line still wrong???
Even after the change, it still gives me that error. Even though the chdir() line reads something else!!!
Thanks!
Rob
Brian
05-21-2005, 07:13 PM
You're getting the parse error because you removed the '' marks. The period is there for people who do not use the entire path. It should look something like this:
chdir('/web/forums');
Big Daddy
05-22-2005, 10:30 AM
Ok, when I posted that before, I wasn't near my computer so I was going off memory. I in fact did not remove the " marks. But at any rate, I went in, took out the (period) and made it look just like you suggested. I still get the error. So I just deleted the entire page, re-uploaded it and started over. I edited the code and I am still getting errors. I have copied it below:
<?php
// ++=========================================================================++
// || vBadvanced CMPS v1.0.1
// || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved
// || This file may not be redistributed in whole or significant part.
// || http://vbadvanced.com
// || vb.org distro
// ||
// ++ ========================================================================++
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'adv_index');
define('VBA_PORTAL', true);
// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================
chdir('/web/forums');
// ============================================
// No Further Editing Necessary!
// ============================================
$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();
require_once('/web/forums/global.php');
print_portal_output($home);
?>
Here are the errors I am getting:
Warning: ChDir: No such file or directory (errno 2) in /nfs/cust/9/92/79/597299/web/index.php on line 21
Fatal error: Failed opening required '/web/forums/global.php' (include_path='.:') in /nfs/cust/9/92/79/597299/web/index.php on line 32
The funny thing is that this whole "/nfs/cust/9/92/79/597299/web" isn't on the page anywhere. Where is it pulling this up from. I had entered it before because I thought it was the path, but I changed it on the index.php file. Is it pulling it up from somewhere else? Do I need to change it somewhere else?
Again, the folder on my server that contains all of my content for the site is 'web' within that folder is the 'forums' folder which contains all the forums stuff.
ConqSoft
05-22-2005, 10:32 AM
/web/forums must not be the correct, full physical, path to your forums. Are you on a Windows machine?
Big Daddy
05-22-2005, 10:33 AM
yes, windows
ConqSoft
05-22-2005, 10:34 AM
Try using chdir('c:\web\forums'); (or whatever drive your webs are on)
Big Daddy
05-22-2005, 10:42 AM
No good, still getting same errors..... And I am still wondering where it's pulling up " /nfs/cust/9/92/79/597299/web/index.php " from???? that was deleted. Makes me think it might be pulling it up from somewhere else
Big Daddy
05-22-2005, 11:13 AM
ok, now I edited the lines to read
chdir('./forums')
require_once('./forums/global.php');
and I am no longer getting that first error, but I am still getting the second one about the global.php.
Now what???
Big Daddy
05-22-2005, 11:29 AM
I just realized that there is also a global.php file in the admincp folder... Should I use the path to that one???
If so, I already tried it, and i had to edit a few more paths, then tried again and it gave me an error saying that
"/includes/config.php does not exist, cannot continue"
But the file does exist, so I just changed the paths back to what they where, and backed out because i don't know which "global.php" I need to use
Zachery
05-22-2005, 01:02 PM
/nfs/cust/9/92/79/597299/web
That is the line that you should have in your config file, or a relitive one.
Brian
05-22-2005, 01:06 PM
Change the require_once('./global.php'); line back, then read this thread:
http://www.vbadvanced.com/forum/showthread.php?t=1343
Big Daddy
05-22-2005, 07:50 PM
I did that, but it just pulls up a page saying
"We are sorry, but this script is unable to determine your forums path."
????????? Rob
Would you be willing to log into my server and check it out???
Brian
05-23-2005, 11:36 AM
Try this:
chdir('/nfs/cust/9/92/79/597299/web/forums');
If that still doesn't work please submit a support ticket via the Members' Area here and I'll take a look.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.