1
phillipd
Errors are showing up with debugging turned on
  • 2004/5/6 22:16

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I have several XOOPS sites running. They all seem to work fine but whern I turn on PHP debugging in Admin->Preferences, I get bunches of errors like:

Notice [PHP]: Undefined variable: on_date in file modules/newbb/post.php line 130
Notice [PHP]: Undefined index: nosmiley in file modules/newbb/post.php line 166
Notice [PHP]: Undefined index: icon in file modules/newbb/post.php line 167
Notice [PHP]: Undefined index: attachsig in file modules/newbb/post.php line 168

Various modules spit out different errors like this. Is this normal? Everything seems to work ok.

Doug P

2
Dave_L
Re: Errors are showing up with debugging turned on
  • 2004/5/6 23:58

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


That's normal.

The code needs to be cleaned up to get rid of those, but those notices probably don't indicate any problems.

3
Catzwolf
Re: Errors are showing up with debugging turned on
  • 2004/5/7 1:21

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

Dave_L wrote:
That's normal.

The code needs to be cleaned up to get rid of those, but those notices probably don't indicate any problems.


I still feel that these debugging errors should be made avail to webmasters only. Nothing worse than visiting a website with all those lines of debugging code.

4
Dave_L
Re: Errors are showing up with debugging turned on
  • 2004/5/7 1:30

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


So error_reporting(0) should be forced unless the current user is an admin?

My only issue with that is you may want to test the script while logged in as a normal user, or while not logged in, and in that case you may want to see the notices.

Maybe another config option would be the way to handle that.

5
WarDick
Re: Errors are showing up with debugging turned on
  • 2004/5/7 1:35

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Is there any chance that the errors are recorded on any apache, php or system error logs when debug is turned off.

If so this would contribute to page loading overhead and ultimately limiting the number of simultaneous users connections.

6
Catzwolf
Re: Errors are showing up with debugging turned on
  • 2004/5/7 1:45

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

Dave_L wrote:
So error_reporting(0) should be forced unless the current user is an admin?

My only issue with that is you may want to test the script while logged in as a normal user, or while not logged in, and in that case you may want to see the notices.

Maybe another config option would be the way to handle that.


I personally think that this makes a site look very unprofessional. In all the time I have been testing my modules only once or twice have I ever had to logout when debugging.

I help run a website, tech support I guess and the webmaster freaks out everytime they see that on their website and no matter how many time you tell them, they do not like seeing it when they are not logged in as webmaster.

I think that this should be an option in config, to allow admin to choose if debugging errors should be displayed to which group and not for everyone to see.

Just my thoughts on this.

7
fatman
Re: Errors are showing up with debugging turned on
  • 2004/5/7 2:08

  • fatman

  • Friend of XOOPS

  • Posts: 176

  • Since: 2003/12/13


Certainly 'who' gets to see the error messages would help. I'd like this assigned to the user level instead of groups.

If you set which individual users saw error messages then it would be possible to test as a member of any user group.

Another nice feature would be the ability to login as anonymous. Or in other words, set a user name and password which would allow that user to see errors but still treat the user as anonymous. This way you could test as anonymous and not have all your anonymous users see how sloppy your code is.


Login

Who's Online

217 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits