ID: 8314 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: PHP options/info functions Operating System: Win2k pro PHP Version: 4.0.3pl1 New Comment:
No, its not possible. All eventcreate does is register itself as the source. Try this: eventcreate /t error /id 100 /l application /so foobar /d "This is a message" and look here in the registry afterwards: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\foobar Previous Comments: ------------------------------------------------------------------------ [2003-10-07 12:10:44] rick_g22 at yahoo dot com OK I think i figured out something. WinNT / XP has this commandline tool, eventcreate.exe. I type from the command (DOS) prompt: eventcreate /t error /id 100 /l application /d "Testing..." And I get the similar error. No description for source, etc. etc. But if I type: eventcreate /t error /id 100 /l application /so myself /d "Testing..." this is what I get the right description, and the origin is listed as "msyelf". So probably in the WinNT/XP API there is a way to indicate the origin with a string without the need to register it... in our case, the origin should be "PHP". Perhaps the origin could change between "PHP CLI", "PHP CGI" o "PHP SAPI". I'm currently trying to figure out if there is a COM object for the event log or something to implement a workaround. ------------------------------------------------------------------------ [2003-10-07 11:57:16] [EMAIL PROTECTED] This happens when there is no message catalog associated with the event source in the registry. The solution is to add an appropriate message catalog to the win32 project, and enter the details into the registry when PHP is installed. However, this won't solve the case where the syslog is opened with alternative message sources (such as c-client), since each message source would need to be registered also. ------------------------------------------------------------------------ [2003-10-07 11:38:20] rick_g22 at yahoo dot com I get this error on WinXP SP2, using PHP 4.3.3 and Apache 2.0.47. It's not bogus, certainly. ------------------------------------------------------------------------ [2003-07-23 14:10:40] joshspam at seekersedge dot com Using "PHP 4.3.1 (cgi-fcgi), Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies" I get the same message in windows XP when I use the syslog function. The following message appears when I use the following command. syslog(LOG_ERR, "Could not select database"); Event Type: Warning Event Source: c-client Event Category: (4) Event ID: 2000 Date: 7/23/2003 Time: 2:57:26 PM User: N/A Computer: Nothing Description: The description for Event ID ( 2000 ) in Source ( c-client ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: c-client[3684], Could not select database. ------------------------------------------------------------------------ [2003-03-26 18:57:20] skissane at ics dot mq dot edu dot au I forgot to add I haven't set my php.ini error_log to syslog; but I am getting this problem when using the syslog function, e.g. syslog(LOG_DEBUG,"Blah blah blah"); ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/8314 -- Edit this bug report at http://bugs.php.net/?id=8314&edit=1