Difference between revisions of "Sven/PHP"
From Organic Design wiki
m |
|||
| Line 1: | Line 1: | ||
| − | |||
==Debugging PHP== | ==Debugging PHP== | ||
In MediaWiki there is a profiler that can be set, see [[MW:How to debug]]. | In MediaWiki there is a profiler that can be set, see [[MW:How to debug]]. | ||
| Line 6: | Line 5: | ||
==PHP errors== | ==PHP errors== | ||
| − | To see PHP errors, add this to the very top of <tt>[[Manual:LocalSettings.php|LocalSettings.php]]</tt>: | + | To see PHP errors, add this to the very top of <tt>[[MW:Manual:LocalSettings.php|LocalSettings.php]]</tt>: |
<source lang="php"> | <source lang="php"> | ||
error_reporting(E_ALL); | error_reporting(E_ALL); | ||
ini_set("display_errors", 1); | ini_set("display_errors", 1); | ||
</source> | </source> | ||
Revision as of 21:34, 8 December 2007
Debugging PHP
In MediaWiki there is a profiler that can be set, see MW:How to debug.
Debuggers generally use a W:Stack trace. This can be approximated by using print and die statements in sections of code.
PHP errors
To see PHP errors, add this to the very top of LocalSettings.php:
error_reporting(E_ALL);
ini_set("display_errors", 1);



