开发者

obtain errors from PHP execution

in the same folder I have:

php.ini

display_errors  = "stdout"     ; Also tryed: "STDOUT"  0  and  1   

this info from phpinfo()

PHP Version 5.3.2-1ubuntu4.9
display_errors      Off     Off  ;never changes no matter what I put开发者_C百科 in php.ini
error_reporting   22527   22527

and this test.php script

<?php
error_reporting(E_ALL);
echo "start test<br>";
typoErr();
echo "never here<br>";
?>

I have tested alternatives and I cant find the way to see errors on the browser.


probabily you're editing the wrong php.ini try use ini_set('display_errors', 1); at the very beginning of test.php it should overwrite your ini configs.


You can also add

php_flag display_errors on

To apache's sites-available or htacess

Just remember to restart apache


Taken from the comments:

@KingCrunch I have created a php.ini file on document_root and on a subfolder of it

You can not assume, that the interpreter will just use any php.ini. Look at the output of phpinfo(). Somewhere at the beginning there is noted, which php.ini you must use. Remember to restart the webserver after every change and that the cli-interpreter usually takes another php.ini than the interpreter used by the webserver (php -i is the cli equivalent of phpinfo())..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