14,958
edits
(→MySQL) |
(→PHP) |
||
| Line 87: | Line 87: | ||
==== PHP ==== | ==== PHP ==== | ||
===== native error logging ===== | |||
* [http://www.php.net/ PHP] log: check the configuration file: /etc/php.ini (the location of configuration file can be verified by [http://php.net/manual/en/function.phpinfo.php phpinfo()] ) | * [http://www.php.net/ PHP] log: check the configuration file: /etc/php.ini (the location of configuration file can be verified by [http://php.net/manual/en/function.phpinfo.php phpinfo()] ) | ||
(for production site) unmark theese lines in the php.ini and restart Apache service | (for production site) unmark theese lines in the php.ini and restart Apache service | ||
| Line 98: | Line 99: | ||
</pre> | </pre> | ||
* [http://php.net/manual/en/function.error-log.php PHP: error_log - Manual] | * [http://php.net/manual/en/function.error-log.php PHP: error_log - Manual] | ||
===== capture the result of var_dump ===== | |||
ob_start | |||
* [http://stackoverflow.com/questions/139474/how-can-i-capture-the-result-of-var-dump-to-a-string php - How can I capture the result of var_dump to a string? - Stack Overflow] | * [http://stackoverflow.com/questions/139474/how-can-i-capture-the-result-of-var-dump-to-a-string php - How can I capture the result of var_dump to a string? - Stack Overflow] | ||
<pre> | <pre> | ||
| Line 104: | Line 107: | ||
$result = ob_get_clean(); | $result = ob_get_clean(); | ||
error_log($result, 3, 'd:/wamp/logs/php_error.log'); | error_log($result, 3, 'd:/wamp/logs/php_error.log'); | ||
</pre> | |||
QuickForm | |||
<pre> | |||
$result = var_dump($some_variable); | |||
$form->addElement('html', $result); | |||
</pre> | </pre> | ||