|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-23 09:50 UTC] mike@php.net
[2006-02-27 07:21 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Description: ------------ When pprofp is installed in /usr/bin or other directory and called to process a file in the current directory, it fails to open it. For example, if a trace file pprof.12345.0 is in /var/log/php-apd and pprofp is installed to /usr/bin, when we: cd /var/log/php-apd pprofp -a pprof.12345.0 yelds an error. See a proposed patch to correct the problem. Note - apd version is 0.9.2. Reproduce code: --------------- --- ./pprofp.orig 2004-09-27 23:12:29.000000000 -0400 +++ ./pprofp 2004-12-31 01:35:21.000000000 -0500 @@ -16,9 +16,11 @@ } ($dataFile = $retval[1][0]) || usage(); if(($DATA = fopen($dataFile, "r")) == FALSE) { +if(($DATA = fopen($_ENV['PWD']."/".$dataFile, "r")) == FALSE) { print "Failed to open $dataFile for reading\n"; exit(1); } +} $cfg = array(); parse_info('HEADER', $DATA, $cfg);