basic config..forgot..!
Moderator: General Moderators
basic config..forgot..!
Now i using easyphp for my php. then when i open my web in localhost then this errors occur. Before there is no problem but now this errors appear..
Notice: Undefined index: login in c:\program files\easyphp1-7\www\idcv1.01\index.php on line 2
Notice: Undefined variable: login in c:\program files\easyphp1-7\www\idcv1.01\index.php on line 4
Notice: Undefined variable: InvoiceMaster in c:\program files\easyphp1-7\www\idcv1.01\header.php on line 21
I thing, i miss up in php setting.. anybody kat help me..??
Notice: Undefined index: login in c:\program files\easyphp1-7\www\idcv1.01\index.php on line 2
Notice: Undefined variable: login in c:\program files\easyphp1-7\www\idcv1.01\index.php on line 4
Notice: Undefined variable: InvoiceMaster in c:\program files\easyphp1-7\www\idcv1.01\header.php on line 21
I thing, i miss up in php setting.. anybody kat help me..??
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
By default NOTICE reporting is off in PHP. To run your scripts without being notified on whether or not a variable has been initialised (just and example), use:
You can safely ignore NOTICES. For more details see [php_man]error_reporting[/php_man].
Code: Select all
error_reporting (E_ALL ^ E_NOTICE);Essentially yes, but developing your scripts/apps with error_reporting set to 'E_ALL' can save you hours of work when it comes to debugging.patrikG wrote:You can safely ignore NOTICES.
I have seen people spend literally hours trying to work out why their script/function is not returning the expected results, only to discover that the variable they have passed was mispelt.
If your error level is set to 'E_ALL' then you will be immediately alerted to the fact the the mispelt variable does not exist (assuming of course that you have not spelt the varaibale as another one which does exist).
Personally I would recommend you develop your scripts/apps with error_reporting set to 'E_ALL', it does have other uses to apart from that I mentioned above.
Instead of doing stuff like:
if($foo['login']){
....
}
do:
if(!empty($foo['login'])){
....
}
That should prevent those notices.
if($foo['login']){
....
}
do:
if(!empty($foo['login'])){
....
}
That should prevent those notices.
Last edited by markl999 on Fri Jul 09, 2004 4:28 am, edited 1 time in total.
what variable $foo can do? What $foo really is? Thanks!
Actually, before this this same code i use with different computer and different OS, this stuff work... but when i set a new PHP setup(PHP,MySql, phpmyadmin) then this warning appear... Actually this is not just warning at all.. this warning can make my web doesnt work..
I think i miss some configuration for my PHP, actually i'm using easyPHP to ease my PHP configuration...
Thanks!
Actually, before this this same code i use with different computer and different OS, this stuff work... but when i set a new PHP setup(PHP,MySql, phpmyadmin) then this warning appear... Actually this is not just warning at all.. this warning can make my web doesnt work..
I think i miss some configuration for my PHP, actually i'm using easyPHP to ease my PHP configuration...
Thanks!
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
crypdude wrote:what variable $foo can do? What $foo really is? Thanks!
sourcefoobar: n.
[very common] Another widely used metasyntactic variable; see foo for etymology. Probably originally propagated through DECsystem manuals by Digital Equipment Corporation (DEC) in 1960s and early 1970s; confirmed sightings there go back to 1972. Hackers do not generally use this to mean FUBAR in either the slang or jargon sense. See also Fred Foobar. In RFC1639, “FOOBAR” was made an abbreviation for “FTP Operation Over Big Address Records”, but this was an obvious backronym. It has been plausibly suggested that “foobar” spread among early computer engineers partly because of FUBAR and partly because “foo bar” parses in electronics techspeak as an inverted foo signal; if a digital signal is active low (so a negative or zero-voltage condition represents a "1") then a horizontal bar is commonly placed over the signal label.
So how?crypdude wrote: Actually, before this this same code i use with different computer and different OS, this stuff work... but when i set a new PHP setup(PHP,MySql, phpmyadmin) then this warning appear... Actually this is not just warning at all.. this warning can make my web doesnt work..
I think i miss some configuration for my PHP, actually i'm using easyPHP to ease my PHP configuration...