Re: php3 -> php4

From: Date: Wed, 01 Aug 2001 06:35:24 +0000
Subject: Re: php3 -> php4
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-60587@lists.php.net to get a copy of this message
> "Liviu Popescu" <xliviux@yahoo.com> wrote in message > news:20010731124001.85614.qmail@web20101.mail.yahoo.com... > > I have a lot of php scripts developed with php3. > > I've installed php4 and I get some warnings when I > > evaluate variables there are not set (are empty). > > In php3 there was no problem (no warning). > > If I modify the code by using empty($var) or > > isset($var) it's ok, but there are lots of such > > issues. > > How could I manage this without major changes? > Edit your PHP.ini file and change the error_reporting to: > > error_reporting=E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; show only errors > Yes, do this for now. But long-term, start using isset() and turn on E_NOTICE script by script until all your code is clean. Every one of those un-initialized variables you use is a potential hole for a hacker to feed in some value your script isn't expecting. It also means your programming algorithm is probably not really as organized as it could be. -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#60587) next »