Random error when trying to edit pages.

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Bear-san
New Member
New Member
Posts: 5
Joined: Thu Feb 18, 2010 1:33 pm

Random error when trying to edit pages.

Post 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
Last edited by Bear-san on Wed Feb 24, 2010 9:15 pm, edited 1 time in total.
reneh
Dev Team Member
Dev Team Member
Posts: 446
Joined: Tue Nov 28, 2006 8:39 pm

Re: Random error when trying to edit pages.

Post 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
ReneH 8-)
A search will save you hours waiting for an answer! Image
Bear-san
New Member
New Member
Posts: 5
Joined: Thu Feb 18, 2010 1:33 pm

Re: Random error when trying to edit pages.

Post 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.  :'(
Bear-san
New Member
New Member
Posts: 5
Joined: Thu Feb 18, 2010 1:33 pm

Re: Random error when trying to edit pages.

Post 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.  :-\
davidkirk451
Forum Members
Forum Members
Posts: 11
Joined: Wed Jul 22, 2009 7:58 pm

Re: Random error when trying to edit pages.

Post 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.
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: Random error when trying to edit pages.

Post 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.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
Post Reply

Return to “CMSMS Core”