Search code examples
phpplesk

Add my php.ini file from my localhost to Plesk 12.0.18 for Windows


I have tried a billion options about this issue and spent loads of time with godaddy's support but it seems like there is no answer anywhere on internet. If you check my phpinfo http://goliax.com/phpinfo.php you will see what does it say about the location of the php.ini in use but I have no access to any such location. Godaddy fail to provide me with RDC (remote desktop connection) which I read was another way to access the file. The only way to change something on the php.ini file in use in plesk is through an option in plesk itself and it does not even work the way it is expected.


Solution

  • you can place httpdocs/.user.ini file with content like:

    [PHP]
    max_input_time=120
    open_basedir="C:/Inetpub/vhosts/domain.win2012.tld\;C:\Windows\Temp\"
    post_max_size=16M
    short_open_tag=off
    upload_max_filesize=16M
    

    For additional domains you should place .user.ini inside of domain's web root like:

    .
    ..
    httpdocs/ <-- this is web root of subscription
    addon-domain.com/ <-- this is web root of addon domain inside subscription
    

    Pay attention that only "per directory" PHP directives will has effect, you can found more information in PHP docs for php.ini levels.

    Also, in plesk domain's PHP settings there are additional directives(they will be placed in Windows registry):

    plesk additional php ini directives

    Unfortunately, in Plesk 12.0 you can't change system level php.ini settings via Plesk UI.

    Since Plesk 12.5 you can change all php.ini UI: plesk change system php.ini