Request to enable the `proc_open` function

Website URL

http://black.ct.ws/

Problem Description

In our PHP environment, the proc_open function is currently disabled (via the disable_functions configuration in php.ini). This prevents us from directly invoking external command-line tools (such as unzip, 7z, etc.), which in turn restricts the implementation of certain functionalities. For example, we have some business scenarios that require the use of external tools to handle file compression and decompression. The built-in PHP ZIP extension is unable to meet these complex requirements.

Business Requirements

We would like to re-enable the proc_open function so that we can invoke external command-line tools to accomplish the following tasks:

  1. File Compression and Decompression: Certain file formats (such as .rar or .tar.gz) cannot be processed by the built-in PHP extensions and require external tools (such as unzip, 7z, or tar).
  2. Custom Script Execution: We have some custom scripts (such as data processing scripts or third-party tools) that need to be invoked from PHP, and these scripts cannot be implemented using built-in PHP functions.
  3. Performance Optimization: In some cases, the processing speed and functionality of external tools may be superior to those of built-in PHP extensions, which can enhance system performance.

Security Measures

We understand that the disabling of proc_open is a security measure. Therefore, we commit to taking the following steps to ensure the security of the system:

  1. Code Auditing: We will conduct strict input validation and filtering in the code that uses proc_open to prevent command injection attacks.
  2. Limited Use: We will only use proc_open in necessary business scenarios and will clearly document the external commands being invoked and their purposes.
  3. Security Monitoring: We will regularly review the execution logs of the relevant code to promptly detect and address any potential security issues.

Request

We hope that you can assist us in re-enabling the proc_open function. The specific actions may include:

  1. Removing proc_open from the disable_functions configuration in the php.ini file.
  2. Reloading or restarting the PHP service to make the configuration effective.

We place great importance on the security of the system. If you have any suggestions or requirements regarding security, please let us know at any time, and we are willing to cooperate fully.

Thank you for your understanding and support! We look forward to your reply.

Best regards!

Welcome to the community.
Any PHP function related to accessing the shell is disabled in free hosting; this includes proc_open. Since we treat all free accounts the same, we will not enable it for individual accounts by request.

8 Likes

This has been asked before. Unfortunaitly, on the free hosting, its not possible to get custom changes made to the server enviroment on a case by case basis.

I don’t think proc_open is available on premium hosting either.

4 Likes

proc_open is disabled on premium hosting by default, but you can enable it if you need it.

Also, if you need something, please just concisely tell us what you need and why you need it. Your post reads like (and might be?) AI generated slop.

If you want to decompress files, you’ll have to make do with the PHP ZIP module. I don’t know what “complex requirements” you have that the module doesn’t work for you, but perhaps you can adjust the input files instead of trying to get extremely wide support for compression formats.

If you are going to deal with compressed files, please also keep note of the 10 MB file size limit on our hosting. So if you plan to deal with large archives, our hosting might not work for you anyway.

Finally, please understand that this is completely free hosting. We can’t do tailored services based on audits of specific websites for free, that’s just way too time intensive.

7 Likes

My forum is built on Flarum, and I need to enable the proc_open function to install extensions. Otherwise, I won’t be able to install some of them.

Please read this thread

7 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.