Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 04-25-2009, 09:39 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Help needed

Hey guys, Im sorry for posting here, I know it is the wrong section. But i do not have access to the account that is the "owner" of the host, so cannot post on the other threads. The owner has gone away for a few days and I have been left to fix it. But im not sure how to do it.
I have an ipb forums hosted here. I am getting this error after something was changed in the files by the owner.

Warning: require_once(../init.php) [function.require]: failed to open stream: No such file or directory in /home/obpk/public_html/index.php on line 44

Fatal error: require_once() [function.require]: Failed opening required '../init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/obpk/public_html/index.php on line 44


I would like it to just go straight back to the forums like it used to do , the site name is www.oblivionpk.com, its currently saying its in maintenence, but its actually just not working.
Thanks guys, and sorry for not posting in the correct forums, I would if i had the correct account.
Reply With Quote
  #2  
Old 04-25-2009, 10:02 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

You say that the site owner changed something that resulted in that failed require_once problem and then left you to fix it?! Nice guy!

Basically, the error message means that that application is unable to find the required file (init.php) where it expects to be (../) in the folder immediately above the one that calls for it. I don't have IPB installed myself. So that's about the best I can offer.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
  #3  
Old 04-25-2009, 10:08 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Thank you , he was trying to add a proxy to the site. I figured what you said out, im just not sure why it isnt working it seems to be fine? I do have the init.php file in the right section.
Reply With Quote
  #4  
Old 04-25-2009, 10:13 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

Well, if the init.php file is located where expected and the IPB application is unable to load it, that suggests a fundamental problem with PHP itself. Perhaps he changed some PHP configuration parameters? Just a wild guess.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
  #5  
Old 04-25-2009, 10:14 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,557
Default Re: Help needed

Quote:
Originally Posted by Mellor View Post
I do have the init.php file in the right section.

It's trying to find file /home/obpk/init.php, does that file exist?
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #6  
Old 04-25-2009, 10:21 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Yeah it does quietFinn . In the global section also, so everyone should be able to see it.
Reply With Quote
  #7  
Old 04-25-2009, 10:27 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Ive just rang him, and he said the proxy that he added was added automatically, he didnt have to edit anything manually. Which is much more of a concern than if he did it manually.
How will I know what the problem is , if I dont know where or what it edited o.o.
Is there perhaps an option to rollback a couple of days?
Reply With Quote
  #8  
Old 04-25-2009, 10:28 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

Okay! I think I found your problem. Both index.php and init.php are located in the site's base (public_html) folder. But index.php is trying to load (require_once) ../init.php and cannot possibly do so.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
  #9  
Old 04-25-2009, 10:41 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Yeah, which is strange tbh, because it was working perfectly before the owner tried to add a proxy to it. But he said that he didnt have to do it manually, so he has no idea which files or folders it edited. Which is bad news.
Is there no option to like reset it to a certain date, like a system recovery thing. Something like that just to set it back a couple of days before the proxy was added.
Reply With Quote
  #10  
Old 04-25-2009, 10:46 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

That "remedy" would require either a request from the site owner for Host Gator to restore an older backup (if they still have one) or restoration of an old backup held by the owner himself.

Give me a few minutes to upack my own unused copy if IPB and I'll see what it should be looking for.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
  #11  
Old 04-25-2009, 10:49 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Thanks very much
Reply With Quote
  #12  
Old 04-25-2009, 11:04 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

Okay. It appears that your problem comes down to one excessive dot in IPB's index.php file. How it got there I cannot guess, but the fix is very simple.

1) Save a "just in case" backup copy of the index.php file that is located in the site's main public_html folder.

2) Download that index.php file in ASCII mode as necessary so that you can open it in a text editor (or use your file manager's editor to open it on line).

3) Find the require_once item in question (at line 48 in IPB v2.3.5) that currently reads as follows:
Code:
require_once( '../init.php' );
4) Edit that line to remove one dot preceeding the forward slash so that it reads as follows:
Code:
require_once( './init.php' );
5) Save the revised index.php file and re-upload in ASCII mode ovewriting the existing public_html/index.php file (but not the "just in case" backup) as necessary.

That should solve the problem insofar as we know it at present. Let us know how it works.
__________________
Regards, Richard
VIRtech.org
Reply With Quote
  #13  
Old 04-25-2009, 11:12 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

At least the error message has gone , its a start .
But now , instead of my board taking me to the board page, it just takes me to the admin control panel.
That is via www.oblivionpk.com/index.php.
The site url is www.oblivionpk.com
Which is still under "mantienence". Quite a puzzle this one isnt it, sorry
Reply With Quote
  #14  
Old 04-25-2009, 11:21 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

The only other suggestion I can offer would be to re-upload the entire IPB files package if you have it available to you. But, before doing that, be certain to save the existing IPB configuration file.

P.S.: The default file that opens is determined by the indexes order of precedence. It has nothing to do with your IPB problem. In this case, your temporary maintence file is taking precedence over your IPB index.php
__________________
Regards, Richard
VIRtech.org

Last edited by virtvir5; 04-25-2009 at 11:26 AM.
Reply With Quote
  #15  
Old 04-25-2009, 11:25 AM
Mellor Mellor is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 8
Default Re: Help needed

Alright, thanks for the help mate. Preciate it a lot =)
Reply With Quote
  #16  
Old 04-26-2009, 09:13 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Help needed

Not sure if you are still following this thread, but I see that you've now reverted to the index.php file with require_once( '../init.php' ) and have moved your init.php to your account's root /home/obpk/ folder.

That will not work because init.php is the file that defines IPB's ROOT_PATH based on its own location. So it's now trying to load other files from /home/obpk/ subfolders instead of /home/obpk/public_html/ subfolders. It really was that superfluous dot in IPB's index.php that was wrong. Moving init.php isn't the answer.

As with most web applications, you can install the complete IPB package anywhere you wish, but its internal structure of related subfolders and files must remain intact.
__________________
Regards, Richard
VIRtech.org

Last edited by virtvir5; 04-26-2009 at 09:25 AM.
Reply With Quote
  #17  
Old 05-10-2009, 12:16 PM
chhanda chhanda is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 2
Default Re: Help needed

Thank you , he was trying to add a proxy to the site. I figured what you said out, im just not sure why it isnt working it seems to be fine? I do have the init.php file in the right section.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web designer needed quanlee Web Hosting Services 7 08-29-2008 06:25 AM
mod_rewrite help needed! fool4net Shared Hosting Support 8 07-28-2006 10:37 PM
Admin needed payne Shared Hosting Support 6 06-03-2006 11:55 AM
dns help needed tobo27 Shared Hosting Support 0 04-02-2004 10:24 AM

All times are GMT -5. The time now is 04:00 AM.