Username
Forgot password?
Welcome to our site!
Or Join with FTTF

Error on "Ask a Question" page

0

1112 views
Please Register or Login to perform this action error code: 0 file: /var/www/lampcms/lib/Lampcms/Base.php line: 351 trace: #0 /var/www/lampcms/lib/Lampcms/WebPage.php(269): Lampcms\Base->checkAccessPermission() #1 /var/www/lampcms/www/index.php(81): Lampcms\WebPage->__construct(Object(Lampcms\Registry)) #2 {main}
 
asked April 20, 2011 at 1:49 AM

 CA
Were you logged in when you visited the "Ask Question" page?
flag
Apr 20 '11 at 4:54

2 Answers

0
 
Ok, You can suggest a more friendlier version of this error. I'll replace it. The reason you see only the first line here and the whole debug on your site is because your site runs in debug mode. In debug mode you see the traceback of all errors - good for debugging. Normal users only the the actual error message.

The debug mode is enabled if you set DEBUG = true in !config.ini OR if you add your ip address to MY_IP section of !config.ini. This way you can run a production site and still have a debug mode available for you - when you access from any of the ip addresses defined in MY_IP

So don't worry - normal users don't see the whole debug message - only the actual error.

flag
answered April 26, 2011 at 6:21 AM
Ok, I didn't realize the debug settings was causing this. My suggestion: catch this exception and do not print the traceback message even if DEBUG = true, because this is not really an exception, but a normal, expected, every day part of using the website.
flag
Apr 26 '11 at 6:33
For example, if you fully expected a certain file to be somewhere, and it wasn't, that's an exception.
flag
Apr 26 '11 at 6:35
That's just a matter of design and a whole philosophical issue of what is an exception. I designed it to be special type of exception. There is a special exception class for this called "AuthException". Yes, I can easily make it to not print full traceback for AuthException but it just does not bother me since I know the traceback is not seen by normal users.
flag
Apr 26 '11 at 6:40
0
 
I too get similar error
Please Register or Login to perform this action error code: 0 file: /home/delhimen/webapps/php53/htdocs/lib/Lampcms/Base.php line: 350 trace: #0 /home/delhimen/webapps/php53/htdocs/lib/Lampcms/WebPage.php(285): Lampcms\Base->checkAccessPermission() #1 /home/delhimen/webapps/php53/htdocs/www/index.php(81): Lampcms\WebPage->__construct(Object(Lampcms\Registry)) #2 {main}
flag
answered April 25, 2011 at 10:12 PM
Are you logged in? This error is just a normal error message that tells users that they must login to do certain things.
flag
Apr 26 '11 at 4:57
You are right Dmitri, but to an average user it appears as if there is an error in the code itself. And, on this support website this same error is only the first line. I set the debug to false in the config file but it still stayed the same.
flag
Apr 26 '11 at 5:43

Your answer

Join with account you already have

FTTF

Preview

Alert