1

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 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.

4
  • 1
    did you restart your web server (probably apache httpd) after changing php.ini? Commented May 23, 2011 at 22:00
  • Did you edit the right php.ini? Commented May 23, 2011 at 22:15
  • @KingCrunch I have created a php.ini file on document_root and on a subfolder of it Commented May 23, 2011 at 22:21
  • what system are you on? windows? linux? mac? Commented May 23, 2011 at 22:25

3 Answers 3

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

great, I can see the error in this way. but I am wondering: witch is the "correct" php.ini I put a copy of it on the document_root (the parent folder of my test folder) but nothing changes, I cant obtain the error.
2

You can also add

php_flag display_errors on

To apache's sites-available or htacess

Just remember to restart apache

1 Comment

actualy it was my final solution. but no need to restart editint on .htaccess
2

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())..

2 Comments

thanks, all this configurations bring to the light Configuration File (php.ini) Path Loaded Configuration File Scan this dir for additional .ini files Additional .ini files parsed none of my edited php.ini(s) were on this pointed paths
Thats the point: You just edit the wrong one(s) ;) You can edit the file specified by Loaded Configuration File, or you put an own *.ini-file into Scan this dir for additional .ini files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.