Re: [PHP] Undefined Variables

2013-02-14 Thread Stuart Dallas
On 14 Feb 2013, at 20:57, Al wrote: > On 2/14/2013 1:54 PM, Stuart Dallas wrote: >> Sorry for the top post! >> >> I don't know numbers, but my gut instinct is that the cycles wasted raising >> the notice (it gets raised even if it goes nowhere so turning display and >> log doesn't remove the hi

Re: [PHP] Undefined Variables

2013-02-14 Thread Al
On 2/14/2013 1:54 PM, Stuart Dallas wrote: Sorry for the top post! I don't know numbers, but my gut instinct is that the cycles wasted raising the notice (it gets raised even if it goes nowhere so turning display and log doesn't remove the hit completely) are better spent executing defensive

Re: [PHP] Undefined Variables

2013-02-14 Thread Stuart Dallas
Sorry for the top post! I don't know numbers, but my gut instinct is that the cycles wasted raising the notice (it gets raised even if it goes nowhere so turning display and log doesn't remove the hit completely) are better spent executing defensive code. There is no reason, ever, that producti

Re: [PHP] Undefined Variables

2013-02-14 Thread Jan Ehrhardt
Matijn Woudt in php.general (Thu, 14 Feb 2013 19:12:55 +0100): >On Thu, Feb 14, 2013 at 7:04 PM, Roman Gelfand wrote: > >> Is there a performance hit when a variable is undefined? or, perhaps, >> aside from the obvious uncontrolled conditions, are there other >> impacts? > >There might be a little

Re: [PHP] Undefined Variables

2013-02-14 Thread Matijn Woudt
On Thu, Feb 14, 2013 at 7:04 PM, Roman Gelfand wrote: > Is there a performance hit when a variable is undefined? or, perhaps, > aside from the obvious uncontrolled conditions, are there other > impacts? > > Thanks in advance There might be a little performance hit because the error is getting l

Re: [PHP] Undefined Variables

