S
S
Sergey Burduzha2017-08-25 11:11:17
Apache HTTP Server
Sergey Burduzha, 2017-08-25 11:11:17

Why is the error 500 not displayed if the .htaccess is deliberately registered with a krakozyabra?

I installed LAMP in Ubuntu, I'm happy everything works.
I want to check how errors will be displayed if I corrupt the .htacces file in advance.
I created a .htaccess file at /var/www/test.site/public_html and wrote in it
# Setting up the Apache server
2 Options Indexes FollowSymlinks
3 DirectoryIndex index.php
4 salkfjlsakdfj
In the index.php file
<?php
2 ini_set('display_errors', one);
3 error_reporting(E_ALL);
4 ?>
5 <?php
6 /**
7 * @param $a
8 * @param $b
9 * return mixed
10 */
11 function getsum($a,$b){
12 return $a + $b;
13 }
14
15 $sum = getSum(5,5);
16 //echo $sum;
17
18
19 ?>
I restart php 'sudo systemctl restart apache2' but no errors appear, why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Burduzha, 2017-08-25
@serii81

It's strange, so many experts, but no one bothered to suggest that by default the .htaccess configuration file
is
ignored

A
artemmityushov, 2017-08-25
@artemmityushov

And from what they should be strewed then? In this case, the bad command will simply be ignored.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question