0

I am trying to debug an index.php file on my remote CentOS (Linux) Apache server. I load the file using an internet browser in my local PC.

When I try to load the website, I get the "HTTP ERROR 500", which persists as long as I don't remove the part from my index.php file, meaning that there is likely an error in PHP. However, I cannot find the error not knowing where it is or what is it about.

Things I have tried that didn't work:

Adding those lines after the start of the <?php code in the index.php

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

Modifying the php.ini file with

display_startup_errors = On
display_errors = On

Running the index.php file manually with Linux bash. Returned HTML content until it hit the part with the error. No error message.

In what ways can I have more details about the error?

brikas
  • 194
  • 1
  • 13
  • 2
    Does this answer your question? [500 Internal Server Error for php file not for html](https://stackoverflow.com/questions/17693391/500-internal-server-error-for-php-file-not-for-html) – Burhan Kashour Oct 20 '20 at 14:08
  • @BurhanKashour Yes. Although I didn't even need to work with .htaccess file. All I needed is to restart apache, since the config file is only reparsed after restart I guess. Thanks! – brikas Oct 20 '20 at 14:27

0 Answers0