9:08 AM
0
Many times I have facee this problem as listing below, and I have search a lot and try to fix my wampserver 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: REMOTE_ADDR
Notice: Notice: Undefined variable: REMOTE_ADDR in C:\wamp\www\cms\index.php on line 3
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.

NOTE: This is just for those who wants to save their time to fix entire coding again to define variables. Otherwise i recommend must define variable before use them to avoid this error.
Warning: .htaccess/php.ini file can stop working your site if you use wrong code, USE ONLY AT YOUR OWN RISK!

0 comments:

Post a Comment