How to tell if .htaccess is working

Changing PHP settings through htaccess rules requires using the php_value or php_flag options (like you do with the register_globals). Just dumping the PHP settings into the .htaccess file isn’t valid code. I would fully expect this code to just crash your site. Seeing how it doesn’t crash, I strongly suspect the code is never actually reached.

Checking your site, the .htaccess file where you’ve added this settings is located in the uploads folder. That means these rules are only executed when you try to access the /uploads URL on your site. The rest of your site, which is where all the PHP requests go through, do not have these lines, so even if the configuration lines do work, they’re not working because they are in the wrong place.

Actually, this might be the reason why the “Uploads folder not publicly accessible” check may be failing. I’m guessing the entire folder is unreachable because the folder contains invalid .htaccess rules. If that check expects to see a 403 Forbidden error, but it receives a 500 Internal Server Error error, or a 302 redirect to the 500 error page, that could be causing that check to fail.


So, in short:

  • Please restore the .htaccess file in the uploads folder to the original contents, the current contents do not work.
  • The allow_url_fopen setting is already enabled. But we’ve configured it as On, not on. PHP interprets these settings as being the same, but your software does not, which is a bug in the software.
7 Likes