WampServer How To Fix PHP Error Notice: Undefined variable: index
How To Fix PHP Error Notice: Undefined variable: index
Today i have face this problem as listing below, and i have search a lot and try to fix my wamp server setting and waste my few professional hours. Im writing this so any other developer or designer not waste.
this was the errors:
Notice: Undefined variable: q in in home.php on line 8
Notice: Undefined variable: module in home.php on line 11
you need to do some minor change on your php.ini file. please follow these steps
open your php.ini from wamp server and search “error_reporting = E_ALL & ~E_NOTICE“
if that module not active, please active it.
and close (replace)Â
error_reporting = E_ALL
to
;error_reporting = E_ALL
if any place.
——–Â 2nd step ——Â
if you wont found this. only found
error_reporting = E_ALL
so replace that to
error_reporting = E_ALL & ~E_NOTICE
once you done please restarts your Apache server or “wamp” then go back to the page where you were getting this error and refresh the web page and you should not see this error anymore.
Warning: .htaccess/php.ini file can stop working your site if you use wrong code, USE ONLY AT YOUR OWN RISK!









November 5th, 2009 at 9:15 am
if we disable this option error_reporting are we wont see any error massage from the php so its hard to find where is the error so what to do for that