php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56260 pprofp fails to find input files
Submitted: 2004-12-31 01:57 UTC Modified: 2006-02-27 07:21 UTC
From: mitka at mitka dot us Assigned:
Status: No Feedback Package: apd (PECL)
PHP Version: 4.3.2 OS: RHEL 3.0
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mitka at mitka dot us
New email:
PHP Version: OS:

 

 [2004-12-31 01:57 UTC] mitka at mitka dot us
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);                                                          
                                                                                             
                                                                                             


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-23 09:50 UTC] mike@php.net
Please try the latest package version and report back if you're still experiencing this issue.
 [2006-02-27 07:21 UTC] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC