Page 1 of 1

Random error when trying to edit pages.

Posted: Wed Feb 24, 2010 8:08 pm
by Bear-san
Hi everyone!


I'm having a really annoying problem here... Most of the time when I'm trying to edit a page (When I press 'Content', 'Pages'), I get this error:
Warning: main(Content.inc.php): failed to open stream: No such file or directory in /home/sv_syncronetdk/cms/lib/classes/contenttypes/ErrorPage.inc.php  on line 21

Fatal error: main(): Failed opening required 'Content.inc.php' (include_path='') in /home/sv_syncronetdk/cms/lib/classes/contenttypes/ErrorPage.inc.php on line 21
Maybe it's some kind of MySQL error? I've tried to change to another SQL database, both 5.1 and 5.0 - but with no luck - I can also choose 4.0 and 4.1 no other versions is available. The thing is, that it sometimes work without any problems at all... Can I blame my host for this? It only happens when I'm editing pages, this error doesn't come when I'm editing the template or stylesheets.


Screenshot:
https://dl.dropbox.com/u/1148172/errorcmsms.png


Regards

Re: Random error when trying to edit pages.

Posted: Wed Feb 24, 2010 10:03 pm
by reneh
after the error I _guess_ its something about the error page handling in cmsms. Missing configuration or similar.
But - I just guess wild here

Re: Random error when trying to edit pages.

Posted: Wed Feb 24, 2010 10:09 pm
by Bear-san
reneh wrote: after the error I _guess_ its something about the error page handling in cmsms. Missing configuration or similar.
But - I just guess wild here
I've tried deleting everything from the directory and put everything up again - but no luck there.  :'(

Re: Random error when trying to edit pages.

Posted: Wed Feb 24, 2010 11:26 pm
by Bear-san
I've taken a picture of it working, as you can see there's no error what so ever. How can something random like this happen?

https://dl.dropbox.com/u/1148172/cmsms.png

I will gladly provide any info for you, so I can get this working.  :-\

Re: Random error when trying to edit pages.

Posted: Thu Feb 25, 2010 4:12 am
by davidkirk451
So, the Content.inc.php which ErrorPage.inc.php is pulling in is in the same directory as ErrorPage.inc.php.  Looking at the code, it should be pulling it in everytime. 

The fact that it randomly is not there or fails to open points to an issue with the host/server, file permissions or php.

Re: Random error when trying to edit pages.

Posted: Fri Feb 26, 2010 9:43 am
by fredp
davidkirk451 wrote: So, the Content.inc.php which ErrorPage.inc.php is pulling in is in the same directory as ErrorPage.inc.php.  Looking at the code, it should be pulling it in everytime. 
...
Hi Bear-san,

I just had a quick look at ErrorPage.inc.php in CMS 1.6.7 and noticed that its require_once statement doesn't contain a path (relative or absolute), just a file name:

Code: Select all

...
require_once('Content.inc.php');
class ErrorPage extends Content
{
...
This means that the PHP will try to use the include_path to locate the Content.inc.php file. So, it is *hypothetically* possible that if the include_path value where changed to not contain a path to the "current directory" (e.g., "."), then Content.inc.php would not be found. 

I suspect that this isn't your problem, but just in case... does your site's code or config files (i.e., php.ini, .htaccess) modify the value of the PHP include_path?

Fred P.