FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Never log deprecation warnings
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Never log deprecation warnings [message #179039 is a reply to message #179038] Thu, 06 September 2012 17:37 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 9/6/2012 9:33 AM, The Natural Philosopher wrote:
> J.O. Aho wrote:
>> On 06/09/12 15:48, Thomas 'PointedEars' Lahn wrote:
>>> Jonathan Stein wrote:
>>>
>>>> Does anyone have an idea about how to never log deprecation warnings -
>>>> even if the code alters error_reporting?
>>>>
>>>> I'm thinking about setting "php_flag log_errors off" in .htaccess to
>>>> block all error logging, but I would prefer to log real errors.
>>>
>>> You could set `error_reporting' to something that includes `&
>>> ~DEPRECATED'
>>> (and code that alters error-reporting in more than one place, except for
>>> debugging purposes, is potentially bad code anyway), but …
>>>
>>>> (And no, avoiding deprecated functions is not an option in this case).
>>>
>>> … I strongly suggest you fix the code instead. Why is that IYHO not an
>>> option in this case?
>>>
>>> If you do not fix deprecated code now, it will be a real error in one
>>> of the
>>> next PHP versions. Upgrading PHP to that version will cause your
>>> application to break. Not upgrading to it will cause your
>>> application to be
>>> inherently insecure as you would not get all the security fixes. You
>>> do not
>>> want any of that to happen.
>>
>> Of course they could try to stick to the current version of PHP on the
>> server, but of course then they will be stuck with all the security
>> issues which may be in the PHP (we seen a number of such this year) or
>> try to bakcport fixes to the PHP source code and build it.
>>
>> Of course the absolute simplest thing to do is to fix the PHP scripts,
>> have to agree with Thomas and Jerry on this one.
>>
> yeah. One day I'll have to plough through mine and replace all the
>
> if ($_POST[....) with
> if (isset($_POST[...) && $_POST[...))
>
> and lower the error logs by a couple of hundred bytes a day.
>
> But meanwhile I think I'll make myself a coffee and a cheese sandwich.
>
>

2 sugars and cream for me please.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how format one date
Next Topic: Problem with PHP Driver Authentication
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 15:01:31 GMT 2024

Total time taken to generate the page: 0.05356 seconds