php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20180 can only read 4096 bytes of stdout from proc_open
Submitted: 2002-10-30 22:10 UTC Modified: 2002-10-31 23:44 UTC
From: kims at contrail dot com dot au Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4CVS-2002-10-30 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kims at contrail dot com dot au
New email:
PHP Version: OS:

 

 [2002-10-30 22:10 UTC] kims at contrail dot com dot au
When using proc_open() with a set of pipes to read the output of a process, only the first 4096 bytes of the pipe are read when using PHP under Apache.

When running the same script using php-cgi on the command line, the complete output is returned.

Hence, this seems to be an PHP/Apache problem, although admittedly it could be a proc_open() or fread() problem, or an apache2 problem.

I'm using the latest apache2 debs from Debian unstable on ppc.

Here is a script that reproduces the problem for me. It creates a tempfile, writes more than 4096 bytes of data to it, then tries to read it all back via a pipe from /bin/cat (run with proc_open).

<?
	header('Content-type: text/plain');

	$path = "/tmp/foo";

	# data to write to temporary file
	$data = "foo";

	# beef up the size of data so it's > 4096 bytes
	for ($i = 0; $i < 16; $i++)
		$data .= $data;

	# write the data to the file
	$fh = fopen($path, "w");
	fwrite($fh, $data);
	fclose($fh);

	# set up a process using proc_open to cat the file to stdout
	$proc = proc_open(
		'cat /tmp/foo',
		array(
			0 => array("pipe", "r"),
			1 => array("pipe", "w"),
			2 => array("pipe", "w")
		),
		$pipes
	);


	# read data from cat's stdout into $out
	while (!feof($pipes[1]))
		$out .= fread($pipes[1], 1024);

	# number of bytes read successfully
	echo "read: " . strlen($out) . " bytes.\n";

	# check if this represents the whole file
	if (strlen($out) != strlen($data))
		echo "didn't read all " . strlen($data) . " bytes of file.\n";
	
	# close pipes from proc_open
	fclose($pipes[0]);
	fclose($pipes[1]);
	fclose($pipes[2]);

	# close process
	proc_close($proc);

	# delete temp file
	unlink($path);
?>

output from php-cgi:

Status: 200
X-Powered-By: PHP/4.3.0-dev
Content-type: text/plain

read: 196608 bytes.

output when run via apache:

read: 4096 bytes.
didn't read all 196608 bytes of file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-31 08:33 UTC] wez@php.net
Could you strace your test script under apache?
(run http with the -X option to prevent it forking).
Also, it would be helpful if you could try it with apache 1
and compare results.

 [2002-10-31 14:43 UTC] kims at contrail dot com dot au
Certainly.

I used a "strace -ff apache2 -X" so as to get traces of both apache and the child cat process. Unfortunately, I don't have an apache 1 that I can test this on.

What I can tell you, though, is that this did work using CVS php on apache2 up until very recently. I'm using this in an application, and it worked fine until my last build of the latest CVS (which was to fix another bug altogether). Prior to this, I was using a build of the source that was perhaps a month old, and that seemed to work fine. I guess it's *possible* that it's something unrelated, but it seems likely that this must be something that's changed in PHP during the past few weeks/months.

Here's apache's trace (the SIGINT is just my ctrl-c):

