Page 1 of 1

TIP - Site works on server but in XAMPP- undefined variable

PostPosted: 18. May 2012 20:03
by Malkom
Hello

This tip might help when your php scripts with include files work on your server but give variable undefined errors inside XAMPP.

I'm using XAMPP v 1.7.7 and in the php.ini file changed the error reporting from:-

error_reporting = E_ALL | E_STRICT

to

error_reporting = E_ALL & ~E_NOTICE

I know very little about all this but it solved my problem and now my scripts work the same inside XAMPP as they do on my Linux hosted server.

Malkom

Re: TIP - Site works on server but in XAMPP- undefined varia

PostPosted: 18. May 2012 20:32
by Altrea
Hi Malkom,

Malkom wrote:but it solved my problem

If your problem was to see everything which is going wrong with your scripts, yes you have solved that.

The much better solution (for self written scripts) would be not to tell XAMPP to shut up, but to solve the notice and strict messages.
This is not that difficult for "undefined variable" and "undefined index" messages.

best wishes,
Altrea