php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56090 Unexpected result from APD
Submitted: 2004-06-08 19:42 UTC Modified: 2004-06-09 12:31 UTC
From: chubbard at next-online dot net Assigned:
Status: Not a bug Package: apd (PECL)
PHP Version: 4.3.7 OS: mac os x
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chubbard at next-online dot net
New email:
PHP Version: OS:

 

 [2004-06-08 19:42 UTC] chubbard at next-online dot net
Description:
------------
I've installed APD per the instructions on the APD page.  

I'm using apd-0.4p2

php.ini file has the following:
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20020429/apd.so
apd.dumpdir = /tmp/apd

After restarting apache I do see APD in the phpinfo:
APD
Advanced PHP Debugger (APD)	Enabled
APD Version 	0.1

I've added the following to the top of my config.inc.php file (it's the first include on every page in the application):
apd_set_session_trace(9);

when I load the page I do get a trace written to /tmp/apd, for example I've got the following in the directory:
apd_dump_00749
apd_dump_00752
apd_dump_00799

then when I cat it:
cat apd_dump_00799                                                                        /tmp/apd 0


APD - Advanced PHP Debugger Trace File
---------------------------------------------------------------------------
Process Pid (799)
Trace Begun at Tue Jun  8 16:03:20 2004
---------------------------------------------------------------------------
(  0.000000): apd_set_session_trace called at /Users/chubbard/Source/PHP/Proj/lib/config.inc.php:14
(  2.765481): RSHUTDOWN called - end of trace
---------------------------------------------------------------------------
Process Pid (799)
---------------------------------------------------------------------------
Trace Ended at Tue Jun  8 16:03:23 2004
---------------------------------------------------------------------------

Notice nothing between the start and the shutdown.

Any suggestions?


Reproduce code:
---------------
<?php

apd_set_session_trace(9);
// do anything here

?>

Expected result:
----------------
I expected a trace similar to the sample in the documentation:
---------------------------------------------------------------------------

(  0.000000): apd_set_session_trace called at somewhere

(  0.001482): apd_set_session_trace() returned.  Elapsed (997475865.364909)

(  0.001563): getcwd() /opt/apache/htdocs/a.php:4

(  0.001628): getcwd() returned.  Elapsed (0.000065)

(  0.001819): require() /opt/apache/htdocs/a.php:6

              ++ argv[0] $(??) = /tmp/a.php

(  0.002231):   getcwd() /tmp/a.php:3

(  0.002290):   getcwd() returned.  Elapsed (0.000059)

(  0.002375):   include_once() /tmp/a.php:4

                ++ argv[0] $(??) = /tmp/aa.php

(  0.003276):   include_once() returned.  Elapsed (0.000901)

(  0.003334): require() returned.  Elapsed (0.001515)

(  0.003381): require_once() /opt/apache/htdocs/a.php:7

              ++ argv[0] $(??) = /tmp/aa.php

(  0.003515): require_once() returned.  Elapsed (0.000134)

(  0.003564): include() /opt/apache/htdocs/a.php:8

              ++ argv[0] $(??) = /tmp/b.php

(  0.003792): include() returned.  Elapsed (0.000228)

(  0.018341): RSHUTDOWN called - end of trace

---------------------------------------------------------------------------



Actual result:
--------------
cat apd_dump_00799                                                                        /tmp/apd 0


APD - Advanced PHP Debugger Trace File
---------------------------------------------------------------------------
Process Pid (799)
Trace Begun at Tue Jun  8 16:03:20 2004
---------------------------------------------------------------------------
(  0.000000): apd_set_session_trace called at /Users/chubbard/Source/PHP/Proj/lib/config.inc.php:14
(  2.765481): RSHUTDOWN called - end of trace
---------------------------------------------------------------------------
Process Pid (799)
---------------------------------------------------------------------------
Trace Ended at Tue Jun  8 16:03:23 2004
---------------------------------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-08 19:44 UTC] chubbard at next-online dot net
Please note, I'm running php 4.3.7, NOT 4.3.3.  The version select box only goes to 4.3.3.
 [2004-06-09 12:31 UTC] chubbard at next-online dot net
I pulled out George's book and it says to use apd_set_pprof_trace(); at the top of the file that I want to profile.  So I've done that and now I do get the expected output.  

I've changed the status of this bug to bogus.

Please note that the current (June 9th, 2004) online documentation of APD is either incorrect or misleading.  I have not been able to figure out how to use apd_set_session_trace(N).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC