Page 1 of 1

Template Editing crashes Apache

Posted: Tue Jul 11, 2006 9:20 pm
by jubydoo
Today I went in to make some changes to our site template, and the browser just hung for a few minutes.  I said something to our sysadmin, and after tooling around with it for a while we finally realized that everytime we load the page admin/edittemplate.php, apache suddenly starts gobbling up resources and eventually has to be killed and restarted.

I've already tried replacing edittemplate.php with a fresh copy, which did nothing.  I also dumped the database and put it on XAMPP on my testing machine with a fresh copy of CMSMS, and it worked a-ok.  If I can't come up with anything else, I'll have to do that, but I've made some tweaks here and there to the code of CMSMS for some needs specific to our site, and I really don't want to have to go through and do all of that again.  If anyone has any suggestions, it would be greatly appreciated.

Re: Template Editing crashes Apache

Posted: Tue Jul 11, 2006 11:49 pm
by fadum
your host may of added mod_security, if so make sure you dont have the word "javascript" in any links in your template

let us know if that helps

cheers

Re: Template Editing crashes Apache

Posted: Wed Jul 12, 2006 7:46 pm
by jubydoo
Our sysadmin reports that mod_security is not installed on our server, and that he has not made any significant alterations to our Apache configuration in some time.

Re: Template Editing crashes Apache

Posted: Mon Jul 24, 2006 7:00 pm
by jubydoo
I've managed to narrow it down to which line is causing it to do this.  At around line 182 in edittemplate.php it includes header.php.  The line that seems to be causing apache to crash (I put a die() in front of it and it died fine, I put a die() after it and it does the hanging thing) is line 40 in header.php:

Code: Select all

$themeObject->PopulateAdminNavigation(isset($CMS_ADMIN_SUBTITLE)?$CMS_ADMIN_SUBTITLE:'');
Anybody have any idea where the class for this object is declared?  I'm thinking I might be able to track down the problem if I can find that.

Re: Template Editing crashes Apache

Posted: Wed Jul 26, 2006 5:01 am
by Elijah Lofgren
I think this problem was caused by my help links patch.
It's been fixed in CMSMS 1.0-svn (beta tomorrow hopefully)

Please see here:
http://forum.cmsmadesimple.org/index.ph ... l#msg26325
jubydoo wrote: I've managed to narrow it down to which line is causing it to do this.  At around line 182 in edittemplate.php it includes header.php.  The line that seems to be causing apache to crash (I put a die() in front of it and it died fine, I put a die() after it and it does the hanging thing) is line 40 in header.php:

Code: Select all

$themeObject->PopulateAdminNavigation(isset($CMS_ADMIN_SUBTITLE)?$CMS_ADMIN_SUBTITLE:'');
Anybody have any idea where the class for this object is declared?  I'm thinking I might be able to track down the problem if I can find that.
It's in lib/classes/class.admintheme.inc.php your problem will hopefully be fixed if you follow the instructions in the post linked to above.

Hope this helps,

Elijah

Re: Template Editing crashes Apache

Posted: Thu Jul 27, 2006 6:35 pm
by jubydoo
Actually, I had already applied that patch.  I finally got it to start working again when I replaced lib/classes/class.admintheme.inc.php with a fresh copy.  I figure if those patches are in the new version, they'll be put in when I upgrade.