execve("/usr/sbin/apache2", ["apache2", "-X"], [/* 16 vars */]) = 0
uname({sys="Linux", node="gadogado", ...}) = 0
brk(0)                                  = 0x1009e7b8
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(0x3, 0x7fffefa0)                = -1 ENOSYS (Function not implemented)
fstat(3, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30016000
close(3)                                = 0
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\33"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=62028, ...}) = 0
mmap(0xffd0000, 127244, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xffd0000
mprotect(0xffdd000, 73996, PROT_NONE)   = 0
mmap(0xffe0000, 61440, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xffe0000
mmap(0xffef000, 268, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffef000
close(3)                                = 0
open("/usr/lib/libssl.so.0.9.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\275"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=203664, ...}) = 0
mmap(0xff7d000, 271904, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff7d000
mprotect(0xffa8000, 95776, PROT_NONE)   = 0
mmap(0xffad000, 73728, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0xffad000
mmap(0xffbf000, 1568, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffbf000
close(3)                                = 0
open("/usr/lib/libcrypto.so.0.9.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\3(\370"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=941304, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30019000
mmap(0xfe74000, 1019476, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfe74000
mprotect(0xff3d000, 196180, PROT_NONE)  = 0
mmap(0xff44000, 155648, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xc0000) = 0xff44000
mmap(0xff6a000, 11860, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff6a000
close(3)                                = 0
open("/usr/lib/libaprutil.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0V\340"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=135100, ...}) = 0
mmap(0xfe32000, 201992, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfe32000
mprotect(0xfe52000, 70920, PROT_NONE)   = 0
mmap(0xfe52000, 69632, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xfe52000
mmap(0xfe63000, 1288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfe63000
close(3)                                = 0
open("/usr/lib/libgdbm.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\26"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=25392, ...}) = 0
mmap(0xfe0c000, 88616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfe0c000
mprotect(0xfe12000, 64040, PROT_NONE)   = 0
mmap(0xfe1c000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfe1c000
close(3)                                = 0
open("/usr/lib/libxmlparse.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\24"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=32968, ...}) = 0
mmap(0xfde4000, 97856, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfde4000
mprotect(0xfdec000, 65088, PROT_NONE)   = 0
mmap(0xfdf4000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfdf4000
close(3)                                = 0
open("/usr/lib/libxmltok.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\000"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=95148, ...}) = 0
mmap(0xfdac000, 159748, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfdac000
mprotect(0xfdbe000, 86020, PROT_NONE)   = 0
mmap(0xfdcc000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xfdcc000
mmap(0xfdd3000, 4, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfdd3000
close(3)                                = 0
open("/usr/lib/libapr.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0y\200"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=199884, ...}) = 0
mmap(0xfd5a000, 267792, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfd5a000
mprotect(0xfd8a000, 71184, PROT_NONE)   = 0
mmap(0xfd8a000, 69632, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0xfd8a000
mmap(0xfd9b000, 1552, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfd9b000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\242"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=480220, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3001a000
mmap(0xfcc4000, 544924, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfcc4000
mprotect(0xfd37000, 73884, PROT_NONE)   = 0
mmap(0xfd44000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x70000) = 0xfd44000
mmap(0xfd49000, 156, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfd49000
close(3)                                = 0
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\v"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=21052, ...}) = 0
mmap(0xfc78000, 245400, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfc78000
mprotect(0xfc7d000, 224920, PROT_NONE)  = 0
mmap(0xfc88000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfc88000
mmap(0xfc8d000, 159384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfc8d000
close(3)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0A\260"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=78372, ...}) = 0
mmap(0xfc42000, 152764, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfc42000
mprotect(0xfc55000, 74940, PROT_NONE)   = 0
mmap(0xfc62000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xfc62000
mmap(0xfc65000, 9404, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfc65000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\34"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=10096, ...}) = 0
mmap(0xfc1f000, 74696, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfc1f000
mprotect(0xfc22000, 62408, PROT_NONE)   = 0
mmap(0xfc2f000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfc2f000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0C$"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=96042, ...}) = 0
mmap(0xfbad000, 401136, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfbad000
mprotect(0xfbbc000, 339696, PROT_NONE)  = 0
mmap(0xfbbd000, 73728, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfbbd000
mmap(0xfbcf000, 261872, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfbcf000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\317"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0755, st_size=1273464, ...}) = 0
mmap(0xfa53000, 1349584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfa53000
mprotect(0xfb82000, 108496, PROT_NONE)  = 0
mmap(0xfb83000, 90112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x120000) = 0xfb83000
mmap(0xfb99000, 14288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfb99000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3001b000
mprotect(0xfa53000, 1241088, PROT_READ|PROT_WRITE) = 0
mprotect(0xfa53000, 1241088, PROT_READ|PROT_EXEC) = 0
munmap(0x30016000, 12080)               = 0
SYS_190(0x3, 0x7ffff9b8, 0x7ffffde0, 0x7ffffde0, 0x300262e0, 0x30000000, 0xfbce794, 0xfbcbca0, 0x7ffff970, 0x53933535, 0x100404d0, 0x10040000, 0x10040000, 0x100d3098, 0, 0, 0, 0x100cb008, 0x100cb088, 0x100cabe8, 0xfbce8f0, 0xfbce8f8, 0x7ffffae8, 0x7ffff9dc, 0x3, 0xfb9c444, 0x7ffff9b8, 0xfb95eb8, 0xfbce950, 0xfb2a248, 0xf932, 0x3) = -1 ENOSYS (Function not implemented)
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=2147483647}) = 0
getpid()                                = 264
rt_sigaction(SIGRT_0, {0xfbb5ea4, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xfbb5f54, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0xfbb609c, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [32], NULL, 8) = 0
_sysctl(0x7ffff968, 0, 0x10, 0x7ffff980, 0) = 0
brk(0)                                  = 0x1009e7b8
brk(0x1009f7b8)                         = 0x1009f7b8
brk(0x100a0000)                         = 0x100a0000
brk(0x100a1000)                         = 0x100a1000
brk(0x100a3000)                         = 0x100a3000
brk(0x100a5000)                         = 0x100a5000
brk(0x100a7000)                         = 0x100a7000
brk(0x100a9000)                         = 0x100a9000
brk(0x100ab000)                         = 0x100ab000
brk(0x100ad000)                         = 0x100ad000
brk(0x100af000)                         = 0x100af000
brk(0x100b1000)                         = 0x100b1000
brk(0x100b3000)                         = 0x100b3000
brk(0x100b5000)                         = 0x100b5000
brk(0x100b7000)                         = 0x100b7000
brk(0x100b9000)                         = 0x100b9000
brk(0x100bb000)                         = 0x100bb000
brk(0x100bd000)                         = 0x100bd000
brk(0x100bf000)                         = 0x100bf000
brk(0x100c1000)                         = 0x100c1000
brk(0x100c3000)                         = 0x100c3000
brk(0x100c5000)                         = 0x100c5000
brk(0x100c7000)                         = 0x100c7000
brk(0x100c9000)                         = 0x100c9000
brk(0x100cb000)                         = 0x100cb000
brk(0x100cd000)                         = 0x100cd000
brk(0x100cf000)                         = 0x100cf000
brk(0x100d1000)                         = 0x100d1000
brk(0x100d3000)                         = 0x100d3000
brk(0x100d5000)                         = 0x100d5000
brk(0x100d7000)                         = 0x100d7000
brk(0x100d9000)                         = 0x100d9000
brk(0x100db000)                         = 0x100db000
brk(0x100dd000)                         = 0x100dd000
brk(0x100df000)                         = 0x100df000
brk(0x100e1000)                         = 0x100e1000
brk(0x100e3000)                         = 0x100e3000
lstat("/etc/apache2/apache2.conf", {st_mode=S_IFREG|0644, st_size=12390, ...}) = 0
brk(0x100e5000)                         = 0x100e5000
open("/etc/apache2/apache2.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=12390, ...}) = 0
read(3, "# Based upon the NCSA server con"..., 4096) = 4096
stat("/etc/apache2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(3, " *\n\n# Global error log.\nErrorLog"..., 4096) = 4096
lstat("/etc/apache2/mods-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open("/etc/apache2/mods-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat64(0x4, 0x7fffd6e8)                = -1 ENOSYS (Function not implemented)
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = -1 ENOSYS (Function not implemented)
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
brk(0x100e6000)                         = 0x100e6000
getdents64(0x4, 0x100e4998, 0x1000)     = -1 ENOSYS (Function not implemented)
getdents(4, /* 4 entries */, 3933)      = 68
getdents(4, /* 0 entries */, 3933)      = 0
close(4)                                = 0
lstat("/etc/apache2/mods-enabled/php4.load", {st_mode=S_IFLNK|0777, st_size=27, ...}) = 0
brk(0x100e7000)                         = 0x100e7000
open("/etc/apache2/mods-enabled/php4.load", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
read(4, "LoadModule php4_module /usr/lib/"..., 4096) = 59
open("/usr/lib/apache2/modules/libphp4.so", O_RDONLY) = 5
read(5, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\5\22"..., 1024) = 1024
fstat(5, {st_mode=S_IFREG|0755, st_size=4770495, ...}) = 0
mmap(0xf823000, 2224712, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xf823000
mprotect(0xf9c0000, 533064, PROT_NONE)  = 0
mmap(0xf9c3000, 503808, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 5, 0x190000) = 0xf9c3000
mmap(0xfa3e000, 16968, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfa3e000
close(5)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 5, 0) = 0x30016000
close(5)                                = 0
open("/lib/libresolv.so.2", O_RDONLY)   = 5
read(5, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0.\270"..., 1024) = 1024
fstat(5, {st_mode=S_IFREG|0644, st_size=63308, ...}) = 0
mmap(0xf7f1000, 138400, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0xf7f1000
mprotect(0xf800000, 76960, PROT_NONE)   = 0
mmap(0xf801000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 5, 0) = 0xf801000
mmap(0xf811000, 7328, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf811000
close(5)                                = 0
brk(0x100e8000)                         = 0x100e8000
munmap(0x30016000, 12080)               = 0
read(4, "", 4096)                       = 0
close(4)                                = 0
lstat("/etc/apache2/mods-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/mods-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
brk(0x100e9000)                         = 0x100e9000
getdents(4, /* 4 entries */, 3933)      = 68
getdents(4, /* 0 entries */, 3933)      = 0
close(4)                                = 0
lstat("/etc/apache2/mods-enabled/php4.conf", {st_mode=S_IFLNK|0777, st_size=27, ...}) = 0
brk(0x100ea000)                         = 0x100ea000
open("/etc/apache2/mods-enabled/php4.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=37, ...}) = 0
read(4, "AddType application/x-httpd-php "..., 4096) = 37
read(4, "", 4096)                       = 0
close(4)                                = 0
lstat("/etc/apache2/sites-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/sites-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
brk(0x100eb000)                         = 0x100eb000
getdents(4, /* 3 entries */, 3933)      = 48
getdents(4, /* 0 entries */, 3933)      = 0
close(4)                                = 0
lstat("/etc/apache2/sites-enabled/default", {st_mode=S_IFLNK|0777, st_size=36, ...}) = 0
brk(0x100ec000)                         = 0x100ec000
open("/etc/apache2/sites-enabled/default", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1086, ...}) = 0
read(4, "<VirtualHost *>\n\tServerAdmin web"..., 4096) = 1086
read(4, "", 4096)                       = 0
close(4)                                = 0
lstat("/etc/apache2/httpd.conf", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
brk(0x100ee000)                         = 0x100ee000
open("/etc/apache2/httpd.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(4, "", 4096)                       = 0
close(4)                                = 0
lstat("/etc/apache2/ports.conf", {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
brk(0x100f0000)                         = 0x100f0000
open("/etc/apache2/ports.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
read(4, "Listen 80\n", 4096)            = 10
read(4, "", 4096)                       = 0
close(4)                                = 0
lstat("/etc/apache2/conf.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/conf.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
brk(0x100f1000)                         = 0x100f1000
getdents(4, /* 3 entries */, 3933)      = 52
getdents(4, /* 0 entries */, 3933)      = 0
close(4)                                = 0
lstat("/etc/apache2/conf.d/scoreboard", {st_mode=S_IFREG|0644, st_size=85, ...}) = 0
brk(0x100f2000)                         = 0x100f2000
open("/etc/apache2/conf.d/scoreboard", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=85, ...}) = 0
read(4, "#This is required for 2.2 kernel"..., 4096) = 85
read(4, "", 4096)                       = 0
close(4)                                = 0
read(3, "\nAddIcon /icons/layout.gif .html"..., 4096) = 4096
brk(0x100f4000)                         = 0x100f4000
read(3, "er server-info\n#    Order deny,a"..., 4096) = 102
read(3, "", 4096)                       = 0
close(3)                                = 0
stat("/usr/lib/apache2/suexec2", {st_mode=S_IFREG|S_ISUID|0755, st_size=10820, ...}) = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x30016000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30016000
close(3)                                = 0
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\30"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=46220, ...}) = 0
mmap(0xf7c5000, 111216, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xf7c5000
mprotect(0xf7d0000, 66160, PROT_NONE)   = 0
mmap(0xf7d5000, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xf7d5000
mmap(0xf7e0000, 624, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7e0000
close(3)                                = 0
munmap(0x30016000, 12080)               = 0
uname({sys="Linux", node="gadogado", ...}) = 0
open("/etc/passwd", O_RDONLY)           = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=933, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x3, 0, 0, 0x7ffff8e8, 0x1)     = 0
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 933
close(3)                                = 0
munmap(0x30016000, 4096)                = 0
brk(0x100f5000)                         = 0x100f5000
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)
close(3)                                = 0
open("/etc/group", O_RDONLY)            = 3
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=453, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x3, 0, 0, 0x7ffff928, 0x1)     = 0
read(3, "root:x:0:\ndaemon:x:1:\nbin:x:2:\ns"..., 4096) = 453
close(3)                                = 0
munmap(0x30016000, 4096)                = 0
gettimeofday({1036095951, 256818}, NULL) = 0
getpid()                                = 264
open("/etc/resolv.conf", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=71, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(3, "search techniche.co.nz\nnameserve"..., 4096) = 71
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x30016000, 4096)                = 0
brk(0x100f7000)                         = 0x100f7000
stat("/var/www/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
brk(0x100f9000)                         = 0x100f9000
socket(PF_INET6, SOCK_STREAM, 0)        = 1
socket(PF_INET6, SOCK_STREAM, 0)        = 1
socket(PF_INET6, SOCK_STREAM, 0)        = -1 EAFNOSUPPORT (Address family not supported by protocol)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
brk(0x100fb000)                         = 0x100fb000
brk(0x100fd000)                         = 0x100fd000
brk(0x100ff000)                         = 0x100ff000
brk(0x10101000)                         = 0x10101000
brk(0x10103000)                         = 0x10103000
brk(0x10105000)                         = 0x10105000
brk(0x10107000)                         = 0x10107000
brk(0x10109000)                         = 0x10109000
brk(0x1010b000)                         = 0x1010b000
brk(0x1010d000)                         = 0x1010d000
brk(0x1010f000)                         = 0x1010f000
brk(0x10111000)                         = 0x10111000
brk(0x10113000)                         = 0x10113000
brk(0x10115000)                         = 0x10115000
brk(0x10117000)                         = 0x10117000
brk(0x10119000)                         = 0x10119000
brk(0x1011b000)                         = 0x1011b000
brk(0x1011d000)                         = 0x1011d000
brk(0x1011f000)                         = 0x1011f000
brk(0x10121000)                         = 0x10121000
brk(0x10123000)                         = 0x10123000
brk(0x10125000)                         = 0x10125000
brk(0x10127000)                         = 0x10127000
brk(0x10129000)                         = 0x10129000
brk(0x1012b000)                         = 0x1012b000
brk(0x1012d000)                         = 0x1012d000
brk(0x1012f000)                         = 0x1012f000
brk(0x10131000)                         = 0x10131000
brk(0x10133000)                         = 0x10133000
open("/var/log/apache2/access.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
listen(3, 511)                          = 0
pipe([5, 6])                            = 0
fcntl(5, F_GETFL)                       = 0 (flags O_RDONLY)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
open("/var/log/apache2/error.log", O_RDWR|O_APPEND|O_CREAT, 0666) = 7
dup2(7, 2)                              = 2
open("/etc/mime.types", O_RDONLY)       = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=16442, ...}) = 0
read(8, "################################"..., 4096) = 4096
brk(0x10135000)                         = 0x10135000
read(8, "esupdate\napplication/vnd.enliven"..., 4096) = 4096
read(8, "application/vnd.stardivision.cal"..., 4096) = 4096
brk(0x10137000)                         = 0x10137000
brk(0x10139000)                         = 0x10139000
read(8, "/g.722.1\naudio/l16\naudio/midi\t\t\t"..., 4096) = 4096
brk(0x1013b000)                         = 0x1013b000
read(8, "erence/x-cooltalk\t\t\t\tice\n\nx-worl"..., 4096) = 58
read(8, "", 4096)                       = 0
close(8)                                = 0
close(6)                                = 0
close(5)                                = 0
munmap(0xf823000, 2224712)              = 0
munmap(0xf7f1000, 138400)               = 0
lstat("/etc/apache2/apache2.conf", {st_mode=S_IFREG|0644, st_size=12390, ...}) = 0
open("/etc/apache2/apache2.conf", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=12390, ...}) = 0
read(5, "# Based upon the NCSA server con"..., 4096) = 4096
stat("/etc/apache2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(5, " *\n\n# Global error log.\nErrorLog"..., 4096) = 4096
lstat("/etc/apache2/mods-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/mods-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
brk(0x1013c000)                         = 0x1013c000
getdents(6, /* 4 entries */, 3933)      = 68
getdents(6, /* 0 entries */, 3933)      = 0
close(6)                                = 0
lstat("/etc/apache2/mods-enabled/php4.load", {st_mode=S_IFLNK|0777, st_size=27, ...}) = 0
open("/etc/apache2/mods-enabled/php4.load", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0
read(6, "LoadModule php4_module /usr/lib/"..., 4096) = 59
open("/usr/lib/apache2/modules/libphp4.so", O_RDONLY) = 8
read(8, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\5\22"..., 1024) = 1024
fstat(8, {st_mode=S_IFREG|0755, st_size=4770495, ...}) = 0
mmap(0xf595000, 2224712, PROT_READ|PROT_EXEC, MAP_PRIVATE, 8, 0) = 0xf595000
mprotect(0xf732000, 533064, PROT_NONE)  = 0
mmap(0xf735000, 503808, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 8, 0x190000) = 0xf735000
mmap(0xf7b0000, 16968, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7b0000
close(8)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 8, 0) = 0x30016000
close(8)                                = 0
open("/lib/libresolv.so.2", O_RDONLY)   = 8
read(8, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0.\270"..., 1024) = 1024
fstat(8, {st_mode=S_IFREG|0644, st_size=63308, ...}) = 0
mmap(0xf563000, 138400, PROT_READ|PROT_EXEC, MAP_PRIVATE, 8, 0) = 0xf563000
mprotect(0xf572000, 76960, PROT_NONE)   = 0
mmap(0xf573000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 8, 0) = 0xf573000
mmap(0xf583000, 7328, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf583000
close(8)                                = 0
munmap(0x30016000, 12080)               = 0
read(6, "", 4096)                       = 0
close(6)                                = 0
lstat("/etc/apache2/mods-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/mods-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
getdents(6, /* 4 entries */, 3933)      = 68
getdents(6, /* 0 entries */, 3933)      = 0
close(6)                                = 0
lstat("/etc/apache2/mods-enabled/php4.conf", {st_mode=S_IFLNK|0777, st_size=27, ...}) = 0
open("/etc/apache2/mods-enabled/php4.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=37, ...}) = 0
read(6, "AddType application/x-httpd-php "..., 4096) = 37
read(6, "", 4096)                       = 0
close(6)                                = 0
lstat("/etc/apache2/sites-enabled", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/sites-enabled", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
getdents(6, /* 3 entries */, 3933)      = 48
getdents(6, /* 0 entries */, 3933)      = 0
close(6)                                = 0
lstat("/etc/apache2/sites-enabled/default", {st_mode=S_IFLNK|0777, st_size=36, ...}) = 0
open("/etc/apache2/sites-enabled/default", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=1086, ...}) = 0
read(6, "<VirtualHost *>\n\tServerAdmin web"..., 4096) = 1086
read(6, "", 4096)                       = 0
close(6)                                = 0
lstat("/etc/apache2/httpd.conf", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/etc/apache2/httpd.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
read(6, "", 4096)                       = 0
close(6)                                = 0
lstat("/etc/apache2/ports.conf", {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
open("/etc/apache2/ports.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
read(6, "Listen 80\n", 4096)            = 10
read(6, "", 4096)                       = 0
close(6)                                = 0
lstat("/etc/apache2/conf.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/apache2/conf.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
getdents(6, /* 3 entries */, 3933)      = 52
getdents(6, /* 0 entries */, 3933)      = 0
close(6)                                = 0
lstat("/etc/apache2/conf.d/scoreboard", {st_mode=S_IFREG|0644, st_size=85, ...}) = 0
open("/etc/apache2/conf.d/scoreboard", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=85, ...}) = 0
read(6, "#This is required for 2.2 kernel"..., 4096) = 85
read(6, "", 4096)                       = 0
close(6)                                = 0
read(5, "\nAddIcon /icons/layout.gif .html"..., 4096) = 4096
read(5, "er server-info\n#    Order deny,a"..., 4096) = 102
read(5, "", 4096)                       = 0
close(5)                                = 0
getpid()                                = 264
stat("/usr/lib/apache2/suexec2", {st_mode=S_IFREG|S_ISUID|0755, st_size=10820, ...}) = 0
open("/etc/passwd", O_RDONLY)           = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=933, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x5, 0, 0, 0x7ffff8e8, 0x1)     = 0
read(5, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 933
close(5)                                = 0
munmap(0x30016000, 4096)                = 0
open("/etc/group", O_RDONLY)            = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0644, st_size=453, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x5, 0, 0, 0x7ffff928, 0x1)     = 0
read(5, "root:x:0:\ndaemon:x:1:\nbin:x:2:\ns"..., 4096) = 453
close(5)                                = 0
munmap(0x30016000, 4096)                = 0
stat("/var/www/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(7)                                = 0
close(4)                                = 0
open("/var/log/apache2/access.log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
pipe([5, 6])                            = 0
fcntl(5, F_GETFL)                       = 0 (flags O_RDONLY)
fcntl(5, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
open("/var/log/apache2/error.log", O_RDWR|O_APPEND|O_CREAT, 0666) = 7
dup2(7, 2)                              = 2
open("/etc/mime.types", O_RDONLY)       = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=16442, ...}) = 0
read(8, "################################"..., 4096) = 4096
read(8, "esupdate\napplication/vnd.enliven"..., 4096) = 4096
read(8, "application/vnd.stardivision.cal"..., 4096) = 4096
read(8, "/g.722.1\naudio/l16\naudio/midi\t\t\t"..., 4096) = 4096
read(8, "erence/x-cooltalk\t\t\t\tice\n\nx-worl"..., 4096) = 58
read(8, "", 4096)                       = 0
close(8)                                = 0
getcwd("/root", 4096)                   = 6
brk(0x1013e000)                         = 0x1013e000
brk(0x1013f000)                         = 0x1013f000
brk(0x10140000)                         = 0x10140000
brk(0x10141000)                         = 0x10141000
brk(0x10144000)                         = 0x10144000
lstat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/root/php-apache2filter.ini", 0x7fffb848) = -1 ENOENT (No such file or directory)
open("/root/php-apache2filter.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib/php-apache2filter.ini", 0x7fffb848) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/php-apache2filter.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/root/php.ini", 0x7fffb848)      = -1 ENOENT (No such file or directory)
open("/root/php.ini", O_RDONLY)         = -1 ENOENT (No such file or directory)
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib/php.ini", {st_mode=S_IFREG|0644, st_size=34001, ...}) = 0
open("/usr/local/lib/php.ini", O_RDONLY) = 8
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/usr/local/lib/php.ini", {st_mode=S_IFREG|0644, st_size=34001, ...}) = 0
brk(0x10148000)                         = 0x10148000
ioctl(8, 0x402c7413, 0x7fffe988)        = -1 ENOTTY (Inappropriate ioctl for device)
fstat(8, {st_mode=S_IFREG|0644, st_size=34001, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(8, "[PHP]\n\n;;;;;;;;;;;\n; WARNING ;\n;"..., 8192) = 8192
read(8, "ff.\n;open_basedir =\n\n; This dire"..., 8192) = 8192
read(8, "oc_root =\n\n; The directory under"..., 8192) = 8192
read(8, "[Sybase-CT]\n; Allow or prevent p"..., 8192) = 8192
brk(0x10149000)                         = 0x10149000
read(8, "ctions\n;mbstring.func_overload ="..., 8192) = 1233
read(8, "", 4096)                       = 0
read(8, "", 8192)                       = 0
ioctl(8, 0x402c7413, 0x7fffdaa8)        = -1 ENOTTY (Inappropriate ioctl for device)
close(8)                                = 0
munmap(0x30016000, 4096)                = 0
brk(0x1014a000)                         = 0x1014a000
brk(0x1014b000)                         = 0x1014b000
brk(0x1014c000)                         = 0x1014c000
brk(0x1014d000)                         = 0x1014d000
brk(0x1014e000)                         = 0x1014e000
brk(0x1014f000)                         = 0x1014f000
brk(0x10150000)                         = 0x10150000
brk(0x10151000)                         = 0x10151000
brk(0x10152000)                         = 0x10152000
brk(0x10153000)                         = 0x10153000
brk(0x10154000)                         = 0x10154000
brk(0x10155000)                         = 0x10155000
brk(0x10156000)                         = 0x10156000
brk(0x10157000)                         = 0x10157000
brk(0x10158000)                         = 0x10158000
brk(0x10159000)                         = 0x10159000
brk(0x1015a000)                         = 0x1015a000
brk(0x1015b000)                         = 0x1015b000
brk(0x1015c000)                         = 0x1015c000
brk(0x1015d000)                         = 0x1015d000
brk(0x1015e000)                         = 0x1015e000
brk(0x1015f000)                         = 0x1015f000
brk(0x10160000)                         = 0x10160000
brk(0x10161000)                         = 0x10161000
brk(0x10162000)                         = 0x10162000
brk(0x10163000)                         = 0x10163000
brk(0x10164000)                         = 0x10164000
brk(0x10165000)                         = 0x10165000
brk(0x10166000)                         = 0x10166000
brk(0x10167000)                         = 0x10167000
brk(0x10168000)                         = 0x10168000
brk(0x10169000)                         = 0x10169000
brk(0x1016a000)                         = 0x1016a000
brk(0x1016b000)                         = 0x1016b000
brk(0x1016c000)                         = 0x1016c000
brk(0x1016d000)                         = 0x1016d000
brk(0x1016e000)                         = 0x1016e000
brk(0x1016f000)                         = 0x1016f000
brk(0x10170000)                         = 0x10170000
brk(0x10171000)                         = 0x10171000
brk(0x10172000)                         = 0x10172000
brk(0x10173000)                         = 0x10173000
brk(0x10174000)                         = 0x10174000
brk(0x10175000)                         = 0x10175000
brk(0x10176000)                         = 0x10176000
brk(0x10177000)                         = 0x10177000
brk(0x10178000)                         = 0x10178000
brk(0x10179000)                         = 0x10179000
brk(0x1017a000)                         = 0x1017a000
brk(0x1017b000)                         = 0x1017b000
brk(0x1017c000)                         = 0x1017c000
brk(0x1017d000)                         = 0x1017d000
brk(0x1017e000)                         = 0x1017e000
brk(0x1017f000)                         = 0x1017f000
brk(0x10180000)                         = 0x10180000
brk(0x10181000)                         = 0x10181000
brk(0x10182000)                         = 0x10182000
brk(0x10183000)                         = 0x10183000
brk(0x10184000)                         = 0x10184000
brk(0x10185000)                         = 0x10185000
brk(0x10186000)                         = 0x10186000
brk(0x10187000)                         = 0x10187000
brk(0x10188000)                         = 0x10188000
brk(0x10189000)                         = 0x10189000
brk(0x1018a000)                         = 0x1018a000
brk(0x1018b000)                         = 0x1018b000
brk(0x1018c000)                         = 0x1018c000
brk(0x1018d000)                         = 0x1018d000
brk(0x1018e000)                         = 0x1018e000
brk(0x1018f000)                         = 0x1018f000
brk(0x10190000)                         = 0x10190000
brk(0x10191000)                         = 0x10191000
brk(0x10192000)                         = 0x10192000
brk(0x10193000)                         = 0x10193000
brk(0x10194000)                         = 0x10194000
brk(0x10195000)                         = 0x10195000
brk(0x10196000)                         = 0x10196000
brk(0x10197000)                         = 0x10197000
brk(0x10198000)                         = 0x10198000
brk(0x10199000)                         = 0x10199000
brk(0x1019a000)                         = 0x1019a000
getpid()                                = 264
stat("/var/run/apache2.pid", 0x7ffffb08) = -1 ENOENT (No such file or directory)
open("/var/run/apache2.pid", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 8
brk(0x1019c000)                         = 0x1019c000
write(8, "264\n", 4)                    = 4
close(8)                                = 0
ipc_subcall(0, 0x1, 0x380, 0)           = 128
semop(0x80, 0, 0x10, 0x7ffffbe0)        = 0
geteuid()                               = 0
semop(0x80, 0, 0x101, 0x7ffffbe0)       = -1 EINVAL (Invalid argument)
semop(0x80, 0, 0x1, 0x7ffffbe0)         = 0
unlink("/var/log/apache2/apache2_scoreboard") = -1 ENOENT (No such file or directory)
open("/var/log/apache2/apache2_scoreboard", O_WRONLY|O_CREAT|O_EXCL, 0666) = 8
stat("/var/log/apache2/apache2_scoreboard", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
shmat(17039393, 0, SHM_REMAP|SHM_RND|0x8018) = ?
ipc_subcall(0x100, 0, 0x7ffffb08, 0)    = 0
shmdt(0x7ffffb48)                       = -1 EINVAL (Invalid argument)
shmdt(0x7ffffab8)                       = 0
getuid()                                = 0
getgid()                                = 0
shmdt(0x7ffffb48)                       = -1 EINVAL (Invalid argument)
shmdt(0x7ffffab8)                       = 0
write(8, "\0\0\340\30", 4)              = 4
close(8)                                = 0
gettimeofday({1036095951, 614869}, NULL) = 0
rt_sigaction(SIGTERM, {0xfbbb6f4, [], 0}, NULL, 8) = 0
rt_sigaction(SIGINT, {0xfbbb6f4, [], 0}, NULL, 8) = 0
rt_sigaction(SIGXCPU, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0xfbbb6f4, [HUP USR1], 0}, NULL, 8) = 0
rt_sigaction(SIGUSR1, {0xfbbb6f4, [HUP USR1], 0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0xfbbb6f4, [], SA_INTERRUPT}, {0xfbbb6f4, [HUP USR1], 0}, 8) = 0
rt_sigaction(SIGINT, {0xfbbb6f4, [], SA_INTERRUPT}, {0xfbbb6f4, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0xfbbb6f4, [], SA_INTERRUPT}, {0xfbbb6f4, [], 0}, 8) = 0
getpid()                                = 264
brk(0x1019e000)                         = 0x1019e000
geteuid()                               = 0
setgid(33)                              = 0
open("/etc/group", O_RDONLY)            = 8
fcntl(8, F_GETFD)                       = 0
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
fstat(8, {st_mode=S_IFREG|0644, st_size=453, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x8, 0, 0, 0x7ffff4d8, 0x1)     = 0
read(8, "root:x:0:\ndaemon:x:1:\nbin:x:2:\ns"..., 4096) = 453
read(8, "", 4096)                       = 0
close(8)                                = 0
munmap(0x30016000, 4096)                = 0
setgroups(1, [33])                      = 0
geteuid()                               = 0
setuid(33)                              = 0
brk(0x101a0000)                         = 0x101a0000
accept(3, {sin_family=AF_INET, sin_port=htons(63307), sin_addr=inet_addr("192.168.5.2")}}, [16]) = 8
getsockname(8, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("192.168.7.4")}}, [16]) = 0
brk(0x101a2000)                         = 0x101a2000
fcntl(8, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
brk(0x101a4000)                         = 0x101a4000
read(8, "GET /~kims/po.php HTTP/1.1\r\nHost"..., 8000) = 474
gettimeofday({1036095955, 622660}, NULL) = 0
open("/etc/passwd", O_RDONLY)           = 9
fcntl(9, F_GETFD)                       = 0
fcntl(9, F_SETFD, FD_CLOEXEC)           = 0
fstat(9, {st_mode=S_IFREG|0644, st_size=933, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0x9, 0, 0, 0x7ffff558, 0x1)     = 0
read(9, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 933
close(9)                                = 0
munmap(0x30016000, 4096)                = 0
stat("/home/kims/public_html/po.php", {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
open("/home/kims/public_html/po.php", O_RDONLY) = 9
open("/etc/localtime", O_RDONLY)        = 10
fstat(10, {st_mode=S_IFREG|0644, st_size=870, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(10, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 870
brk(0x101a5000)                         = 0x101a5000
close(10)                               = 0
munmap(0x30016000, 4096)                = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0xf701bd4, [PROF], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
brk(0x101a6000)                         = 0x101a6000
brk(0x101a7000)                         = 0x101a7000
brk(0x101a8000)                         = 0x101a8000
brk(0x101a9000)                         = 0x101a9000
time(NULL)                              = 1036095955
getpid()                                = 264
gettimeofday({1036095955, 660172}, NULL) = 0
lstat("/home", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/home/kims", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kims/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/kims/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/home/kims", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kims/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kims/public_html/po.php", {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0xf701bd4, [PROF], SA_RESTART}, {0xf701bd4, [PROF], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
lstat("/home", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat("/home/kims", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kims/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/kims/public_html/po.php", {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
open("/home/kims/public_html/po.php", O_RDONLY) = 10
fstat(10, {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
fstat(10, {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
lseek(10, 0, SEEK_SET)                  = 0
brk(0x101ad000)                         = 0x101ad000
ioctl(10, 0x402c7413, 0x7fffd5b8)       = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x101ae000)                         = 0x101ae000
fstat(10, {st_mode=S_IFREG|0755, st_size=1015, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(10, "<?\n\theader(\'Content-type: text/p"..., 8192) = 1015
read(10, "", 4096)                      = 0
brk(0x101af000)                         = 0x101af000
brk(0x101b4000)                         = 0x101b4000
read(10, "", 8192)                      = 0
ioctl(10, 0x402c7413, 0x7fffbe98)       = -1 ENOTTY (Inappropriate ioctl for device)
close(10)                               = 0
munmap(0x30016000, 4096)                = 0
brk(0x101ba000)                         = 0x101ba000
brk(0x101c0000)                         = 0x101c0000
brk(0x101cc000)                         = 0x101cc000
brk(0x101d2000)                         = 0x101d2000
brk(0x101ea000)                         = 0x101ea000
brk(0x101f6000)                         = 0x101f6000
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30036000
brk(0x101b1000)                         = 0x101b1000
lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
lstat("/tmp/foo", 0x7fff99c8)           = -1 ENOENT (No such file or directory)
open("/tmp/foo", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 10
fstat(10, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
write(10, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 8192
write(10, "ofoofoofoofoofoofoofoofoofoofoof"..., 8192) = 8192
write(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 8192) = 8192
close(10)                               = 0
pipe([10, 11])                          = 0
pipe([12, 13])                          = 0
pipe([14, 15])                          = 0
fork()                                  = 266
close(10)                               = 0
fcntl(11, F_GETFL)                      = 0x1 (flags O_WRONLY)
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
_llseek(0xb, 0, 0, 0x7fffca28, 0x1)     = -1 ESPIPE (Illegal seek)
fstat(11, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(13)                               = 0
fcntl(12, F_GETFL)                      = 0 (flags O_RDONLY)
fstat(12, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30017000
_llseek(0xc, 0, 0, 0x7fffca28, 0x1)     = -1 ESPIPE (Illegal seek)
fstat(12, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(15) = 0
fcntl(14, F_GETFL)                      = 0 (flags O_RDONLY)
fstat(14, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30018000
_llseek(0xe, 0, 0, 0x7fffca28, 0x1)     = -1 ESPIPE (Illegal seek)
fstat(14, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(12, "foofoofoofoofoofoofoofoofoofoofo"..., 8192) = 4096
brk(0x101b3000)                         = 0x101b3000
close(11)                               = 0
munmap(0x30016000, 4096)                = 0
close(12)                               = 0
munmap(0x30017000, 4096)                = 0
close(14)                               = 0
munmap(0x30018000, 4096)                = 0
wait4(266, [WIFEXITED(s) && WEXITSTATUS(s) == 1], 0, NULL) = 266
--- SIGCHLD (Child exited) ---
lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
lstat("/tmp/foo", {st_mode=S_IFREG|0644, st_size=196608, ...}) = 0
unlink("/tmp/foo")                      = 0
lstat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
munmap(0x30036000, 200704)              = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
read(8, 0x101a1b80, 8000)               = -1 EAGAIN (Resource temporarily unavailable)
writev(8, [{"HTTP/1.1 200 OK\r\nDate: Thu, 31 O"..., 237}, {"12\r\n", 4}, {"read: 4096 bytes.\n", 18}, {"\r\n", 2}, {"26\r\n", 4}, {"didn\'t read all 196608 bytes of "..., 38}, {"\r\n", 2}, {"0\r\n\r\n", 5}], 8) = 310
write(4, "192.168.5.2 - - [01/Nov/2002:09:"..., 164) = 164
close(9)                                = 0
poll([{fd=8, events=POLLIN}], 1, 15000) = -1 EINTR (Interrupted system call)
--- SIGINT (Interrupt) ---
close(8)                                = 0
close(6)                                = 0
close(5)                                = 0
exit(0)                                 = ?

and here's cat's trace (note the broken pipe on the second write...):

getpid()                                = 266
getrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
close(11)                               = 0
dup2(10, 0)                             = 0
close(10)                               = 0
close(12)                               = 0
dup2(13, 1)                             = 1
close(13)                               = 0
close(14)                               = 0
dup2(15, 2)                             = 2
close(15)                               = 0
getpid()                                = 266
getrlimit(RLIMIT_STACK, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {SIG_DFL}, NULL, 8) = 0
execve("/bin/sh", ["sh", "-c", "cat /tmp/foo"], [/* 16 vars */]) = 0
uname({sys="Linux", node="gadogado", ...}) = 0
brk(0)                                  = 0x100c26fc
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
fstat64(0xa, 0x7fffefa0)                = -1 ENOSYS (Function not implemented)
fstat(10, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 10, 0) = 0x30016000
close(10)                               = 0
open("/lib/libncurses.so.5", O_RDONLY)  = 10
read(10, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\355"..., 1024) = 1024
fstat(10, {st_mode=S_IFREG|0644, st_size=351336, ...}) = 0
mmap(0xff89000, 420708, PROT_READ|PROT_EXEC, MAP_PRIVATE, 10, 0) = 0xff89000
mprotect(0xffcf000, 133988, PROT_NONE)  = 0
mmap(0xffd9000, 90112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 10, 0x40000) = 0xffd9000
mmap(0xffef000, 2916, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffef000
close(10)                               = 0
open("/lib/libdl.so.2", O_RDONLY)       = 10
read(10, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\34"..., 1024) = 1024
fstat(10, {st_mode=S_IFREG|0644, st_size=10096, ...}) = 0
mmap(0xff66000, 74696, PROT_READ|PROT_EXEC, MAP_PRIVATE, 10, 0) = 0xff66000
mprotect(0xff69000, 62408, PROT_NONE)   = 0
mmap(0xff76000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 10, 0) = 0xff76000
close(10)                               = 0
open("/lib/libc.so.6", O_RDONLY)        = 10
read(10, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\317"..., 1024) = 1024
fstat(10, {st_mode=S_IFREG|0755, st_size=1273464, ...}) = 0
mmap(0xfe0c000, 1349584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 10, 0) = 0xfe0c000
mprotect(0xff3b000, 108496, PROT_NONE)  = 0
mmap(0xff3c000, 90112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 10, 0x120000) = 0xff3c000
mmap(0xff52000, 14288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff52000
close(10)                               = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30019000
mprotect(0xfe0c000, 1241088, PROT_READ|PROT_WRITE) = 0
mprotect(0xfe0c000, 1241088, PROT_READ|PROT_EXEC)                              = 0
munmap(0x30016000, 12080)               = 0
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 10
close(10)                               = 0
brk(0)                                  = 0x100c26fc
brk(0x100c3000)                         = 0x100c3000
brk(0x100c4000)                         = 0x100c4000
getuid()                                = 33
getgid()                                = 33
geteuid()                               = 33
getegid()                               = 33
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
time(NULL)                              = 1036095955
brk(0x100c5000)                         = 0x100c5000
brk(0x100c6000)                         = 0x100c6000
open("/etc/mtab", O_RDONLY)             = 10
fstat64(0xa, 0x7fffd498)                = -1 ENOSYS (Function not implemented)
fstat(10, {st_mode=S_IFREG|0644, st_size=110, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(10, "/dev/sda4 / ext2 rw,errors=remou"..., 4096) = 110
close(10)                               = 0
munmap(0x30016000, 4096)                = 0
open("/proc/meminfo", O_RDONLY)         = 10
fstat(10, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(10, "        total:    used:    free:"..., 1024) = 318
close(10)                               = 0
munmap(0x30016000, 4096)                = 0
brk(0x100c7000)                         = 0x100c7000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys="Linux", node="gadogado", ...}) = 0
stat("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getpid()                                = 266
getppid()                               = 264
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/sbin/sh", 0x7ffff568)            = -1 ENOENT (No such file or directory)
stat("/bin/sh", {st_mode=S_IFREG|0755, st_size=712224, ...}) = 0
getgroups(32, [33])                     = 1
stat("/bin/sh", {st_mode=S_IFREG|0755, st_size=712224, ...}) = 0
getpgrp()                               = 263
rt_sigaction(SIGCHLD, {0x10034378, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [32], 8) = 0
brk(0x100c8000)                         = 0x100c8000
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/sbin/cat", 0x7ffff578)           = -1 ENOENT (No such file or directory)
stat("/bin/cat", {st_mode=S_IFREG|0755, st_size=15596, ...}) = 0
stat("/bin/cat", {st_mode=S_IFREG|0755, st_size=15596, ...}) = 0
brk(0x100c9000)                         = 0x100c9000
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {0x10034378, [], 0}, 8) = 0
execve("/bin/cat", ["cat", "/tmp/foo"], [/* 14 vars */]) = 0
uname({sys="Linux", node="gadogado", ...}) = 0
brk(0)                                  = 0x10013b80
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 10
fstat64(0xa, 0x7fffefd0)                = -1 ENOSYS (Function not implemented)
fstat(10, {st_mode=S_IFREG|0644, st_size=12080, ...}) = 0
mmap(NULL, 12080, PROT_READ, MAP_PRIVATE, 10, 0) = 0x30016000
close(10)                               = 0
open("/lib/libc.so.6", O_RDONLY)        = 10
read(10, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\317"..., 1024) = 1024
fstat(10, {st_mode=S_IFREG|0755, st_size=1273464, ...}) = 0
mmap(0xfea6000, 1349584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 10, 0) = 0xfea6000
mprotect(0xffd5000, 108496, PROT_NONE)  = 0
mmap(0xffd6000, 90112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 10, 0x120000) = 0xffd6000
mmap(0xffec000, 14288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffec000
close(10)                               = 0
mprotect(0xfea6000, 1241088, PROT_READ|PROT_WRITE) = 0
mprotect(0xfea6000, 1241088, PROT_READ|PROT_EXEC) = 0
munmap(0x30016000, 12080)               = 0
brk(0)                                  = 0x10013b80
brk(0x10014b80)                         = 0x10014b80
brk(0x10015000)                         = 0x10015000
fstat64(0x1, 0x7ffffcc8)                = -1 ENOSYS (Function not implemented)
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
open("/tmp/foo", O_RDONLY|O_LARGEFILE)  = 10
fstat(10, {st_mode=S_IFREG|0644, st_size=196608, ...}) = 0
read(10, "foofoofoofoofoofoofoofoofoofoofo"..., 4096) = 4096
write(1, "foofoofoofoofoofoofoofoofoofoofo"..., 4096) = 4096
read(10, "oofoofoofoofoofoofoofoofoofoofoo"..., 4096) = 4096
write(1, "oofoofoofoofoofoofoofoofoofoofoo"..., 4096) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) ---
 [2002-10-31 23:00 UTC] wez@php.net
It looks like it was a problem with feof (and the internal eof detection code).
Please update main/streams.c and let us know if that fixed it for you.

 [2002-10-31 23:44 UTC] kims at contrail dot com dot au
Yes, that seems to have fixed it.

Thankyou for your time in fixing this matter promptly.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 21:03:43 2022 UTC