Hi Will,

you might want to take a look at

http://www.php.net/register_globals

There has been a change in default behaviour concerning this option:
Prior to this option the default was like having this option ON.
Early Versions of PHP4 equally defaulted this option to ON.
Newer PHP versions for security reasons default this option to OFF
and strongly recommend keeping it OFF and changing the scripts instead.

Maybe the two environments you use differ at this point.

As to your implicit question:

PHP always initializes variables upon first use to some appropriate 
kind of emptiness:  0, "", ... and issues the complaint you see.
Good programming practice just always has the first occurrence of
a variable to the left hand side of an assignment, so to have an 
_explicitly_ defined start value.

Hope this helps...
-- 
Sven

> -----Ursprüngliche Nachricht-----
> Von:  WL [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Dienstag, 27. Mai 2003 20:44
> An:   [EMAIL PROTECTED]
> Betreff:      [PHP-WIN] Re: Subject: FOpen problems
> 
> Neil Smith <[EMAIL PROTECTED]> said:
> > Have you put a line into the top of your code like :
> >
> > error_reporting(E_ALL)
> >
> > ? And if so, where are your errors being logged on the new server -
> > some log to stdout (the apache logfiles) some to the console (the web
> > browser) so if case (1) you may be getting error messages but not
> > seeing them.
> 
> Thanks Neil.  Here's my reply to another group that I posted.  If you have
> any ideas, they'd be very welcome:
> 
> OK here's what I'm getting:
> 
> Undefined variabled on line seven ($q which one of you mentioned) - this is
> before the form is submitted, and I can get round this probably
> 
> Undefined variable "num" on line 47:
> 
> 
> PHP:
> $num = ($num) ? $num+1 : "16";
> 
> 
> 
> 
> Another undefined:
> 
> 
> PHP:
> $data = strstr($data,"Sorted by date</b></font></td></tr></table>");
> 
> 
> 
> 
> And another:
> 
> 
> PHP:
> $output .= "<?xml version="1.0\" encoding=\"UTF-8\" ?>\n";
> 
> 
> 
> 
> Well I suppose this is good news, isn't it?! At least we can see what to do
> (or you guys can anyway). In CF, variables generally have to be stated using
> <cfparam> - but no idea how to do this in PHP...
> 
> Will
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to