proctk Posted September 12, 2007 Share Posted September 12, 2007 ho at times I get this error message Warning: getimagesize() [function.getimagesize]: Read error! in /mnt/w0400/d11/s01/b02a5c57/www/familyclick.ca/messageCenter/writeMessage.php on line 95 Warning: Division by zero in /mnt/w0400/d11/s01/b02a5c57/www/familyclick.ca/messageCenter/writeMessage.php on line 102 The problem I'm having I'm having a hard time preventing the error. Is there a way to turn error messages off on certain pages. Ideally I would like to log these errors any idea how to do this Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/ Share on other sites More sharing options...
cooldude832 Posted September 12, 2007 Share Posted September 12, 2007 why would you want to "turn off errors" you get errors because your code doesnt' function right, instead of suppressing errors (commonly done in php.ini or using the @ operator on functions) you should try and amend the errors so they don't occur. Because even if you supress the visual error the mechnical error in the script still is there and your desired goal will not be reached Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347406 Share on other sites More sharing options...
proctk Posted September 12, 2007 Author Share Posted September 12, 2007 how would I use the @ function, could you give an example Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347409 Share on other sites More sharing options...
marcus Posted September 13, 2007 Share Posted September 13, 2007 @function(); Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347412 Share on other sites More sharing options...
Barand Posted September 13, 2007 Share Posted September 13, 2007 As always, I agree with cooldude. When developing I prefer setting error reporting level to E_ALL so everything gets reported. That way I can eliminate careless coding such as not defining variables or trying to access array elements that don't exist etc. The best way to turn off errors is to code correctly. Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347431 Share on other sites More sharing options...
cooldude832 Posted September 13, 2007 Share Posted September 13, 2007 As always, I agree with cooldude. When developing I prefer setting error reporting level to E_ALL so everything gets reported. That way I can eliminate careless coding such as not defining variables or trying to access array elements that don't exist etc. The best way to turn off errors is to code correctly. I'm going to frame this thread and put it on my wall. Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347454 Share on other sites More sharing options...
Barand Posted September 13, 2007 Share Posted September 13, 2007 It's certainly a sentence I never expected to say Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347456 Share on other sites More sharing options...
marcus Posted September 13, 2007 Share Posted September 13, 2007 It's certainly a sentence I never expected to say Denied. Link to comment https://forums.phpfreaks.com/topic/69114-turn-off-error-messages/#findComment-347458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.