homepage Welcome to WebmasterWorld Guest from 54.167.144.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
deprecated php errors
can this be avoided?
smallcompany

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4656026 posted 4:08 pm on Mar 21, 2014 (gmt 0)

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

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



 
Msg#: 4656026 posted 12:47 am on Mar 22, 2014 (gmt 0)

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

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4656026 posted 3:32 am on Mar 22, 2014 (gmt 0)

Thanks!

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

penders

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



 
Msg#: 4656026 posted 11:28 am on Mar 22, 2014 (gmt 0)

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

Some more info...
https://php.net/manual/en/migration53.deprecated.php

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved