Click to See Complete Forum and Search --> : Undefined variable errors after install of php on local machine


skdzines
12-17-2005, 08:26 PM
Hello All,

I have recently installed Apache2, MySQL, PHP, phpMyAdmin and Zend Optimizer on my local machine. I am trying to mimic the configuration of my Web Hosts set up. I have copied all of my files of a working web site to run on my newly configured server and I now get a bunch of undefined variable errors. Like I said, this whole site works exactly the way it should on my Hosts server. One of the errors I am receiving is this:

Notice: Undefined variable: form in C:\Server\Apache2\htdocs\ryanandryan\admin\editPhotos.php on line 12

The variable: form is set once the submit button is clicked by a hidden field.

Is there something I need to change in the php.ini file or httpd.conf file in order for it to not get these errors?

Thanks in advance

jazz_snob
12-18-2005, 03:46 AM
Look at your php.ini. Its probably well commented?

mine:
error_reporting = E_ALL & ~E_NOTICE

Which i think is not correct because E_NOTICE shows up anyway. :confused:

I use error_reporting(E_ALL ^ E_NOTICE ) or call ini_set() in my scripts to control what happens, rather than rely on php.ini settings; that way my code should do what I want regards of server its on.

skdzines
12-18-2005, 02:00 PM
Thanks jazz snob. I apparently missed that part when comparing the two .ini files. My host uses error_reporting = E_COMPILE_ERROR|E_CORE_ERROR so I used that and all works. Thanks for your help.