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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby Malkom » 18. May 2012 20:03

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
Malkom
 
Posts: 1
Joined: 18. May 2012 19:51
Operating System: Windows XP pro

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

Postby Altrea » 18. May 2012 20:32

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 68 guests