Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla 2.1 Could not enable plugins in IIS

Hello,
I have installed Vanilla 2.1 on IIS 7.5, I could not enable the plugins also my config.php is not writable even though I gave 777 permission for that conf folder and all the files in conf folder,Instead of that lot of tmp files created in that folder.

Any help will be appreciated.

Thanks

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Hi!

    What error is given when you try to enable plugins (you may have to inspect the AJAX response to get the error).

    If you are unable to update any configuration, this is an issue with your server configuration. You need to make sure your php user can see and write to the /conf, /cache, and /uploads folders.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

    peregrineUnderDog
  • IgantiusIgantius New
    edited July 2014

    Hello,
    Thanks for the reply.
    When I tried to enable the plugin, there is no error message for most of the plugins, I got the following message
    {"FormSaved":false,"DeliveryType":"BOOL","Data":"MQ==","InformMessages":[],"ErrorMessages":"","RedirectUrl":""}
    but plugins not enabled, but for some of the third party addons I got "Internal server Error"

    Regarding user permission,
    I have given "Full Control" using plesk control panel for following users

    1) Plesk IIS Anonymous Account (IUSR_sitename)
    2) Default Plesk application pool user (IWAM_plesk(default))

    Do we need to give permission to any other users?

    Thanks

  • peregrineperegrine MVP
    edited July 2014

    not sure if system calls or posix calls will work on your OS but you could try.

    put this file in your forum folder and call it owners.php

    <?php

       echo "<table>";
       echo "<tr><td>";
       echo "id:";
       echo "</td>";
       echo "<td>";
       echo system("id");
       echo "</tr><td>"; 
       echo "Whoami:";
        echo "</td>";
        echo "<td>";
       echo system("whoami");
        echo "</td>"; 
        $filename = "./conf/config.php";
        echo "<tr><td>"; 
        echo "File owner for $filename:";
        echo "</td><td>";
        $owner = (posix_getpwuid(fileowner($filename)));
        echo $owner['name'];
        echo "</td></tr>"; 
    
    
        echo "<tr><td>";
        echo "File group:";
        echo "</td><td>";
        $group = (posix_getgrgid(filegroup($filename)));
        echo $group['name'];
        echo "</td></tr>"; 
    
    
        echo "<tr><td>";
        echo "File permissions:";
        echo "</td><td>";
        echo substr(sprintf('%o', fileperms($filename)), -3);
        echo "</td></tr>";  
    
       $filename = "./conf";
        echo "<tr><td>";
        echo "File owner for $filename:";
        echo "</td><td>";
        $owner = (posix_getpwuid(fileowner($filename)));
        echo $owner['name'];
        echo "</td></tr>"; 
    
    
        echo "<tr><td>";
        echo "File group:";
        echo "</td><td>";
        $group = (posix_getgrgid(filegroup($filename)));
        echo $group['name'];
        echo "</td></tr>"; 
    
    
        echo "<tr><td>";
        echo "File permissions:";
        echo "</td><td>";
        echo substr(sprintf('%o', fileperms($filename)), -3);
        echo "</td></tr>";
        echo "</table>";
    

    then run it: http://putyourforumdomainnamehere.com/yourforumfolder/owners.php

    and post the results. it will show you ownership and permissions of conf config.php and who runs the php process.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • Hi,
    Thanks for response.
    When tried to above code I got the following error
    "Fatal Error: Call to undefined function posix_getpwuid() "
    I think POSIX extension is not available on Windows.

  • peregrineperegrine MVP
    edited July 2014

    comment out the lines with posix in it and the line below it

    e.g. line 17 and 18, 25 and 26, 40 and 41, and and 48 and 49.

    you will at least get some info.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • IgantiusIgantius New
    edited July 2014

    Hi Peregrine,
    Thanks for your response
    I got the following output when execute owners.php in development system(Windows/XAMPP) and server(windows/IIS7)

    File owner for ./conf/config.php:
    File group:
    File permissions: 666

    File owner for ./conf:
    File group:
    File permissions: 777

    But in development system(Windows/XAMPP) I can enable plugins, but in server (Windows/IIS7.5) I am not able to enable plugins

  • peregrineperegrine MVP
    edited July 2014

    try this and post the entire output:

    <?php
    
           echo "<table>";
           echo "<tr><td>";
           echo "id:";
           echo "</td>";
           echo "<td>";
           echo system("id");
           echo "</tr><td>"; 
           echo "Whoami:";
            echo "</td>";
            echo "<td>";
           echo system("whoami");
            echo "</td>"; 
            $filename = "./conf/config.php";
            echo "<tr><td>"; 
            echo "File owner for $filename:";
            echo "</td><td>";
          //  $owner = (posix_getpwuid(fileowner($filename)));
            $owner['name'] = (fileowner($filename));
            echo $owner['name'];
            echo "</td></tr>"; 
    
    
            echo "<tr><td>";
            echo "File group:";
            echo "</td><td>";
         //   $group = (posix_getgrgid(filegroup($filename)));
            $group['name'] = (filegroup($filename));
            echo $group['name'];
            echo "</td></tr>"; 
    
    
            echo "<tr><td>";
            echo "File permissions:";
            echo "</td><td>";
            echo substr(sprintf('%o', fileperms($filename)), -3);
            echo "</td></tr>";  
    
           $filename = "./conf";
            echo "<tr><td>";
            echo "File owner for $filename:";
            echo "</td><td>";
         //   $owner = (posix_getpwuid(fileowner($filename)));
            $owner['name'] = (fileowner($filename));
            echo $owner['name'];
            echo "</td></tr>"; 
    
    
            echo "<tr><td>";
            echo "File group:";
            echo "</td><td>";
        //    $group = (posix_getgrgid(filegroup($filename)));
            $group['name'] = (filegroup($filename));
            echo $group['name'];
            echo "</td></tr>"; 
    
    
            echo "<tr><td>";
            echo "File permissions:";
            echo "</td><td>";
            echo substr(sprintf('%o', fileperms($filename)), -3);
            echo "</td></tr>";
            echo "</table>";
    

    I don't use windows servers.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • IgantiusIgantius New
    edited July 2014

    Hi Peregrine,
    Thank you once again for your response.
    This is the output I got while execute your code

    id:

    Whoami: jehovahjireh\iwam_plesk(default) jehovahjireh\iwam_plesk(default)

    File owner for ./conf/config.php: 0

    File group: 0

    File permissions: 666

    File owner for ./conf: 0

    File group: 0

    File permissions: 777

  • peregrineperegrine MVP
    edited July 2014

    the routine that is having problems on your setup is this

    in vanilla/library/core/class.configuration.php around line 1199

         $TmpFile = tempnam(PATH_CONF, 'config');
                $Result = FALSE;
                if (file_put_contents($TmpFile, $FileContents) !== FALSE) {
                   chmod($TmpFile, 0775);
                   $Result = rename($TmpFile, $this->Source);
                }
    
                if ($Result && function_exists('apc_delete_file')) {
                   // This fixes a bug with some configurations of apc.
                   @apc_delete_file($this->Source);
                }
    

    http://stackoverflow.com/questions/10656662/running-php-on-iis-file-permissions-are-correct-but-uploads-dont-work

    http://serverfault.com/questions/321388/php-files-and-folders-permissions-under-iis

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDoghgtonight
  • I don't use windows servers. but maybe someone else can help you further with the output and info you provided.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • Thanks peregrine. Let me check with the links given by you and let you know if this works fine. Thank you very much for your help.

    peregrineUnderDog
  • ShadowdareShadowdare r_j MVP
    edited July 2014

    Make sure that the root folder of the website also has write permissions for the IIS user. Try giving permissions for the user called IUSR if other users don't work.

    Add Pages to Vanilla with the Basic Pages app

    hgtonightUnderDog
  • Hello I have checked with permission, I have give 777 to root.
    But still I am not able to enable plugin also, while install in the conf folder many .tmp files are created and config.php size 0. Any help will be appreciated!

  • Found this thread after searching. I may have clues to help with resolution - here's my current problem, which includes links to how it was solved in the past on 2.0.18.x. But I still need help in figuring out how to fix it on 2.1.6:

    http://vanillaforums.org/discussion/28687/plugin-disable-enable-not-working-after-upgrade

Sign In or Register to comment.