Page 1 of 1

Fatal error: require(): Failed opening required

Posted: Mon Aug 24, 2015 8:35 pm
by nathangaitch
Hello, I hope that someone will be able to help me with this, as I'm stumped.

(I should point out, that I no longer design websites, but I do keep a couple of my old clients on as a favour to them, even though I was never an expert, and I've now forgotten most of what I once knew!)

I look after a pretty old website built with CMSMS for an old client of mine, and they don't keep it very up to date, and they hardly ever look at it, it seems(!), and certainly, nether do I.

They've just been in touch to inform me that the website is unavailable - they don't know how long this has been the case.

When I try to access the site, which SHOULD be available at http://www.dennislyne.com the page only displays the following error:
Fatal error: require(): Failed opening required '/homepages/2/d250314576/htdocs/version.php' (include_path='.:/usr/lib/php5.5') in /homepages/2/d250314576/htdocs/include.php on line 89
I cannot get into the admin site, or into the site itself, and I can't find any information about this kind of error.

I do, however have access to the phpMyAdmin at the hosting site's control panel, but I'm a complete novice with this kind of thing.

Is any one able to shed any light on what might have caused the site's failure, and what I might be able to do to rectify it?

Thank you so much in advance for your help.

Best wishes, Nathan

Re: Fatal error: require(): Failed opening required

Posted: Mon Aug 24, 2015 11:32 pm
by Dr.CSS
It almost looks like the host upgraded the PHP and the version you have isn't able to use it, I would suggest upgrading the CMSMS, of course it would help if we had more info...

Re: Fatal error: require(): Failed opening required

Posted: Tue Aug 25, 2015 8:13 am
by nathangaitch
Hello Dr.CSS, and thanks so much for getting back to me. I suspect you might be right - it's been a while since any work has been done on this site.

With being able to access the site or the admin pages, is there a way of finding out which version of the CMSMS I've been using from the raw files?

At the moment, I don't know what information would be useful to you guys, or how to find it.

Any tips would be great, and I'll try to provide anything you think might help with looking into this.

I really appreciate your time on this.

Best wishes, Nathan

Re: Fatal error: require(): Failed opening required

Posted: Tue Aug 25, 2015 3:58 pm
by nathangaitch
So this is now getting really strange.

I've discovered that the thing that is making the site not show up is a permissions issue with version.php in the main directory. I looked at the permissions for it, and they were set to 200, which is only set to "write" for owner.

I changed this to 700, Read, Write and Execute, again just for owner, and the site magically popped back online.

Yes! I thought.

For about a minute and a half.

The strange part about this, is that after about one and a half minutes, something is changing the settings back to 200, and the site goes offline, only displaying the error message in my first post here.

I can change it back to 700 as many times as I like, and for a very short time I get full access to the site, and the admin site, and can do any edits I like, but after 1.5mins, it all stops working again, until I re-change the permissions back to 700.

What on earth could be causing this? It doesn't seem possible, and I'm going mad, trying to figure it out.

Does anyone have any ideas?

Thanks again for your time and thoughts,
Best wishes, Nathan

Re: Fatal error: require(): Failed opening required

Posted: Tue Aug 25, 2015 6:21 pm
by Dr.CSS
The version.php will tell you which version of CMSMS it is, but I would talk to my host about the permissions problem and ask them what the h*** is going on.. ;)

Re: Fatal error: require(): Failed opening required

Posted: Wed Aug 26, 2015 7:57 am
by nathangaitch
Hey DrCSS, I've finally fixed the problem, and it's obliquely thanks to your advice, so thank you very much. On your recommendation, I downloaded the version.php file, so I could see what version of CMSMS I was using.

When I opened the file in a text reader, even though I've never seen this file before, and don't know what it is supposed to look like, I could tell immediately that something was wrong. The top of the file looked like this:
<?php $ cookey = " "; preg_replace("\x23\. 5x3b"); ?>
After which, the normal <?php tag began, and the rest of the page was what I would expect to see in a file like this.

I can only assume that I've been hacked? Have you seen anything like this before? Have you any ideas what code like this would be supposed to achieve? I see the word "replace" in there, so it's obvious;y re-writing some stuff, which would explain why my permissions kept changing, I guess, but what else was it supposed to be doing?

Anyway, I've deleted the extra code, re-uploaded a clean copy, and the website is now working properly, so thank you once again, for pointing me in the right direction.

Very best wishes,
Nathan