ID: 8314 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Assigned Bug Type: PHP options/info functions Operating System: Win2k pro -PHP Version: 4CVS, 5CVS +PHP Version: 5CVS Assigned To: wez New Comment:
Won't fix for PHP 4, but will fix for PHP 5. Previous Comments: ------------------------------------------------------------------------ [2003-10-07 18:57:52] [EMAIL PROTECTED] Assuming Wez wants to do something about this.. ------------------------------------------------------------------------ [2003-10-07 12:36:05] [EMAIL PROTECTED] The problems with allowing PHP to register arbitrary event sources are: 1. PHP might not have permissions to write to that part of the registry, so it might not even be able to do it. 2. If it does, it could overwrite system defined message sources -> big problem for shared hosters. IMO, it is better to register a single PHP event source at installation time, and adapt the syslog code to log messages using PHP as the source and output the user-defined source in the log message itself. ------------------------------------------------------------------------ [2003-10-07 12:27:52] rick_g22 at yahoo dot com I see. In any case, I think it'll be easy to register PHP as the source for PHP-error logs, right? Thanks! (This is my last comment) ------------------------------------------------------------------------ [2003-10-07 12:18:08] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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