Php. ini configuration-hide PHPSESSION and X-Powered-By: PHP/5.2.1 in the PHP response header

Source: Internet
Author: User
Php. ini configuration --- hide the PHPSESSION and X-Powered-By: PHP/5.2.1 information in the response header of the PHP program. Although this is safe, I personally think this is useless, but sometimes there is still such a requirement in actual applications. as for our current project, we don't want to expose what development we use, so this php. ini configuration --- hide PHPSESSION and X-Powered-By: PHP/5.2.1 in the response header of a PHP program
Although I personally think this does not play a role in terms of security, sometimes there is still such a demand in practical applications. as for our current project, in fact, we don't want to expose what we use for development. for some people who are not very proficient in technology, this can be perfunctory. I said that I am a java developer and may not know it!

In the php. ini file, set:
Find
Expose_php = On

Change
Expose_php = Off

In this way,
X-Powered-By: PHP/5.2.1

Find
Session. name = PHPSESSID

Changed:
Session. name = SESSIONID

In this way, no PHPSESSID words will appear in the header information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.