2016-01-29 40 views
0

我在運行Windows Server 2012的IIS 8服務器上託管了PHP網站。我安裝了PHP 5.3.28。我想在事件查看器中記錄信息消息。我曾嘗試下面的代碼:在IIS上記錄PHP信息日誌時在事件查看器中的日誌描述

openlog('php', LOG_CONS | LOG_NDELAY | LOG_PID, LOG_USER | LOG_PERROR); 
syslog(LOG_INFO, 'This is a message'); 
closelog(); 

我打開使用error_reportingphp.ini中並設置的error_log =系統日誌

以下是在事件查看器中輸入:

The description for Event ID 2 from source PHP-5.3.28 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. 

If the event originated on another computer, the display information had to be saved with the event. 

The following information was included with the event: 

php[10052] 
This is a message 

我覺得在php.ini中需要一些配置,但我無法確定它會是什麼,以便我可以p提供該日誌消息的通用描述。

+0

喜Gaurav,你解決了你的問題嗎? –

回答

0

您可以從G下載從here 變化PHP - 99年3月5日-dev的reg文件到您的版本,例如PHP-5.7.0 變化EventMessageFile值:\測試\ srctrunkinstall \ php7ts.dll到