Home > Article > Backend Development > What to do if something goes wrong after php encryption
Solution to the error after php encryption: 1. Modify the content to "$where .= " AND o.order_status = '".$filter[composite_status]."' ";"; 2. Set it to not Just encrypt it.
#The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.
php What should I do if an error occurs after encryption? Why can't encrypted files be used?
First of all, we must learn to eliminate the causes of errors. Now we will explain and communicate with you about common problems for reference:
1. Binary problem?
Because the data encrypted by our system is a binary data package, when the encrypted file is used on a LINUX server, the FTP file must be uploaded in binary, otherwise the file will be damaged and cannot be used.
2. Has the file been modified?
The problem is the same as 1. Modification of encrypted PHP files is prohibited. Even if one byte is modified, it will be executed or an error will occur. Therefore, modification of encrypted files is prohibited.
3. Missing closing tag?
For good habits, PHP needs to end with ?>. Some program errors are caused by the lack of this tag. Please maintain the integrity of the program.
4. Regarding the problem of using namespace?
If you use: namespace in your program, you need to keep no code in front of the namespace code, including Comment, otherwise the encrypted file will not be executed.
5. Why can the free version be used, but an error occurs when it is encrypted to VIP and cannot be used?
The unique function of VIP version is to obfuscate, scramble and encrypt the original PHP source code. Because there may be problems with some statements or code compatibility (the probability is very low, we are always updating). When encountering such a situation, you can use the following methods to troubleshoot. Encryption method: only obfuscation PHP obfuscation: similar obfuscation (random), and then the encrypted PHP source code is debugged and executed. If an error occurs again, the specific error line can be displayed with the code, and specific variables can be set to unencrypted data. You can also send such files to us for debugging and upgrading system compatibility.
6. For extended encryption (DLL), ZEND encryption, ionCube9 encryption?
These encryptions require modifying the PHP version corresponding to php.ini to install the PHP extension, otherwise they cannot be used. Please check carefully and also pay attention to binary upload issues.
7. After encryption, garbled characters are displayed and the program does not execute?
If extended encryption is used, it is usually caused by the extension not being installed. Another situation is that some files in ThinkPhp are loaded in template mode, and such files cannot be encrypted.
8. Things to note about one code.
$where .= " AND o.order_status = '$filter[composite_status]' ";
This code will become
$where .= " AND o.order_status = '$filter[$GLOBALS['phpjiami_decrypt']['I1I1IIIIl1l1lll1lIl11I11ll']]' ";
after encryption, which will cause it to fail to run. There are two solutions.
Solution 1:
Modify the code to: $where .= " AND o.order_status = '".$filter[composite_status]."' ";
Solution 2:
#Just set it to not encrypt.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if something goes wrong after php encryption. For more information, please follow other related articles on the PHP Chinese website!