Jump to content
Killersites Community
KeithHunt

PHP display_errors

Recommended Posts

Verified the version of PHP that I am using in MAMP, which is 7.2.10.  Chose the corresponding php.ini doc.  Searched for display_errors and found that it was off.  changed to on.  Saved doc.  turned off Apache server.  Closed MAMP.  Restarted MAMP and server.  Reloaded the php doc for this lesson ch4-lesson-1.php.  Still not showing the errors?!.  What am I doing wrong?

Found a work around on Stackify by pasting in the following code into the PHP doc:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

This works, but only on a doc by doc basis.

 

Share this post


Link to post
Share on other sites

Hmmm ... Sounds like a MAMP specific setting issue. Worst case, you can put that code into a separate file, and use PHP includes to include it.

  • Like 1

Share this post


Link to post
Share on other sites

Do you think it would help to uninstall, then reinstall MAMP?  Should I maybe switch to using WAMP, or one of the other servers?  Are any of them beginner friendly?

 

(Yeah...guess, using PHP includes would be good practice. LOL.)

Edited by KeithHunt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×