0

I am using MAMP on macos . Inside the .htdocs file ı put some php files to open in the browser . Although file names and path are correct login.php file is working well but on the other hand signup.php file gives me an error (http500 / localhost is currently unable to handle this request.). What could be the reason about that ? Any solution

vees1
  • 21
  • 6
  • A 500 error is a generic error message and covers pretty much every single thing that can go wrong with a PHP script. Check your server error logs to find out the exact error message. – aynber Apr 23 '21 at 18:14

1 Answers1

0

You can enable display error for php by adding this code to at the beginning of your code (you can also enable error display globally in php.ini by setting display_errors = on).

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

after that you can trace the error.

Mohammad Salehi
  • 565
  • 1
  • 12
  • 33
  • I wrote this part inside php tags and outer of php tags but nothing is changed . Also tried adding echo before ini_set however Only HTTP500 error is being showned to me. – vees1 Apr 24 '21 at 09:42
  • @vees1 try to edit your php.ini or .htaccess. https://stackoverflow.com/a/21429652/6934036 – Mohammad Salehi Apr 24 '21 at 10:54