What are common reasons for encountering a Server Error 500 when using PHP, and how can they be resolved?

A common reason for encountering a Server Error 500 when using PHP is a syntax error in the code. To resolve this issue, carefully review your code for any syntax errors such as missing semicolons, parentheses, or curly braces.

// Example code with a syntax error causing Server Error 500
<?php
echo "Hello, World"
?>

// Corrected code with the missing semicolon added
<?php
echo "Hello, World";
?>