dariyoosh Posted February 18, 2013 Share Posted February 18, 2013 Hello everyone OS: Fedora Core 17 (x86_64) Browser: Firefox 18.0 PHP version: 5.4.11 Apache version: 2.2.22 I would like to know whether it is possible to print different kinds of PHP errors (at least parsing errors) in the browser screen. for example <?php myVariable = 12 ?> This should give a syntax/parse error because there is not $ before the variable name nor the ";" at the end of the statement. I modified the file /etc/php.ini by removing comments for the two following options: . . . display_errors=On ; Default Value: On ; Development Value: On ; Production Value: Off ; display_startup_errors ; Default Value: Off ; Development Value: On ; Production Value: Off error_reporting=E_ALL ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT . . . Then I restarted the apache service # service httpd restart Yet, I don't see any change, and whenever there is an error, I just have a blank page in the browser. Any idea? What are the further actions to be taken in order to print errors and warnings on the screen? (Of course, I want to do this only for development/training purpose, here we are not talking about a production environment) Thanks in advance, Regards, Dariyoosh Quote Link to comment Share on other sites More sharing options...
dariyoosh Posted February 18, 2013 Author Share Posted February 18, 2013 Well, it seems that I made a mistake. I edited the file using vim and when I saw ; display_errors= I thought this was the line to modify and uncomment, but in fact that was just the description section in the "Quick Reference". The actual line to modify is actually further down in the file. Sorry for my mistake, it works now! Regards, Dariyoosh Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 18, 2013 Share Posted February 18, 2013 For future reference you can view your actual settings by doing php_info() or an ini_get() so you can check if you changed anything Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted February 18, 2013 Share Posted February 18, 2013 phpinfo Quote Link to comment Share on other sites More sharing options...
dariyoosh Posted February 18, 2013 Author Share Posted February 18, 2013 Thank you very much both of you for your time and your attention to my question. I will pay attention to phpinfo() for future reference. For just viewing the PHP directives, I wrote the following which provides the info <?php phpinfo(INFO_CONFIGURATION); ?> Regards, Dariyoosh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.