News:

LVCS.NET offers low cost domain registration services.

Main Menu

PHP errors appearing out of nowhere?

Started by mackass, October 22, 2005, 03:26:19 AM

Previous topic - Next topic

mackass

I have errors appearing all over my site. I've not made any changes to my coding, they've been untouched for a couple of months and as of today, these errors appear:

Notice: Undefined variable: fieldname in /home/httpd/vhosts/mydomain.com/httpdocs/site.php on line 447
Notice: Undefined variable: fieldemail in /home/httpd/vhosts/mydomain.com/httpdocs/site.php on line 450
Notice: Undefined variable: fieldmessage in /home/httpd/vhosts/mydomain.com/httpdocs/site.php on line 455
Notice: Undefined variable: step in /home/httpd/vhosts/mydomain.com/httpdocs/site.php on line 471

Does anyone know why they've suddenly appeared? Or is it something to do with the servers at the moment?

brainiac744

Notice errors are basically there to show you all the imperfections in your coding, but they don't actually stop the script from working. I assume you put in that line of code gordon gave for the .htaccess file, which seems to show all errors, including E_NOTICE. You can manually set the error level in your PHP files with error_reporting(), the one that you want would probably be error_reporting(E_ALL ^ E_NOTICE); (it reports all errors except e_notice) just put this at the top of the php file that's giving you trouble.  :)

webzone (archived)

or you could simply create a .htaccess file in /httpdocs and add this line to its content

php_value error_reporting 2039

mackass


ghost

lol, I got those too. ALOT of them.. probably 30-40 per page.. but I noticed they didn't stop the pages from working so I just took the .htaccess thing off my site because I had already fixed the problem with my other script :P
- Ghost -

admin

These "Notices" occur because you have told PHP to show "All Errors".  (All Errors includes notices)

Thank you,
FreePgs.com Admin