How to disable PHP from executing certain system commands

Source: Internet
Author: User
Many commands, such as shell_exec, system, passthru, and popen, are system-related cooperation. if the VM is open to users, or if the system permission is not set completely, it will inevitably cause a lot of harm. To meet this requirement, you only need to set the disble_function option in php. ini to set the command to prohibit execution. Example: If disble_functionphpinfo requires multiple commands, use commas to separate them. for example, many commands, such as shell_exec, system, passthru, and popen, are system-related cooperation. if the VM is open to users, or, if the system permission is not set completely, it will inevitably cause great harm.
To meet this requirement, you only need to set the disble_function option in php. ini to set the command to prohibit execution.
Example:
Disble_function = phpinfo
Use commas to separate multiple commands, for example:
Disble_function = shell_exec, system, passthru, popen

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.