-3

As I am using the local hosting of MAMPbut " There has been a critical error on this website" this is error is coming. What should I do?

1 Answers1

0

Diagnostic steps worth giving a shot, follow from top to bottom order;

  1. Is MAMP really running with Web server (and additionally the database server)?
  2. Do you see the default MAMP index/home screen?
  3. Put a simple HELLO WORLD HTML document to your project root and check if you can see it on browser
  4. Put a simple HELLO WORLD PHP script to your project root and check if you can see it on browser
  5. At this point, if everything above went well, it is definitely an issue with your actual PHP script, check the PHP error log file
  6. Put an INFO.PHP PHP script at your project root and check you have all the required extensions available for your PHP project
  7. Check if database connection is working (if required)
  8. At this point, I cannot imagine what else would go wrong, try PHP debugger (xDebug needs to be installed with MAMP and your PHP editor may need a configuration for this) with break points and step into each line of your PHP code with debugger.
Broken Arrow
  • 576
  • 3
  • 12