xampp Notice: Undefined variable: gsLanguage

On my host the code works fine . .but on the xampp I get this error. Is there anything I need to enable on XAMPP?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
It sounds like you're missing the file that defines 'gsLanguage'.
MurfurFull Stack DeveloperCommented:
What platform are you running XAMPP on, what version of XAMPP are you running and what web application are you hosting i.e. the one that generates this error?
Ray PaseurCommented:
I'm going to guess a bit here and say this almost looks like a PHP Notice-level message.  See my example here:

<?php // demo/temp_starquest321.php
$x = $gsLanguage;

Open in new window

By way of explanation, the default configuration of PHP causes Notice-level messages to be suppressed.**  This allows you to use undefined variables as if they were equal to the generic "falsy" values of zero, NULL, FALSE, etc.  If you visualize the Notice-level messages (see line 2 of the code snippet), PHP will tell you when your script relies on an undefined variable.

You can see your error_reporting() level by running phpinfo().  You can turn off Notice messages with the error_reporting() setting shown below, however I would fire a programmer who did this.  The right answer is not to suppress messages, but to find and correct the underlying Notice, Warning and Error conditions!
error_reporting(E_ALL ^ E_NOTICE);

Open in new window

PHP error_reporting is also settable in php.ini.

** Default settings in current PHP: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Starquest321Author Commented:
You are all correct:

Official answer from support:

If you enable error_reporting(E_ALL), PHP will report everything, including notices.
$gsLanguage is a variable declared in config*.php, if your page does not include it and you use it without declaring yourself, you get the notice.

Where do I set the error reporting? Is it in the php.ini?
Ray PaseurCommented:
Where do I set the error reporting? Is it in the php.ini?
Please read the answer that was posted yesterday in this link:
The right answer is not to suppress messages, but to find and correct the underlying Notice, Warning and Error conditions!
Dave BaldwinFixer of ProblemsCommented:
On shared hosting where you do not have access to php.ini, you have to put the error reporting line error_reporting(E_ALL); at the top of every page that you need to check.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.