com web/bugs: Add ZEND_DONT_UNLOAD_MODULE and mention built-in web server: www/bugs-getting-valgrind-log .php
| From: | Hannes Magnusson | Date: | Tue, 19 Feb 2013 23:18:48 +0000 |
| Subject: | com web/bugs: Add ZEND_DONT_UNLOAD_MODULE and mention built-in web server: www/bugs-getting-valgrind-log .php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15576@lists.php.net to get a copy of this message | ||
Commit: 4e965f5e9605430b1b25c6e3841055ef22704766
Author: Christopher Jones <sixd@php.net> Tue, 19 Feb 2013 15:18:48 -0800
Parents: d7011ab6b4db9de12034518c82270853b2fb79e0
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=4e965f5e9605430b1b25c6e3841055ef22704766
Log:
Add ZEND_DONT_UNLOAD_MODULE and mention built-in web server
Changed paths:
M www/bugs-getting-valgrind-log.php
Diff:
diff --git a/www/bugs-getting-valgrind-log.php b/www/bugs-getting-valgrind-log.php
index 62d1535..71fd706 100644
--- a/www/bugs-getting-valgrind-log.php
+++ b/www/bugs-getting-valgrind-log.php
@@ -31,7 +31,20 @@ and disable Zend memory manager.
</p>
-<h3>Running PHP CLI or PHP CGI through valgrind</h3>
+<h3>Using Shared Extensions</h3>
+
+<p>
+ To correctly show the stack frames for extensions compiled as shared libraries, set:
+ <pre><code>export ZEND_DONT_UNLOAD_MODULES=1</code></pre> or
+ <pre><code>setenv ZEND_DONT_UNLOAD_MODULES 1</code></pre> (the syntax
depends on
+ what your shell supports).
+</p>
+
+<p>
+ This works from PHP 5.3.11 onwards.
+</p>
+
+<h3>Running PHP CLI, Built-in Web Server or PHP CGI through valgrind</h3>
<p>
To generate the valgrind log using PHP CLI/CGI,
@@ -48,6 +61,12 @@ and disable Zend memory manager.
This should put the log into php.log file in the current working directory.
</p>
+<p>
+ To valgrind the built-in web server, use the appropriate -S and -t
+ options to the CLI executable. Run your application via a browser and
+ review php.log for any valgrind errors.
+</p>
+
<h3>Running PHP Apache module through valgrind</h3>
<p>
@@ -75,7 +94,7 @@ and disable Zend memory manager.
</pre>
<p>
- This should put all the memory errors into into apache.log file.
+ Run your application via a browser. All the memory errors will be in apache.log.
</p>
<?php response_footer();