RE: [PHP] Undefined Variables

From: Date: Wed, 22 Nov 2000 12:57:57 +0000
Subject: RE: [PHP] Undefined Variables
Groups: php.general 
Request: Send a blank email to php-general+get-26623@lists.php.net to get a copy of this message
Is there a way to prevent it directly from the PHP.ini? I am talking about error_repoprting(0) which when inserted at the beginning of the file avoids these stupid "undefined variable" errors, Ohh.. right.. I am talking about windows 2000, which I decided to play with using Apache 1.13.4 and PHP 4.0.3pl1 Can this be disallowed somehow to run PHP just like if it would be a *nix? (I know that's hard, but erro_reportings are such a pain) Will error_reporting(0) also influent some other parser, function, array errors? Thanks, Maxim Maletsky -----Original Message----- From: Joe Stump [mailto:joe@earth.care2.com] Sent: Tuesday, October 31, 2000 5:26 AM To: bradbunce Cc: php-general@lists.php.net Subject: Re: [PHP] Undefined Variables put error_reporting(0) at the top of the page --Joe On Mon, Oct 30, 2000 at 02:13:52PM -0600, bradbunce wrote: > I am running the same code on two different platforms. > > The production platform is RedHat Linux 6.2 with Apache 1.3.14 and PHP4 > The development platform is NT 4.0 with Apache 1.3.14 and PHP4. > > PHP is working fine on both, however I am experiencing a "undefined variables" problem on the NT platform. > > Here is a sample piece of code: > > <FORM ACTION="login.php?do=authenticate" METHOD="post"> > > <?php > if ($authenticated == "no") { > echo ("<table width=640 border=0><tr><td><strong>Incorrect Username and/or Password. Please try again.</strong></td></tr></table>"); > } > ?> > > <table width="640" border="0"> > <tr> > <td> > <table border=0> > <tr> > <td><strong>Username</strong></td> > <td><input type="text" name="username" size="10" > maxlength="10"></td> > </tr> > <tr> > <td><strong>Password</strong></td> > <td><input type="password" name="password" size="10" maxlength="10"></td> > </tr> > <tr> > <td colspan="2" align="center"> > <input type="submit" value="Login" name="B1"> <input > type="reset" value="Reset" name="B2"> > </td> > </table> > </form> > > </td> > </tr> > </table> > > The Linux platform executes without error. The NT platform returns: > > Warning: Undefined variable: authenticated in login_form.php on line 4 > > Is there a setting in php.ini that I am overlooking? Why would I have to define variables on NT and not on Linux? > > Any help would be appreciated. Thanks. ============================================================================ ==== = Joe Stump joestump98@yahoo.com http://www.miester.org = ============================================================================ ==== "Real programmers don't comment their code. It was hard to write, it should be hard to understand." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#26623) next »