PDA

View Full Version : Undefined variables everywhere!


eger
07-14-2002, 07:55 PM
This doesn't pertain to a certain hack. But I was wondering if anyone knows why I recieve many "Undefined variables" errors when running small php scripts such as a shoutbox.

Is this a compatability problem between linux and windows? I run php 4.2.1 on a windows box.

I recently downloaded the clan server hack from here. It isn't really a vbulletin hack. But it looked cool. I downloaded it and set it up and all I got were mass "Undefined Variables".

Odd...

Admin
07-15-2002, 05:59 AM
If it's your own server, open php.ini, look for a line that starts with error_reporting, and replace that whole line with:
error_reporting = E_ALL & ~E_NOTICE
And then restart the Web server.

If it's not your server, ask your host to do what I said above.

eger
07-15-2002, 05:36 PM
Thanks! I found 3 examples. I uncommented the one you posted (which was already there) and those pesky notices disappeared.

I guess they show when the script doesnt work 100% correct. But in this case I only need about 50% of the script =)

Admin
07-16-2002, 06:30 AM
Those notices are about undefined variables, and usually you don't really need them. Unless you are writing a very important script and you want it to be 100% secure (keeping track of variables is always a good thing).

Just so you know, you can also set the error_reporting level from within your PHP file, using the error_reporting() function.