hayw0027 Posted September 16, 2008 Share Posted September 16, 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? Be great if you can help Thanx Hayz Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/ Share on other sites More sharing options...
dezkit Posted September 16, 2008 Share Posted September 16, 2008 post the 25th line of your articlems.php Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-642550 Share on other sites More sharing options...
Maq Posted September 16, 2008 Share Posted September 16, 2008 Not sure if this is your live site but, you should have the error logs turned off on your live site. Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-642565 Share on other sites More sharing options...
hayw0027 Posted September 16, 2008 Author Share Posted September 16, 2008 This is the first part of my php code. <?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); I cant see anything wrong with the code on the 25th line. Yes, this is my live site. How do you turn off the error logs. Thankyou Hayz Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-642762 Share on other sites More sharing options...
JasonLewis Posted September 16, 2008 Share Posted September 16, 2008 Can you post more code, I think it is saying line 45 as well. Look for the eval() function, should give you the right line. My guess is there is a switch statement that isn't working correctly. Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-642767 Share on other sites More sharing options...
hayw0027 Posted September 16, 2008 Author Share Posted September 16, 2008 <?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? Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-643250 Share on other sites More sharing options...
hayw0027 Posted September 17, 2008 Author Share Posted September 17, 2008 Does it have to do with the eval($this->templatephp); part of the code or not? Iv got to get this fixed asap any help would be great right now. Thanx Quote Link to comment https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/#findComment-643567 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.