Registrations: Open.
Please register here.

Newbie Error Code Question

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
howedav
Posts: 4
Joined: Thu Apr 08, 2021 1:15 pm

Newbie Error Code Question

Post by howedav »

Hi,
On a Mac with just installed MAMP trying to learn php. When I make a minor error, say forget the closing ; I get a general error:

This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500

Not sure where to go to generate more specific errors.
Tried adding some ini_set commands to set error_reporting(E_ALL) at the beginning of my first practice file with no Joy.
Do I need an htaccess file or what.
Everything was installed by defaults and error free code works fine.
howedav
Posts: 4
Joined: Thu Apr 08, 2021 1:15 pm

Re: Newbie Error Code Question

Post by howedav »

As of this moment I see 35 people have looked at this issue but none has offered any suggestions. For the moment whenever I get an error I upload to a server in the cloud and get the errors reported OK. This is not ideal and so if someone could point me in the right direction I would very much appreciate it.
User avatar
mampsupportmod
Site Admin
Posts: 88
Joined: Wed Jan 20, 2021 3:06 am

Re: Newbie Error Code Question

Post by mampsupportmod »

Can you share your PHP error log?
howedav
Posts: 4
Joined: Thu Apr 08, 2021 1:15 pm

Re: Newbie Error Code Question

Post by howedav »

Where do I find this PHP error log. No errors are reporting to the screen when I run the code.
Thanks for your response.
David
howedav
Posts: 4
Joined: Thu Apr 08, 2021 1:15 pm

Re: Newbie Error Code Question

Post by howedav »

Finally did another search for this issue. Basically the MAMP supplied php.ini file comes with display_errors defaulted to Off.
One needs to find it and change it to On.
On my Mac, which took the default installation, it is located at:
Applications/MAMP/bin/php/php7.4.12/conf/php.ini
where the php version you are running can be found with phpinfo() and may differ from mine.
It seems this file has moved around quite a bit with the different versions.
Once the value is changed to ON be sure to cycle the MAMP server with STOP then START.
Now to keep learning PHP....... :mrgreen:
Last edited by howedav on Tue May 04, 2021 6:11 pm, edited 1 time in total.
Post Reply