2013-02-14 Thread Ashley Sheridan
Roman Gelfand wrote: >Is there a performance hit when a variable is undefined? or, perhaps, >aside from the obvious uncontrolled conditions, are there other >impacts? > >Thanks in advance Aside from all the warnings and potential logic bombs? You will have a negligible performance hit with al

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-27 Thread Michal Migurski
Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Justin Patrin
On Thu, 26 Aug 2004 14:47:17 -0700, Jeff - Webmaster <[EMAIL PROTECTED]> wrote: > Removing the "." got rid of most of the errors, but two remain: > > Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4 > > Notice: Undefined variable: message in E:\domains\swinos\contact

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Turned out to be something different about PHP 4.3.8 vs. 4.3.4. That was the only difference between the two servers. As soon as I corrected that, all files are working like they used to. Thanks for your help. Jeff At 05:22 PM 8/26/2004, John Holmes wrote: Jeff - Webmaster wrote: Intersting. Thi

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Holmes
Jeff - Webmaster wrote: Removing the "." got rid of most of the errors, but two remain: Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4 Notice: Undefined variable: message in E:\domains\swinos\contact.php on line 12 The offending lines are: 4 - $headers = "MIME-Ve

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Removing the "." got rid of most of the errors, but two remain: Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4 Notice: Undefined variable: message in E:\domains\swinos\contact.php on line 12 The offending lines are: 4 - $headers = "MIME-Version: 1.0\r\n"; and 12 -

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Holmes
Jeff - Webmaster wrote: Intersting. This is the same pair of html and php files that was functional on another server. Can you think of any reason that could account for the difference? default error_reporting levels... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Intersting. This is the same pair of html and php files that was functional on another server. Can you think of any reason that could account for the difference? Jeff At 01:51 PM 8/26/2004, John Holmes wrote: Jeff - Webmaster wrote: Another website dies on line 4 here: $headers .= "MIME-

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Nichel
Jeff - Webmaster wrote: Here is a snippet of the code that is being choked on. The first failure comes from line 6: The variables are being passed from an html form that calls this script with the post method. Jeff If you're going to use the super-global $_POST, why do you need globals on? Any

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Holmes
Jeff - Webmaster wrote: Another website dies on line 4 here: $headers .= "MIME-Version: 1.0\r\n"; Well, in this case it's becaue $headers is undefined, yet you're trying to concatinate another string to it. Thus the warning... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registr

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Nichel
John Holmes wrote: I have mind reading turned off for the time being. It's a good thing I'm a nice guy. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Another website dies on line 4 here: $to = "[EMAIL PROTECTED]"; $subject = "Swinos.com Booking Contact - $name"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: swinos.com <[EMAIL PROTECT

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Here is a snippet of the code that is being choked on. The first failure comes from line 6: The variables are being passed from an html form that calls this script with the post method. Jeff At 12:06 PM 8/26/2004, John Holmes wrote: From: "Jeff - HarborNet" <[EMAIL PROTECTED]> Hello all. I jus

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Holmes
From: "Jeff - HarborNet" <[EMAIL PROTECTED]> Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copy

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Nichel
Jeff - Webmaster wrote: Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
The error reporting level is the same as it was for the same websites on a different server that is working. Jeff At 11:49 AM 8/26/2004, Greg Donald wrote: On Thu, 2004-08-26 at 12:55, Jeff - Webmaster wrote: > Hello all. I just finished placing a new server in production and PHP is > not working

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Greg Donald
On Thu, 2004-08-26 at 12:55, Jeff - Webmaster wrote: > Hello all. I just finished placing a new server in production and PHP is > not working. I am getting undefined variable messages when trying to submit > php based forms. Register Globals is on in php.ini, but it still does not > work. I have

Re: [PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread John Holmes
From: "Jeff - Webmaster" <[EMAIL PROTECTED]> Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copy

[PHP] PHP: Undefined Variables Error Message

2004-08-26 Thread Jeff - Webmaster
Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server

Re: [PHP] Undefined variables?

2002-11-18 Thread Maxim Maletsky
set error reporting to 55 -- Maxim Maletsky [EMAIL PROTECTED] "Martin Magnusson" <[EMAIL PROTECTED]> wrote... : > I installed php 4.2.3 on Apache2. > > When I write I get an error message telling me that > I have an undefined variable $anyvariable. Is this something new that one > must dec

Re: [PHP] Undefined variables?

2002-11-18 Thread Ernest E Vogelsinger
At 15:57 18.11.2002, Martin Magnusson spoke out and said: [snip] >I installed php 4.2.3 on Apache2. > >When I write I get an error message telling me that >I have an undefined variable $anyvariable. Is this something new that one >must declare all variables?

[PHP] Undefined variables?

2002-11-18 Thread Martin Magnusson
I installed php 4.2.3 on Apache2. When I write I get an error message telling me that I have an undefined variable $anyvariable. Is this something new that one must declare all variables? In my previous version of php the expression above would return an empty string - no error messages... Hope

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
ithin > > the script. He's assuming that these values are set but when they're not > it > > spews this list of errors. > > > > Is this a script that you wrote or are you here on behalf of the > programmer? > > > > -Kevin > > > >

Re: [PHP] Undefined variables?

2002-10-10 Thread Justoman
t but when they're not it > spews this list of errors. > > Is this a script that you wrote or are you here on behalf of the programmer? > > -Kevin > > - Original Message - > From: "Justoman" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> >

Fw: [PHP] Undefined variables?

2002-10-10 Thread Kevin Stone
PROTECTED]> Sent: Thursday, October 10, 2002 2:07 PM Subject: [PHP] Undefined variables? > I get this with almost all the scripts I run, > > It's a whole shit load of undefined variables! what are these and please, > how can they be fixed? > > Here's what I'm t

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
Of course, you should switch to UNIX :-) Seriously, have you looked at the source on those lines? Can you post the source code otherwise so we can take a look and let you know? The error you are receiving usually means that a variable is used without having been initialized. For example: $b = $

[PHP] Undefined variables?

2002-10-10 Thread Justoman
I get this with almost all the scripts I run, It's a whole shit load of undefined variables! what are these and please, how can they be fixed? Here's what I'm talkin bout, http://www.darkwatchclan.com/battlestats/bfserverinfo.php -Justoman -- PHP General Mailing List (http://www.php.net/) T

RE: [PHP] Undefined variables

