LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   logging (http://www.litespeedtech.com/support/forum/showthread.php?t=6382)

bobykus 11-20-2012 08:02 AM

logging
 
Server Log
File Name /path/to/error.log
Log Level ERROR
Debug LeveNONE
Rolling Size (bytes) 10M
Enable stderr Log No


and error.log full of

2012-11-20 17:00:20.900 [STDERR] LSAPI: SUEXEC_UGID set UID: 248238, GID: 248238
2012-11-20 17:00:21.475 [STDERR] LSAPI: SUEXEC_UGID set UID: 251552, GID: 251552
2012-11-20 17:00:21.489 [STDERR] LSAPI: SUEXEC_UGID set UID: 248158, GID: 248158



and most annoying

2012-11-20 16:58:16.938 [STDERR] PHP Warning: feof() expects parameter 1 to be resource, boolean given in loadData.php on line 6
2012-11-20 16:58:16.938 [STDERR] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in loadData.php on line 7
...

Why?

webizen 11-20-2012 10:20 AM

Quote:

Originally Posted by bobykus (Post 36040)
...
and most annoying

2012-11-20 16:58:16.938 [STDERR] PHP Warning: feof() expects parameter 1 to be resource, boolean given in loadData.php on line 6
2012-11-20 16:58:16.938 [STDERR] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in loadData.php on line 7
...

Why?

You should check the code to find out. likely they use a file handle that failed.

bobykus 11-20-2012 11:23 PM

Yes, Cap :)
But why it producing an output to error log? it is set to output errors only, it is set no to "Enable stderr Log". This is "PHP Warning" as you see, and why id comes from STDERR? How to suppress it? I can not fix every single customers script, and the way it is now allows them to fill filesystem in a 5 minutes!
" If disabled, all stderr output will be discarded. " !

webizen 11-21-2012 11:05 AM

Some STDERR output was handled by LSAPI's STDERR stream, some written to file handle 2 (stderr). stderr log is for the later case. However, LSAPI STDERR stream is always written to error log. The warning from PHP is handled by LSAPI STDERR not stderr file handle. Hence what you see.

To suppress PHP Warning, you should change php.ini. So no warning from PHP gets sent to LSAPI STDERR.

bobykus 11-22-2012 06:21 AM

Got it - thank you!


All times are GMT -7. The time now is 12:23 PM.