简体   繁体   中英

MAMP pro PHP Error handling grief

So mamp pro is all set up using PHP 5.3.6 / cache is XCache, error handling set to Display Startup errors - write to All errors and warnings - to set to Display and Log both checked.

restart the server, intentionally wrote some code that should bring up an error..

<?php
   echo stupid;
?>

Yes this is all thats in the code. I get nothing, No errors. only in the log, I don't want to have my console open the entire time watching for errors. I want them printed on the screen.

The only way I can get this to work is by doing an INCLUDE on this code at the top of EVERY SINGLE PHP file.

error_reporting(E_ALL);
init-- yad yada ('display_errors', 'on');

From what I'm reading elsewhere, it seems like this is a big problem.. So how can I set up my mamp pro PHP.INI file to work properly and print directly to my browser?

I changed it in MAMP/bin/php/php5.3.6/conf/php.ini

You can change display_errors and display_startup_errors

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM