Welcome to WebmasterWorld Guest from 54.226.194.180

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

deprecated php errors

can this be avoided?

     

smallcompany

4:08 pm on Mar 21, 2014 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I wonder about if deprecated php errors can totally be avoided? My PHP knowledge is limited. My understanding is that something being deprecated in PHP means it's old and should not be used anymore. If right, would rewriting the code help in avoiding such errors/warnings showing up in server logs?

Thanks

penders

12:47 am on Mar 22, 2014 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Yes, all deprecated warnings, notices and strict messages can be avoided.

And yes, deprecated methods are old and should not be used, often because there are related security vulnerabilities or they promote bad practises. Elements which are deprecated now are likely to be removed entirely in future versions of PHP and that is when your code breaks.

Rewriting the code will resolve the problem. This isn't necessarily a big task, some might be quick fixes. However, it will depend on exactly what is being used and your underlying code base.

smallcompany

3:32 am on Mar 22, 2014 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Thanks!

In first case, it happened it was only comments in php.ini files. I replaced "#" with ";" and it seems ok now.

penders

11:28 am on Mar 22, 2014 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



"#" comments in INI files would seem to have become deprecated with PHP 5.3

Some more info...
[php.net...]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month