This was the tale of my last couple of days. One of our long time customers was moving a bunch of web sites from various web hosting providers to her dedicated server.
As usual there was all kinds of kinks and problems during her attempts to reconfigure her web sites. Some of her sites are using Savant template system and was showing unusual behavior – request to the front page was returning status 500 – server error and while content was displaying the design of the content was altered. Unable to figure out the problem she asked for help.
All three of her sites was giving multiple errors in the Apache error_log:
1 2 3 4 5 6 7 |
[Thu Feb 13 01:37:16 2014] [error] [client x.x.x.x ] PHP Catchable fatal e rror: Object of class Savant2_Error could not be converted to string in /home/site/public_html/templates/compiled/Savant2_27c675933c6a4ce7762c6fcb8044eba3 on line 6 [Thu Feb 13 01:37:19 2014] [error] [client x.x.x.x] PHP Catchable fatal err or: Object of class Savant2_Error could not be converted to string in /home/site/public_html/templates/compiled/Savant2_27c675933c6a4ce7762c6fcb8044eba3 on line 6 [Thu Feb 13 01:37:19 2014] [error] [client x.x.x.x] PHP Catchable fatal err or: Object of class Savant2_Error could not be converted to string in /home/site/public_html/templates/compiled/Savant2_27c675933c6a4ce7762c6fcb8044eba3 on line 6 [Thu Feb 13 01:37:30 2014] [error] [client x.x.x.x] PHP Catchable fatal error: Object of class Savant2_Error could not be converted to string in /home/site/public_html/templates/compiled/Savant2_27c675933c6a4ce7762c6fcb8044eba3 on line 6 |
The problem is that while Savant could be an incredible piece of software knowing it is not in my immediate or long term plans – it doesn’t really fit my job description. But I had to fin the solution to the problem. After long and fruitless searching if somebody else already have it I decided to look into the problem file problem string to look for possible clues:
1 2 3 4 5 6 7 8 |
[root@server compiled]# cat Savant2_27c675933c6a4ce7762c6fcb8044eba3 <?php include $this->findTemplate('header.tpl') ?> <div align="center" id="message" style="color:red;"><?php print $this->message ?></div> <?php include $this->findTemplate($this->page) ?> <?php include $this->findTemplate('menu.tpl') ?> <?php include $this->findTemplate('footer.tpl') ?> |
What is in line 6 – attempt to load menu.tpl, whats offending on menu.tpl – nothing really because there is no template file with such name. Bingo! Since I’m not the designer and I really have no idea of what happened to the file in transit I’ve just created empty menu.tpl and all errors disappeared. Now the last thing – I’ve notified the sites owner about the problem and solution and she can have to deal with the missing template in her own professional way.
The conclusion is that this error is usually not that cryptic as it looks – it always worth to poke around to find out more details and the solution for the problem could be rather trivial.
0 Comments.