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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Apr 20 13:01:29 2024 UTC