hayw0027 Posted September 17, 2008 Share Posted September 17, 2008 Hey Guys, Im only just learning the ropes when it comes to php and im having a bit of trouble figuring out some errors that im getting on my site. What does this mean? Parse error: parse error, unexpected T_CASE in /hsphere/local/home/hayw0027/im-articles.com/code/articlems.php(45) : eval()'d code on line 25 This error comes up on the top of every article page in my article directory. e.g http://im-articles.com/other/how-to-spot-a-company-scam.html What do i do to solve this problem? Here is the php code where the problem exists. <?php if (!defined('ARTICLEMS')) { header('HTTP/1.0 403 Forbidden'); die; } /** * Main board view * **/ //---Placeholder Classes--- $Category = new baseclass(); $Comments = new baseclass(); $Article = new baseclass(); $Blocks = new baseclass(); $Page = new baseclass(); $Search = new baseclass(); $Plugin = new baseclass(); //-------------- class articlems extends articlemscore{ function doTemplates($templateset, $templatename){ global $Profile; global $Member; global $Article; global $Category; global $Search; global $Searchresults; global $Blocks; global $Page; global $Plugin; global $Comment; global $time_start; if ($templateset){ if ($templateset == '_MESSAGE'){ $this->output = $templatename; } else{ $this->templatephp = $this->get_template($templateset, $templatename, 1); $this->message = NULL; eval($this->templatephp); if ($this->message != NULL){ $this->output = $this->message; } else{ $this->template = $this->get_template($templateset, $templatename); $this->output = eval($this->formattemplate($templatename, $this->template)); } } } if ($this->bypass_cms == 1){ echo $this->output; exit; } $universal_set = $this->get_templateset('universal'); $universal_set_php = $this->get_templateset('universal',1); eval($universal_set_php['header']); eval($universal_set_php['footer']); eval($universal_set_php['main']); There we go, what do you guys reckon? ??? Link to comment https://forums.phpfreaks.com/topic/124729-very-basic-help-needed/ Share on other sites More sharing options...
BlueSkyIS Posted September 17, 2008 Share Posted September 17, 2008 the problem appears to be the use of eval on line 25: eval()'d code on line 25 apparently, php is trying to evaluate whatever is in one of the eval's as a CASE what are the values inside those eval's? $universal_set_php['header'], etc.? we'd probably need to see them Link to comment https://forums.phpfreaks.com/topic/124729-very-basic-help-needed/#findComment-644276 Share on other sites More sharing options...
Stooney Posted September 17, 2008 Share Posted September 17, 2008 Also point out which line is line 25. Link to comment https://forums.phpfreaks.com/topic/124729-very-basic-help-needed/#findComment-644290 Share on other sites More sharing options...
hayw0027 Posted September 18, 2008 Author Share Posted September 18, 2008 How do i turn off my error log files??? Make it so that error message doesnt appear to the general public??? Link to comment https://forums.phpfreaks.com/topic/124729-very-basic-help-needed/#findComment-644955 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.