2002-05-31 Thread Darren Gamble
t; > Shaw Cablesystems GP > > 630 - 3rd Avenue SW > > Calgary, Alberta, Canada > > T2P 4L4 > > (403) 781-4948 > > > > > > > -Original Message- > > > From: Crane, Christopher [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, May 30, 2002

Re: [PHP] Undefined variables

2002-05-31 Thread Philip Olson
Another similar way, using an array (very simple to add tasks): $tasks = array('ShowVersion','GetData','CreateImage'); if (@in_array($_REQUEST['Task'], $tasks)) { // add some error checking here (function_exists()) $$Task(); } else { // maybe run a default task here

RE: [PHP] Undefined variables

2002-05-30 Thread Martin Towell
age': CreateImage(); break; default: print 'Unknown function or No function supplied'; } basically, suppress warnings -Original Message- From: Christopher J. Crane [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:33 PM To: [EMAIL PROTECTED] Subject: Re: [P

Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane
I like this piece of code. In fact, I convert all my scripts that use the older If/Else code. What would happen if the "break; " wasn't used. Would it just continue through the rest of the function to find another match??? "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">new

Re: [PHP] Undefined variables

2002-05-30 Thread Miguel Cruz
On Thu, 30 May 2002, Crane, Christopher wrote: > if ($Task == "ShowVersion") { function ShowVersion(); } > elseif ($Task == "GetData") { function GetData(); print "$DataOutput"; } > elseif ($Task == "CreateImage") { function CreateImage(); } > else { print "Incorrect Variable or no Variable Suppli

Re: [PHP] Undefined variables

2002-05-30 Thread Christopher J. Crane
== > Darren Gamble > Planner, Regional Services > Shaw Cablesystems GP > 630 - 3rd Avenue SW > Calgary, Alberta, Canada > T2P 4L4 > (403) 781-4948 > > > > -Original Message- > > From: Crane, Christopher [mailto:[EMAIL PROTECTED

RE: [PHP] Undefined variables

2002-05-30 Thread Darren Gamble
Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 > -Original Message- > From: Crane, Christopher [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 3:07 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP] Undefined variables >

RE: [PHP] Undefined variables

2002-05-30 Thread Leotta, Natalie (NCI/IMS)
Sent: Thursday, May 30, 2002 5:07 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Undefined variables I have an annoying problem, that I know is my own ignorance to PHP. I came from PERL and this was not a problem there but is with PHP. Here's the issue. I have a number of scripts t

[PHP] Undefined variables

2002-05-30 Thread Crane, Christopher
I have an annoying problem, that I know is my own ignorance to PHP. I came from PERL and this was not a problem there but is with PHP. Here's the issue. I have a number of scripts that use a "index.php?Task='some sort of task name'", for example, http://www.foo.com/index.php?Task=ShowVersion

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sorry, didnt get that that was your prefered method - didnt mean to step on your toes :) S On Sunday 31 March 2002 2:50 am, Lars Torben Wilson wrote: > On Sat, 2002-03-30 at 17:43, Shane Wright wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Has

Re: [PHP] Undefined variables

2002-03-30 Thread Lars Torben Wilson
On Sat, 2002-03-30 at 17:43, Shane Wright wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Not really. You either have to init your variables or turn off notices > > in error_reporting() (or otherwise suppress them; i.e. display_errors = > > off). > > initialising them with safe

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Not really. You either have to init your variables or turn off notices > in error_reporting() (or otherwise suppress them; i.e. display_errors = > off). initialising them with safe defaults is the thing to do - the point of the error is to warn a

Re: [PHP] Undefined variables

2002-03-30 Thread Lars Torben Wilson
On Sat, 2002-03-30 at 17:30, Ernesto wrote: > Hi, newbie here. > > I was erroneously using "error_reporting=E_ALL ~E_NOTICE" on my debug > server. > Now, I changed it to "error_reporting=E_ALL" and I can see lots of warnings > about using undefined variables. > So, if I don't want to see warnings

[PHP] Undefined variables

2002-03-30 Thread Ernesto
Hi, newbie here. I was erroneously using "error_reporting=E_ALL ~E_NOTICE" on my debug server. Now, I changed it to "error_reporting=E_ALL" and I can see lots of warnings about using undefined variables. So, if I don't want to see warnings all over the place, I have to check every variable with i

[PHP] Undefined variables

2001-07-04 Thread Uri Even-Chen
To PHP-general group, I have configured PHP to report all errors & warnings ("error_reporting = E_ALL" on php.ini file), but since then I get tons of warning messages for "Undefined variables". For example, referring $HTTP_HOST directly leads a message like "Undefined variable: HTTP_HOST

Re: [PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Martin Thoma
gt; From: Martin Thoma [mailto:[EMAIL PROTECTED]] > > Sent: Friday, May 18, 2001 1:36 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Undefined Variables / PHP 4.0.4pl1 > > > > > > Hello ! > > > > I just installed PHP 4.0.4pl1 over an existing PHP

RE: [PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Johnson, Kirk
ECTED] > Subject: [PHP] Undefined Variables / PHP 4.0.4pl1 > > > Hello ! > > I just installed PHP 4.0.4pl1 over an existing PHP 4.0.1 on Win98 with > Apache. Alle works greate, but I get a lot of warnings: > > Warning: Undefined variable: MyVariable in filename > >

[PHP] Undefined Variables / PHP 4.0.4pl1

2001-05-18 Thread Martin Thoma
Hello ! I just installed PHP 4.0.4pl1 over an existing PHP 4.0.1 on Win98 with Apache. Alle works greate, but I get a lot of warnings: Warning: Undefined variable: MyVariable in filename The warnings weren't there in the earlier version. How can I turn of these warnings ? Regards Martin --