View Full Version : Global error on install
Padyn
06-29-2014, 03:15 PM
I've installed a clean 3.8.2 patch 2 on my host. I wanted to be sure I could get it running before looking to upgrade. On initial install, when I try to login to admincp, modcp or go to the forums page, I get the following error.
Warning: require_once(/home/thedotcl/public_html/includes/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/thedotcl/public_html/forums/global.php on line 33
Fatal error: require_once() [function.require]: Failed opening required '/home/thedotcl/public_html/includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thedotcl/public_html/forums/global.php on line 33
I've changed the directory path in the config.php trying to give the path but leaving it blank or adding the forum path doesn't seem to help.
Thoughts?
ForceHSS
06-29-2014, 03:20 PM
Plz download vb files from members area and upload them again you have some files missing
Padyn
06-29-2014, 03:28 PM
I did that as well as I searched on this error and that seemed to be a common problem but still no luck.
I've uploaded all files to /public_html/forums on the server.
Hedging my bets, I just did it again using Filezilla FTP and still no change.
Are you sure you also uploaded the includes folder? You might also check the permissions on the files and folders, maybe the web server user doesn't have read permission.
Padyn
06-29-2014, 03:34 PM
Yes, I could screen shot the directory if that helped but yes. I also did a file compare in the FTP client to ensure the same files existed within that directory and the home directory to make sure.
Edit: the files also appear to have 644 permissions and the directories at 755. I only spot checked but looked at includes file/folder specifically.
Warning: require_once(/home/thedotcl/public_html/includes/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/thedotcl/public_html/forums/global.php on line 33
I've uploaded all files to /public_html/forums on the server.
Oh, I missed this before. You say you uploaded to /public_html/forums but the error message doesn't include "forums" for some reason. I don't know why that would be. What url are you going to when you get that error?
Padyn
06-29-2014, 04:11 PM
After the install, it prompts me to login to the admincp. So I login and it sends me to http://thedotclan.com/login.php?do=login which is where I see the error.
I notice I do not see the directory of /forums in the URL. I'm assuming there's a missing settings value to direct to /forums?
--------------- Added 1404062293 at 1404062293 ---------------
I reran the db install and made sure the path was set to include /forums on step 10 in both boxes.
After logging into admincp I still get the same error on URL: http://thedotclan.com/forums/login.php?do=login
Warning: require_once(/home/thedotcl/public_html/includes/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/thedotcl/public_html/forums/global.php on line 33
Fatal error: require_once() [function.require]: Failed opening required '/home/thedotcl/public_html/includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thedotcl/public_html/forums/global.php on line 33
Yeah, the "forum" is in the path for global.php in the second part of the error message. And it should be including includes/init.php from the current directory, so I don't understand. Hopefully someone else will have an idea.
ForceHSS
06-29-2014, 05:07 PM
If you would like to pm me ur skype info can have a look for you
Padyn
06-29-2014, 09:05 PM
I've tinkered with this most of the day. Still no luck. I tried using older versions and still the same problem. Anyone else with ideas?
Well, if you're desperate you could try this test: edit forums/global.php and find this line (near the top):
require_once(CWD . '/includes/init.php');
and above it, insert this line:
die("getcwd='$getcwd', including '" . CWD . "/includes/init.php'");
Then any page should just display the one line telling you what $getcwd is and what file it's trying to include. I'm not sure how much that will help, but if you try this let us know what it says.
Padyn
06-29-2014, 10:10 PM
I gave that a whirl and this is the output on the page.
getcwd='', including 'CWD/includes/init.php'
Hmm...well, I still don't understand what's happening. It looks like maybe getcwd() isn't working, but then CWD should be defined as '.' and instead it looks like it isn't defined at all. Is there a line near the beginning of global.php that looks like this:
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
Padyn
06-29-2014, 10:25 PM
Yes there is. So I put what you asked in the wrong spot. I put it above
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
instead of above
require_once(CWD . '/includes/init.php');
So I just went back and edited it to put it above the right line and I get this output. I believe your question is still the same in either case. Here's the global file line
chdir('./../');
define('CWD', (($getcwd = getcwd()) ? $getcwd : '.'));
die("getcwd='$getcwd', including '" . CWD . "/includes/init.php'");
require_once(CWD . '/includes/init.php');
When put where you suggested I get the following on the page
getcwd='/home/thedotcl/public_html', including '/home/thedotcl/public_html/includes/init.php'
OK, where did this line come from:
chdir('./../');
because I think that's your problem.
Padyn
06-29-2014, 10:30 PM
It's in the original download file for the 3.8.4 Patch 2 and also 3.8.3 version of the global.php file. I didn't look if it was in older versions or not.
I did toy around with that earlier today and made it
chdir('./');
And tried
chdir('./forums/');
but neither seemed to work. I was able to get to admincp but when I'd log in, it just kept me in a loop.
The below is/was the default value originally.
chdir('./../');
I see that in admincp/global.php, but not in the global.php that is supposed to be in the forum directory.
Padyn
06-29-2014, 10:39 PM
bingo! Not sure how that got installed there but I went and pulled the files again and I must have somehow gotten the global file from the wrong place. I double checked my unzip of the package and uploaded only that file and it's working.
Thank you for hanging in there with me!
No problem - I guess ForceHSS's idea in post #2 would have worked.
ForceHSS
06-30-2014, 05:22 PM
No problem - I guess ForceHSS's idea in post #2 would have worked.
:D:D:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.