Now user.ini gives you control over php settings for your site

Michael PhillipsOften someone coming from a *nix/Apache background will ask us why their php.ini files aren’t having any effect on their site. The problem is php.ini doesn’t work on IIS/Windows servers.

But we’ve made a change to the Windows 2008/IIS 7 servers that allows you to upload your own user.ini file, in order to specify php settings for your account.

If you’ve used a php.ini file on a *nix server, this is the same idea. Just create a text file named user.ini in the root of your account. The file can include php settings such as:

display_errors = On
max_execution_time = 500

These settings will be changed for your site only. While most of these settings are safe to change, the user.ini file does give you a lot of control over how php works for your site, so use your best judgement as to what you want to change change.

If you make a change that causes problems with your site, simply remove the line(s) causing trouble and re-upload the file. There is a five minute server cache for user.ini changes, so you may not see your changes until a few minutes after uploading.

Again, this is only for IIS 7 servers. If you are still on IIS 6, you can migrate your site to IIS 7 in Control Panel.

3 thoughts on “Now user.ini gives you control over php settings for your site

  1. For anybody who wants to try this and is struggling:
    The filename has to be
    .user.ini
    It’s not going to work without the dot.
    Additionally it is not possible to add/change php extensions.

    So my question is:
    Could you guys please add or uncomment the line
    extension=php_pdo_sqlite.dll
    in the main php.ini?
    Can’t see any disadvantage for other users.

    Thank you for your help,
    Govinda

    1. Govinda, as you may be aware, it’s not as simple as commenting out that line in the global php.ini. The PDO_SQLITE extension would have to be compiled into the php installations on every server. And unfortunately, we just haven’t seen any demand for it, so it’s not likely we’re going to add it any time soon.

      1. Hi mjp,

        thank you for your fast reply!
        Actually I wasn’t aware a recompile would be necessary.
        According to the documentation on http://php.net/manual/en/pdo.installation.php
        and also if you download the current or even the archived php version 5.3.6 all the common pdo binaries for windows are already included.
        But I see that it’s still an effort to change the setting on all servers for a single user – so I just hope the demand will increase in the future 🙂

        Greetings,
        Govinda

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.