[SOLVED] 1and1 auto_prepend_file and php.ini not recursive

Print this post Email this post

1and1 has been giving users a hard time by removing more and more feature that you can use on .htaccess. I used to use the php_value for auto_prepend_file value but then found out you can use php.ini in the folder.

A few things to note about this:

  • php.ini is visible as text file, so you need to create .htaccess to prevent it to be seen by using the files directive like
    <Files php.ini>
    Order allow,deny
    Deny from all
    </Files>
  • I didn’t realize this in the beginning, but php.ini is not recursive

As a solution, I change the php.ini to .user.ini and change the Files directive in .htaccess to reflect the new file instead.

Be Sociable, Share!

Leave a Reply

You must be logged in to post a comment.