500 Internal Server Error for php file not for html

0 votes

There are barely 4-5 static pages on my website. Both index.html and index.php are present. Index.html is operating well. When I switch to index.php, a 500 Internal Server Error message appears. I'm not sure where I went wrong.

It's showing Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

If I use the .htaccess file with empty, It's showing Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And if I give ../contact-us.php, it's showing correctly. Can someone please help me with this?

Jul 22, 2022 in PHP by narikkadan
• 63,680 points
795 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer
0 votes
1 answer

Error:Internal server errordisplay in PHP via htaccess only

Hello @kartik,  Try adding this line .htaccess: php_flag display_startup_errors ...READ MORE

answered Sep 1, 2020 in PHP by Niroj
• 82,880 points
828 views
0 votes
1 answer

Error:PDOException SQLSTATE[HY000] [2020] No such file or directory in php?

Hello, I checked php -i | grep pdo and noticed ...READ MORE

answered Apr 2, 2020 in PHP by Niroj
• 82,880 points
1,394 views
0 votes
1 answer

ERROR: The file 'wp-config.php' already exists

Hello, Try to display the website first on ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,880 points
5,199 views
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

answered Aug 4, 2020 in PHP by Niroj
• 82,880 points
4,267 views
0 votes
0 answers

How to open php files through localhost?

I am creating a student management program ...READ MORE

Jun 10, 2022 in PHP by narikkadan
• 63,680 points
1,216 views
0 votes
0 answers
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,489 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
818 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP