mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
f34db7fc2a
ext/win32std is unmaintained for years, so it is highly unlikely that it is available. We therefore use regedit instead to register the event source. We also remove the bundled syslog.reg, since it is of no use, unless generated for the respective installation.
21 lines
402 B
PHP
Executable File
21 lines
402 B
PHP
Executable File
<?php
|
|
|
|
/* This script generates the .reg file to set up an event source for use by the php syslog() function. */
|
|
|
|
$PATH = "SYSTEM\\CurrentControlSet\\Services\\Eventlog\\Application\\PHP-" . phpversion();
|
|
|
|
$dll = $argv[1];
|
|
$dll = addslashes($dll);
|
|
|
|
file_put_contents("win32/syslog.reg", <<<REG
|
|
REGEDIT4
|
|
|
|
[HKEY_LOCAL_MACHINE\\$PATH]
|
|
"TypesSupported"=dword:00000007
|
|
"EventMessageFile"="$dll"
|
|
|
|
REG
|
|
);
|
|
|
|
?>
|