Home  >  Article  >  Backend Development  >  File encryption processes in three PHP environments

File encryption processes in three PHP environments

藏色散人
藏色散人forward
2021-12-02 14:19:184976browse

php file encryption operation process

Different PHP debugging environments have slightly different encryption.

The following mainly introduces the encryption of php files in the three environments of phpstudy2018, xampp and phpstudy-pro under windows.

 01 Common process for different environments

 1. Use VirboxProtector to encrypt the interpreter (php-cgi.exe or httpd.exe)

 2 .Use DSProtector to encrypt php

 3.Replace the original interpreter with the encrypted interpreter (php-cgi.exe or httpd.exe)

 4.Restart the Apache service. Run the program

 02phpstudy2018

 1. Encrypt php-cgi.exe

Confirm the PHP application version of the environment and open the corresponding PHP environment directory Download php-cgi.exe and drag php-cgi.exe into VirboxProtector.

Find php-cgi.exe in the php environment directory, drag php-cgi.exe into VirboxProtector, set the encryption option, open the ds button, and set the password.

After the settings are completed, click Maintain the selected item to generate two files: php-cgi.ssp.exe and php-cgi.exe.ssp

2. Open DSProtector and check the php file encryption.

Click [Open DSProtector] on the encryption options page, the configuration file will automatically load the generated php-cgi.exe.ssp, drag in the 1.php to be encrypted, click Start Maintenance, and it will prompt success. php file maintenance successful.

After 1.php is successfully encrypted, the source file will be backed up to 1.php.bak. 1.php is the encrypted file. You can use the editor to check that the code of 1.php becomes garbled.

3. Replace php-cgi.exe

Rename the encrypted php-cgi.ssp.exe to php-cgi.exe and replace the original php-cgi.exe

4. Restart phpstudy

After replacing php-cgi.exe, click to restart phpstudy to run the encrypted php file

03phpstudy-pro, small leather panel , Pagoda Panel

Cooperate with the encryption process of phpstudy2018, find the php-cgi.exe of the php version used, and the following processes are consistent. After replacing php-cgi.exe, restart the Apache service.

 04XAMPP

For PHP projects using the XAMPP environment, the service uses apache, and httpd.exe needs to be encrypted and replaced.

1. Find httpd.exe in the apache folder and encrypt httpd.exe

Drag httpd.exe into VirboxProtector, open the [ds] button at the encryption option, and set the password , and then click [Maintain selected items], httpd.exe.ssp and httpd.ssp.exe.

will be generated. 2. Encrypt the php file

Click [Open DSProtector], the configuration file will be Automatically load httpd.exe.ssp, drag the php file in, click Start Maintenance, and prompt success

After index1.php is successfully encrypted, the source file will be backed up to index1.php.bak, and index1.php After encrypting the file, you can use the editor to check whether the code of index1.php becomes garbled.

3. Replace httpd.exe

Rename the encrypted httpd.ssp.exe to httpd.exe and replace the original httpd.exe

4. Restart apache service

In the xampp panel, stop the Apache service and then start it. You can run the encrypted php file.

 05 Summary

The encrypted PHP can run normally without affecting website performance. Unable to decompile encrypted php files.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of File encryption processes in three PHP environments. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete