JakubJ Posted January 23, 2008 Share Posted January 23, 2008 Here is my php.ini file section were loggin errors: error_reporting = E_ALL display_errors = On display_startup_errors = On log_errors = "E:\PHP\LOG\phplog.txt" log_errors = On ignore_repeated_errors = on ignore_repeated_source = Off report_memleaks = On track_errors = Off error_log = "E:/PHP/LOG/phplog.txt" error_log = error_log; I've changed the location of where the log directory is twice and still doesn't work. I know i have errors cause they display on my website but they dont get logged in the phplog.txt file. Any help would be great, i've been trying to figure this out for a while now. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/ Share on other sites More sharing options...
fanfavorite Posted January 23, 2008 Share Posted January 23, 2008 This could be a stupid question, but why do you have error_log twice, once with error_log and the other time with a filename? Have you tried removing the second instance? Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447233 Share on other sites More sharing options...
JakubJ Posted January 23, 2008 Author Share Posted January 23, 2008 The second one is for NT. I took out the comments above each one but it says above the error_log = error_log; : "Log errors to syslog (Event Log on NT, not valid in windows 95). *To test i did disable the error_log = error_log and ran my mail script which threw an error and nothing logged. Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447244 Share on other sites More sharing options...
fanfavorite Posted January 23, 2008 Share Posted January 23, 2008 The only thing I can think of is that you may have the permission set incorrectly. Make sure you can write to that file. Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447338 Share on other sites More sharing options...
PFMaBiSmAd Posted January 23, 2008 Share Posted January 23, 2008 These two lines are incorrect, remove them - log_errors = "E:\PHP\LOG\phplog.txt" error_log = error_log; If you carefully re-read the information in the php.ini, the last one is supposed to be - error_log = syslog Having multiple lines of the same setting would have unpredictable results (the last one is probably used.) I'll assume that you are stopping and starting your web server to get any changes made to php.ini to take effect, that you have checked that the php.ini that you are changing is the one that php is using, and that you have looked what the actual settings are using a phpinfo(); statement... Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447345 Share on other sites More sharing options...
JakubJ Posted January 24, 2008 Author Share Posted January 24, 2008 what about if i disable the error_log = syslog and keep the one were i put the log into a txt file? That would in turn only have one error_log =. Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447784 Share on other sites More sharing options...
JakubJ Posted January 24, 2008 Author Share Posted January 24, 2008 problem solved. after figuring out what you were saying PFMaBiSmAd, i determined i was telling in my php.ini file to log my errors into two locations. After making it only log into one location errors finally appear in my log. Thanks everyone Quote Link to comment https://forums.phpfreaks.com/topic/87445-solved-cannot-log-error-into-error_log-locaton/#findComment-447791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.