Error Internal server errordisplay in PHP via htaccess only

0 votes

I am testing a website online.

Right now, the errors are not being displayed (but I know they exist).

I have access to only the .htaccess file.

How do I make all errors to display using my .htaccess file?

I added these lines to my .htaccess file:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on

And the pages now display:

Internal server error
Sep 1, 2020 in PHP by kartik
• 37,520 points
885 views

1 answer to this question.

0 votes

Hello @kartik,

 Try adding this line .htaccess:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/PHP_errors.log

Hope it works!!!

Thank You!!

answered Sep 1, 2020 by Niroj
• 82,840 points

Related Questions In PHP

0 votes
1 answer

How to change php version in htaccess in server?

Hello, To switch to PHP 4.4: AddHandler application/x-httpd-php4 .php To ...READ MORE

answered Nov 4, 2020 in PHP by Niroj
• 82,840 points
2,947 views
0 votes
0 answers

500 Internal Server Error for php file not for html

There are barely 4-5 static pages on ...READ MORE

Jul 22, 2022 in PHP by narikkadan
• 63,600 points
816 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,840 points
1,471 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,840 points
4,358 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
23,134 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,840 points
3,030 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,973 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,840 points
44,956 views
0 votes
1 answer

Error:Enabling error display in PHP via htaccess only?

Hello, To turn the actual display of errors ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,840 points
1,393 views
0 votes
1 answer
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