Most of you understand how functions work in various programming languages, one moment from the whole heap is the return value. That is, we can call a valid function. intval() - returns an integer, but accepts anything horrible! There are such moments that if the argument is incorrect, the function may produce a special answer.

So we come to the essence of the question, we have a .htaccess file and a line in it, it can be any! In this case, I wanted to write this php_value output_buffering blablabla . How does apache respond to such a line?

Additional Information:

php.ini :

 output_buffering=On 

php.ini: output_buffering=On

Option 1:

.htaccess

 php_value output_buffering blablabla 

disabled buffer

Option 2:

.htaccess

 php_value output_buffering 4096 

included buffer


php.ini: output_buffering=off

Option 1:

.htaccess

 php_value output_buffering blablabla 

disabled buffer

Option 2:

.htaccess

 php_value output_buffering 4096 

included buffer

Conclusion: the answers are identical, although when output_buffering=On and we write garbage in .htaccess we get deactivation ... why?

  • If an error occurs in htaccess, apache2 usually returns an error code 500 - Stanislav Grot
  • 2
    You can try and look at the result before asking a question. - Alex
  • one
    @Alex I tried, but I'm not satisfied with what I got at the output and this is not an error with the number 500 - MaximPro
  • 2
    @MaximPro in this case, we recommend to indicate in the question the information that you have tried and that you received. But if you got something, then what is the question? maybe you should reformulate it? - Alex
  • one
    By the way, consider the http-server as a function, and its config as an argument is not entirely correct. Something is returned to you after all on the http-request, and not on the config. - Nick Volynkin

1 answer 1

  • You will see a page with error 500.
  • Either "clean sheet" depends on the settings.

.

  • You did not guess! Neither one nor the other! - MaximPro
  • 2
    We are not here on the program what where when. We are not guessing here but sharing our experience and solving issues. If your question has a hidden meaning, then I have nothing more to answer. - Dmitry Nail
  • nginx has the nginx -t option, by which nginx checks the config and returns the result. Surely the Apache has something like that? - Nick Volynkin
  • Come on, why are you so serious? It is necessary to calmly approach the issue. Why did I even ask ?! In order to find out what the php_value directive will return? But as you wrote - not at all what I got. In my case, when I wrote nonsense, my directive took the value 0. I find it difficult to explain! - MaximPro
  • Updated the post, you can have a look, if you know something about this, write - MaximPro