- I am asked to add the Front-end activation codes into a php.ini or .htaccess file under the site root folder. But I can't find a file like that. What should I do?
- If the file mentioned in Anti-Hacker Activation doesn't exit at the proper location, you need to create one first and then add the activation codes in.
Case 1: you are asked to do the activation via the .htaccess file. Please under the root folder of the to_be_protected site find out the original htaccess.txt file and rename is as .htaccess. Then add the front-end activation codes to the end of the file. Also, copy the original .htaccess file into the site administrator folder and copy the back-end activation codes to its end.
Case 2: you are asked to do the activation via a php.ini or php5.ini file (whether to use a php.ini or php5.ini, please refer to FAQs: How to determine if PHP is running as CGI or apache module?).
Generally you can easily create an empty php.ini file under the target path and add the activation codes in, however, on some secific server, some server global settings might not be loaded in this way, so we suggest you to create the php.ini with the server global configurations first.
To generate a php.ini with global settings, You may:
1. Ask the host to provide a sample php.ini file;
2. Use our php.ini generation tool to do it. Please download the tool here: Media:php_generator.zip. Extract it and open it. Input the path of the global loaded php.ini based on the instruction in the file and upload the file to your site root on the server.
Then save the page as a "php.ini" file. Now you get the global php settings. Copy the file into your site root and add the front-end activation codes to the end. And also copy the original php.ini file to the site administrator folder and add the back-end activation codes to the end (make sure the auto_prepend_file function is as "auto_prepend_file = ").
If you have no idea about the global php.ini path, please make sure there is no php.ini under the site root folder and then refer to the article to use a phpinfo function to get the loaded php configuration file path, FAQs: How to determine if PHP is running as CGI or apache module?