/usr/share/php/tests/Config/test/bug10185.phpt is in php-config 1.10.12-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | --TEST--
regression test for bug #10185
--FILE--
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
$conf = 'LogFormat "%h %l %u %t \"%r\" %>s %b" common'.PHP_EOL;
$conf .= '<Directory "/foo/bar">'.PHP_EOL;
$conf .= ' CustomLog "/foo/bar/access.log" common'.PHP_EOL;
$conf .= '</Directory>'.PHP_EOL;
$conf .= '<Directory "\foo\bar\">'.PHP_EOL;
$conf .= ' CustomLog "\foo\bar\access.log" common'.PHP_EOL;
$conf .= '</Directory>'.PHP_EOL;
$conf .= '<Directory "\\\foo\\\bar">'.PHP_EOL;
$conf .= ' CustomLog "\\\foo\\\bar\\\access.log" common'.PHP_EOL;
$conf .= '</Directory>'.PHP_EOL;
file_put_contents('bug10185.httpd.conf.old', $conf);
$conf1 = new Config;
$root1 =& $conf1->parseConfig('bug10185.httpd.conf.old', 'apache');
$conf1->writeConfig('bug10185.httpd.conf.new.php', 'phparray',
array('name' => 'test'));
$conf2 = new Config;
$root2 =& $conf2->parseConfig('bug10185.httpd.conf.new.php', 'phparray',
array('name' => 'test'));
$conf2->writeConfig('bug10185.httpd.conf.new', 'apache');
readfile('bug10185.httpd.conf.new');
?>
--CLEAN--
<?php
unlink('bug10185.httpd.conf.new.php');
unlink('bug10185.httpd.conf.new');
unlink('bug10185.httpd.conf.old');
?>
--EXPECT--
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<Directory "/foo/bar">
CustomLog "/foo/bar/access.log" common
</Directory>
<Directory "\foo\bar\">
CustomLog "\foo\bar\access.log" common
</Directory>
<Directory "\\foo\\bar">
CustomLog "\\foo\\bar\\access.log" common
</Directory>
|