Boojum Posted December 28, 2012 Posted December 28, 2012 When I tried to enable Hotlink Protection through CPanel, I got this error: "Hotlink Protection There was an error while enabling hotlink protection. Show Details Apache detected an error in the Rewrite config. Syntax error on line 2 of /home/squortc/public_html/.htaccess.wPvgA9KbyWMvOKBOc2mrwl_EUPM8ncKo: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration Please try again." (Note: the "Show Details" link doesn't work.) Now, the line in question was inserted in my .htaccess file by an admin to enable PHP includes without compromising security, and I hesitate to tamper with it. What do I need to reset to correct this conflict? Quote
TCH-Thomas Posted December 28, 2012 Posted December 28, 2012 I would submit a ticket and ask the techs to look into it. Link in my signature. Quote
TCH-Bryan Posted December 28, 2012 Posted December 28, 2012 Hi Boojum, Thank you for taking time to contact TCH to explain this issues that have occurred recently. I have resolved this issue and updated your ticket. The issue can be resolved as follows. 1) Open the .htaccess file and search for the following line and comment it out. suPHP_ConfigPath /home/username The above line is added if you have a custom php.ini file You can comment out that line by adding a '#' to its beginning as follows. #suPHP_ConfigPath /home/username 2) Save the .htaccess file and try to enable Hotlink protection through cPanel once again and it will be successful. 3) Once the redirects are set, do not forget to revert the changes in .htaccess file. Uncomment that line and save the .htaccess again. Quote
TCH-Bryan Posted December 28, 2012 Posted December 28, 2012 If you have a custom php.ini file in the domain and you want the PHP directives to propagate to all sub folder, this can be achieved by a better method as follows You can place your php.ini file in your Home Directory (/home/username/) yourself and then add this code to your primary .htaccess (/home/username/public_html/.htaccess). Be sure to replace "username" with your actual cPanel user name suPHP_ConfigPath /home/username Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.