Arctix Posted November 6, 2012 Share Posted November 6, 2012 Hello, I've been running a e107 website for awhile, but suddenly I've come across a PHP error that's disabled my website. Sadly, the support at e107 weren't very helpful. I've been fixing errors for the last 2 hours, and now I've finally been stumped. First-off, here's my error : Fatal error: Class declarations may not be nested in /home/judge/public_html/fawdean/class2.php on line 1310 PasteBin Link I pasted my code starting at Line 1310 and ending at Line 1441, which is the section of code this error is referring to. Any help will be appreciated in helping me solve this problem. Thank you, Kind regards, Arctix Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/ Share on other sites More sharing options...
Zane Posted November 6, 2012 Share Posted November 6, 2012 I will bet it has something to do with the fact that your have an open curly brace before your class declaration {class e_online { Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390626 Share on other sites More sharing options...
Arctix Posted November 6, 2012 Author Share Posted November 6, 2012 I will bet it has something to do with the fact that your have an open curly brace before your class declaration {class e_online { Thanks Zane for your response, however, I have tried seeing what happens when I remove that brace, and it's corresponding closing brace, HOWEVER, nothing changes whatsoever....the error remains the same... Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390628 Share on other sites More sharing options...
Jessica Posted November 6, 2012 Share Posted November 6, 2012 It's probably still nested within something. Post what was in the lines before that spot. Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390629 Share on other sites More sharing options...
Arctix Posted November 6, 2012 Author Share Posted November 6, 2012 It's probably still nested within something. Post what was in the lines before that spot. Lines 1041 - 1309 http://pastebin.com/3fuQBfvq Just in case here is the entire code: http://pastebin.com/Jifbm5Bm This is the first time this problem has ever arisen Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390635 Share on other sites More sharing options...
jcbones Posted November 7, 2012 Share Posted November 7, 2012 What changed? In the 'entire code' the class declaration is on line 1309 and ends on 1438 (not 1310 to 1441), and it isn't nested. Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390653 Share on other sites More sharing options...
50r Posted November 7, 2012 Share Posted November 7, 2012 i think there is more to read about this issue https://bugs.php.net/bug.php?id=35634 Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390670 Share on other sites More sharing options...
Arctix Posted November 7, 2012 Author Share Posted November 7, 2012 i think there is more to read about this issue https://bugs.php.net/bug.php?id=35634 I've read through that article, yet still can not determine what has to be the cause. I've removed the " { " and it's corresponding " } " , I've tried putting the class class e_online before the {. Nothing has solved my problem sadly.... Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390879 Share on other sites More sharing options...
PFMaBiSmAd Posted November 7, 2012 Share Posted November 7, 2012 The problem is because the definition of the e107table class has been edited/cutoff so that all the remaining code after that point is considered to be part of the e107table class. Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390882 Share on other sites More sharing options...
PFMaBiSmAd Posted November 7, 2012 Share Posted November 7, 2012 Your file is missing the following, starting after the } else, on line 777 - { tablestyle($caption, $text, $mode); } } } } Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390884 Share on other sites More sharing options...
Arctix Posted November 7, 2012 Author Share Posted November 7, 2012 Your file is missing the following, starting after the } else, on line 777 - { tablestyle($caption, $text, $mode); } } } } ' OMFG THANK YOU!!! Link to comment https://forums.phpfreaks.com/topic/270377-class-declarations-fatal-error/#findComment-1390929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.