betz Thu Aug 5 09:15:19 2004 EDT
Added files:
/phpdoc/en/reference/apd configure.xml reference.xml
/phpdoc/en/reference/apd/functions apd-breakpoint.xml
apd-callstack.xml apd-clunk.xml
apd-continue.xml apd-croak.xml
apd-dump-function-table.xml
apd-dump-persistent-resources.xml
apd-dump-regular-resources.xml
apd-echo.xml
apd-get-active-symbols.xml
apd-override-function.xml
apd-rename-function.xml
apd-set-session-trace.xml
apd-set-session.xml
apd-set-socket-session-trace.xml
Log:
add apd from peardoc to phpdoc
http://cvs.php.net/co.php/phpdoc/en/reference/apd/configure.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/configure.xml
+++ phpdoc/en/reference/apd/configure.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<section id="apd.installation">
&reftitle.install;
<para>
Make sure you have installed the CGI version of PHP and it is available
in your current path along with the phpize script.
</para>
<para>
Change into the source directory (either created from the downloaded TAR
archive or from checking out CVS) and run the following commands:
</para>
<para>
<programlisting role="shell">
<![CDATA[../configure
make install
]]>
</programlisting>
</para>
<para>
This automatically should install the 'php_apd' zend module into your PHP
extensions directory. It isn't mandatory to have it there, in fact you can
install it anywhere you care.
</para>
<para>
In your INI file, add the following lines:
</para>
<para>
<programlisting role="php.ini">
<![CDATA[
zend_extension = /absolute/path/to/php_apd.so
apd.dumpdir = /absolute/path/to/trace/directory
]]>
</programlisting>
</para>
</section>
<section id="apd.zend_extension">
<title>php.ini zend_extension setting</title>
<para>
Depending on your PHP build, the zend_extension directive can be one of the
following:
</para>
<para>
<programlisting role="script">
<![CDATA[
zend_extension (non ZTS, non debug build)
zend_extension_ts ( ZTS, non debug build)
zend_extension_debug (non ZTS, debug build)
zend_extension_debug_ts ( ZTS, debug build)
zend_extension_debug = /absolute/path/to/php_apd.so
]]>
</programlisting>
</para>
</section>
<section id="apd.dumpdir">
<title>&php.ini; apd.dumpdir setting</title>
<para>
This can either be an absolute path or a relative path. Relative
means always relative to your where from you run your executeable.
</para>
<para>
<programlisting role="text">
<![CDATA[
*** NOTE ******************************************************************
*
* If you're running the CGI version of PHP, you will need to add the '-e'
* flag to enable extended information for apd to work properly:
*
* php -e -f script.php
*
***************************************************************************
]]>
</programlisting>
</para>
</section>
<section id="apd.installwin32">
<title>Building on Win32</title>
<para>
To build APD under Windows you need a working PHP compilation
environment as described on http://php.net/ (basically, it requires
you to have MSVC, win32build.zip and bison/flex and some know how
about how to get it to work). Also make sure that adp.dsp has DOS
line endings! If it has unix line endings, MSVC will complain about it.
</para>
<para>
You can use normal Windows path values for your &php.ini; settings:
</para>
<para>
<programlisting role="php.ini">
<![CDATA[
zend_extension_debug_ts = c:\phpdev\php_apd.dll
apd.dumpdir = c:\phpdev\traces
]]>
</programlisting>
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/reference.xml
+++ phpdoc/en/reference/apd/reference.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<reference id="ref.apd">
<title>Advanced PHP debugger</title>
<titleabbrev>APD</titleabbrev>
<partintro>
<section id="apd.intro">
&reftitle.intro;
<para>
APD is the Advanced PHP Debugger. It was written to provide strace/truss
capability for profiling and debugging php code, as well as providing the
ability to print out a full stack backtrace. APD does supports
interactive and non interactive debugging, by default it writes data to
trace files. APD provides event based logging, so that varying levels of
information (including function calls, arguments passed, timings, etc.)
can be turned on or off for individual scripts.
</para>
<para>
APD is a Zend Extension, modifying the way the internals of PHP handle
function calls, and thus may or may not be compatible with other Zend
Extensions (for example Zend Optimizer).
</para>
</section>
&reference.apd.configure;
<section id="apd.examples">
<title>How to use PHP-APD in your scripts</title>
<para>
In your PHP script, add the following line:
</para>
<para>
<programlisting role="php">
<![CDATA[
apd_set_session_trace(9);
]]>
</programlisting>
</para>
<para>
Now run your script.
</para>
<para>
The dump output will be writting to:
</para>
<para>
<programlisting role="text">
<![CDATA[
<apd.dumpdir>/apd_dump_<pid>
]]>
</programlisting>
</para>
<para>
The output itself will look something like:
<screen>
<![CDATA[
16:37:51([EMAIL PROTECTED])[~/src/apd]> cat /tmp/apd_dump_31994
APD - Advanced PHP Debugger Trace File
---------------------------------------------------------------------------
Process Pid (31994)
Trace Begun at Fri Aug 10 16:37:45 2001
---------------------------------------------------------------------------
( 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
---------------------------------------------------------------------------
Process Pid (31994)
Trace Ended at Fri Aug 10 16:37:45 2001
---------------------------------------------------------------------------
]]>
</screen>
</para>
</section>
<section id="apd.contact">
<title>Contact Information</title>
<para>
If you have comments, bugfixes, enhancements or want to help developping
this beast, you can send an mail to
<ulink url="mailto:&email.apd;">&email.apd;</ulink>. Any help is very
welcome.
</para>
</section>
</partintro>
&reference.apd.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-breakpoint.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-breakpoint.xml
+++ phpdoc/en/reference/apd/functions/apd-breakpoint.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-breakpoint">
<refnamediv>
<refname>apd_breakpoint</refname>
<refpurpose>Stops the interpreter and waits on a CR from the socket</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_breakpoint</methodname>
<methodparam><type>int</type><parameter>debug_level</parameter></methodparam>
</methodsynopsis>
<para>
This can be used to stop the running of your script, and await responses
on the connected socket. To step the program, just send enter (a blank
line), or enter a php command to be executed. A typical session using
tcplisten would look like this.
</para>
<para>
<programlisting role="shell">
<![CDATA[
bash#tcplisten localhost 7777
APD - Advanced PHP Debugger Trace File
---------------------------------------------------------------------------
Process Pid (6118)
Trace Begun at Sun Mar 10 23:13:12 2002
---------------------------------------------------------------------------
( 0.000000): apd_set_session_trace called at /home/alan/Projects/project2/test.
php:5
( 0.074824): apd_set_session_trace_socket() at /home/alan/Projects/project2/tes
t.php:5 returned. Elapsed (0.074824)
( 0.074918): apd_breakpoint() /home/alan/Projects/project2/test.php:7
++ argv[0] $(??) = 9
apd_breakpoint() at /home/alan/Projects/project2/test.php:7 returned. Elapsed (
-2089521468.1073275368)
>\n
statement: /home/alan/Projects/project2/test.php:8
>\n
statement: /home/alan/Projects/project2/test.php:8
>\n
statement: /home/alan/Projects/project2/test.php:10
>apd_echo($i);
EXEC: apd_echo($i);
0
>apd_echo(serialize(apd_get_active_symbols()));
EXEC: apd_echo(serialize(apd_get_active_symbols()));
a:47:{i:0;s:4:"PWD";i:1;s:10:"COLORFGBG";i:2;s:11:"XAUTHORITY";i:3;s:14:"
COLORTERM_BCE";i:4;s:9:"WINDOWID";i:5;s:14:"ETERM_VERSION";i:6;s:16:"SE
SSION_MANAGER";i:7;s:4:"PS1";i:8;s:11:"GDMSESSION";i:9;s:5:"USER";i:10;s:5:"
MAIL";i:11;s:7:"OLDPWD";i:12;s:5:"LANG";i:13;s:10:"COLORTERM";i:14;s:8:"DISP
LAY";i:15;s:8:"LOGNAME";i:16;s:6:"
>apd_echo(system('ls /home/mydir'));.........
>apd_continue(0);
]]>
</programlisting>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-callstack.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-callstack.xml
+++ phpdoc/en/reference/apd/functions/apd-callstack.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-callstack">
<refnamediv>
<refname>apd_callstack</refname>
<refpurpose>Returns the current call stack as an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>apd_callstack</methodname>
<void/>
</methodsynopsis>
<para>
Returns the current call stack as an array
</para>
<para>
<example>
<title><function>apd_callstack</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
print_r(apd_callstack());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-clunk.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-clunk.xml
+++ phpdoc/en/reference/apd/functions/apd-clunk.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-clunk">
<refnamediv>
<refname>apd_clunk</refname>
<refpurpose>Throw a warning and a callstack</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_clunk</methodname>
<methodparam><type>string</type><parameter>warning</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam>
</methodsynopsis>
<para>
Behaves like perl's Carp::cluck. Throw a warning and a callstack.
The default line delimiter is "<BR />\n".
</para>
<para>
<example>
<title><function>apd_clunk</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_clunk("Some Warning","<P>");
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-continue.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-continue.xml
+++ phpdoc/en/reference/apd/functions/apd-continue.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-continue">
<refnamediv>
<refname>apd_continue</refname>
<refpurpose>Restarts the interpreter</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_continue</methodname>
<methodparam><type>int</type><parameter>debug_level</parameter></methodparam>
</methodsynopsis>
<para>
Usually sent via the socket to restart the interpeter
</para>
<para>
<example>
<title><function>apd_set_session</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
>apd_continue(0);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-croak.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-croak.xml
+++ phpdoc/en/reference/apd/functions/apd-croak.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-croak">
<refnamediv>
<refname>apd_croak</refname>
<refpurpose>Throw an error, a callstack and then exit</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_croak</methodname>
<methodparam><type>string</type><parameter>warning</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam>
</methodsynopsis>
<para>
Behaves like perl's Carp::croak. Throw an error, a callstack and then
exit. The default line delimiter is "<BR />\n".
</para>
<para>
<example>
<title><function>apd_croak</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_croak("Some Warning","<P>");
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-dump-function-table.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-dump-function-table.xml
+++ phpdoc/en/reference/apd/functions/apd-dump-function-table.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-dump-function-table">
<refnamediv>
<refname>apd_dump_function_table</refname>
<refpurpose>Outputs the current function table</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>a</type><methodname>apd_dump_function_table</methodname>
<void/>
</methodsynopsis>
<para>
Outputs the current function table.
</para>
<para>
<example>
<title><function>apd_dump_function_table</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_dump_function_table();
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-dump-persistent-resources.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-dump-persistent-resources.xml
+++ phpdoc/en/reference/apd/functions/apd-dump-persistent-resources.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-dump-persistent-resources">
<refnamediv>
<refname>apd_dump_persistent_resources</refname>
<refpurpose>Return all persistent resources as an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>apd_dump_persistent_resources</methodname>
<void/>
</methodsynopsis>
<para>
Return all persistent resources as an array.
</para>
<para>
<example>
<title><function>apd_dump_persistent_resources</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
print_r(apd_dump_persistent_resources());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-dump-regular-resources.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-dump-regular-resources.xml
+++ phpdoc/en/reference/apd/functions/apd-dump-regular-resources.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-dump-regular-resources">
<refnamediv>
<refname>apd_dump_regular_resources</refname>
<refpurpose>Return all current regular resources as an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>apd_dump_regular_resources</methodname>
<void/>
</methodsynopsis>
<para>
Return all current regular resources as an array.
</para>
<para>
<example>
<title><function>apd_dump_regular_resources</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
print_r(apd_dump_regular_resources());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-echo.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-echo.xml
+++ phpdoc/en/reference/apd/functions/apd-echo.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-echo">
<refnamediv>
<refname>apd_echo</refname>
<refpurpose>echo to the debugging socket</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_echo</methodname>
<methodparam><type>string</type><parameter>output</parameter></methodparam>
</methodsynopsis>
<para>
Usually sent via the socket to request information about the running
script.
</para>
<para>
<example>
<title><function>apd_echo</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
>apd_echo($i);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-get-active-symbols.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-get-active-symbols.xml
+++ phpdoc/en/reference/apd/functions/apd-get-active-symbols.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-get-active-symbols">
<refnamediv>
<refname>apd_get_active_symbols</refname>
<refpurpose>get an array of the current variables names in the local
scope</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>apd_get_active_symbols</methodname>
<methodparam><parameter/></methodparam>
</methodsynopsis>
<para>
Returns the names of all the variables defined in the active scope, (not
their values)
</para>
<para>
<example>
<title><function>apd_get_active_symbols</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_echo(apd_get_active_symbols());
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-override-function.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-override-function.xml
+++ phpdoc/en/reference/apd/functions/apd-override-function.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-override-function">
<refnamediv>
<refname>override_function</refname>
<refpurpose>Overrides built-in functions</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>override_function</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
<methodparam><type>string</type><parameter>function_args</parameter></methodparam>
<methodparam><type>string</type><parameter>function_code</parameter></methodparam>
</methodsynopsis>
<para>
Syntax similar to create_function(). Overrides built-in functions
(replaces them in the symbol table).
</para>
<para>
<example>
<title><function>override_function</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
override_function('test', '$a,$b', 'echo "DOING TEST"; return $a * $b;');
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-rename-function.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-rename-function.xml
+++ phpdoc/en/reference/apd/functions/apd-rename-function.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-rename-function">
<refnamediv>
<refname>rename_function</refname>
<refpurpose>Renames orig_name to new_name in the global function_table</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>override_function</methodname>
<methodparam><type>string</type><parameter>original_name</parameter></methodparam>
<methodparam><type>string</type><parameter>new_name</parameter></methodparam>
</methodsynopsis>
<para>
Renames orig_name to new_name in the global function_table. Useful
for temporarly overriding builtin functions.
</para>
<para>
<example>
<title><function>override_function</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
rename_function('mysql_connect', 'debug_mysql_connect' );
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-set-session-trace.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-set-session-trace.xml
+++ phpdoc/en/reference/apd/functions/apd-set-session-trace.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-set-session-trace">
<refnamediv>
<refname>apd_set_session_trace</refname>
<refpurpose>Starts the session debugging</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_set_session_trace</methodname>
<methodparam><type>int</type><parameter>debug_level</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>dump_directory</parameter></methodparam>
</methodsynopsis>
<para>
Starts debugging to {dump_directory}/apd_dump_{process_id}, if
dump_directory is not set, then the apd.dumpdir setting from the
&php.ini; file is used.
</para>
<para>
debug_level is an integer which is formed by adding together the following
values:
</para>
<para>
<programlisting role="script">
<![CDATA[
FUNCTION_TRACE 1
ARGS_TRACE 2
ASSIGNMENT_TRACE 4
STATEMENT_TRACE 8
MEMORY_TRACE 16
TIMING_TRACE 32
SUMMARY_TRACE 64
]]>
</programlisting>
</para>
<para>
I would seriously not recommend using MEMORY_TRACE. It is very slow and
does not appear to be accurate (great, huh?) also ASSIGNMENT_TRACE is not
implemented. So, to turn on all functional traces (TIMING, FUNCTIONS, ARGS
SUMMARY (like strace -c)) use the value 99
</para>
<para>
<example>
<title><function>apd_set_session_trace</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_set_session_trace(99);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-set-session.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-set-session.xml
+++ phpdoc/en/reference/apd/functions/apd-set-session.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-set-session">
<refnamediv>
<refname>apd_set_session</refname>
<refpurpose>Changes or sets the current debugging level</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_set_session</methodname>
<methodparam><type>int</type><parameter>debug_level</parameter></methodparam>
</methodsynopsis>
<para>
This can be used to increase or decrease debugging in a different area of
your application,.debug_level is an integer which is formed by adding
together the following values:
</para>
<para>
<programlisting role="script">
<![CDATA[
FUNCTION_TRACE 1
ARGS_TRACE 2
ASSIGNMENT_TRACE 4
STATEMENT_TRACE 8
MEMORY_TRACE 16
TIMING_TRACE 32
SUMMARY_TRACE 64
]]>
</programlisting>
</para>
<para>
<example>
<title><function>apd_set_session</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_set_session(9);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
http://cvs.php.net/co.php/phpdoc/en/reference/apd/functions/apd-set-socket-session-trace.xml?r=1.1&p=1
Index: phpdoc/en/reference/apd/functions/apd-set-socket-session-trace.xml
+++ phpdoc/en/reference/apd/functions/apd-set-socket-session-trace.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/apd.xml, last change in rev 1.4 -->
<refentry id="function.apd-set-socket-session-trace">
<refnamediv>
<refname>apd_set_socket_session_trace</refname>
<refpurpose>Starts the remote session debugging</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<methodname>apd_set_socket_session_trace</methodname>
<methodparam><type>string</type><parameter>(ip_address or unix socket
file)</parameter></methodparam>
<methodparam><type>int</type><parameter>socket_type</parameter></methodparam>
<methodparam><type>int</type><parameter>port</parameter></methodparam>
<methodparam><type>int</type><parameter>debug_level</parameter></methodparam>
</methodsynopsis>
<para>
Connects to the tcp server (eg. tcplisten) specified IP or Unix Domain
socket (like a file), and sends debugging data to the socket. You can
use any port, but higher numbers are better as most of the lower numbers
may be used by other system services.
</para>
<para>
the socket_type can be APD_AF_UNIX (for file based sockets) or APD_AF_INET
(for standard tcp/ip)
</para>
<para>
debug_level is an integer which is formed by adding together the following
values:
</para>
<para>
<programlisting role="script">
<![CDATA[
FUNCTION_TRACE 1
ARGS_TRACE 2
ASSIGNMENT_TRACE 4
STATEMENT_TRACE 8
MEMORY_TRACE 16
TIMING_TRACE 32
SUMMARY_TRACE 64
]]>
</programlisting>
</para>
<para>
I would seriously not recommend setting the value to 'zero' to start with,
and use the breakpoint methods to start debugging at a specific place in
the file.
</para>
<para>
<example>
<title><function>apd_set_socket_session_trace</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
apd_set_socket_session_trace("127.0.0.1",APD_AF_INET,7112,0);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->