Joomla installation on Windows with IIS

Posted on 2007-07-20
Last Modified: 2013-12-13
I've got a web page to setup, and headquarters supplied me with finished design of Joomla 1.0.12 portal with their explicit request, that only the supplied code is to be installed.
Ok, I installed Joomla, but since I run WINDOWS server 2003 with IIS and PHP/MySQL (both very latest 5.x versions) I faced some weird problems.

First, when installing, Joomla says that its config file, configuration,php, is Unwriteable. Ok, doesn't matter, I thought, I'll upload it if necessary...and I continued with setup. Any suprisingly, when automatic installation was finished, Joomla wrote configuration.php file just fine!
Well, great, that's even better.

Front page was accesible, admin pages too, so I changed few settings, as recommended by headquarters, and it all seems fine.

BUT then problems begun:
I need to install some additional modules in Joomla, but Joomla says, that /modules and other necessary folders are Unwriteable, so it refused to install modules.
Ok, I checked my setup again:
- checked permissions: IUSR_MACHINENAME had read/write/modify permissions
- permissions inheritance was enabled
- I removed READ_ONLY attributes from all files and folders
- in IIS I enabled "Parent Paths"
- restarted IIS

...but Joomla stil says most of folders are Unwriteable!
Only configuration.php and d:\PHP\SESSIONS folder are reported to be Writeable, but they have EXACT the SAME PERMISSIONS as other folders, which are reported to be Unwriteable!?!?

I am kind of experienced with installing PHP/MySQL, I am also PHP programmer and I programmed a lot of scripts, which deal even with Windows config files, and all are working fine.
I checked with FILEMON utility for file activity within Joomla portal to find out, which files Joomla tries to open but fails, BUT I found NO UNSUCESFULL file write or file change procedures! Which means that Joomla does not even try to write the file - instead it obviously somehow detects that file is, by Joomla's opinion, Unwriteable and it skips writing without trying to write a file.

Any idea what else to check?
Question by:Andrej Pirman
    LVL 5

    Expert Comment

    Is PHP running in safe mode?
    LVL 22

    Expert Comment

    Try stopping all services/applications you can before doing the install.
    An open file can be read-only and has nothing to do with the OS permissions.
    LVL 18

    Author Comment

    by:Andrej Pirman
    Hmmm....No, PHP is not running in safe mode, but I have some functions disabled in PHP.INI for security reasons (DISABLED: show_source, system, shell_exec, passthru, exec, popen, proc_open).

    Stopping services or applications should NOT be sollution, since I doubt any common file is open, and I doubt even more that any other service could interact with same files as Joomla does. I've restarted IIS few times, and I'll try it without these DISABLED functions in PHP.INI, that's my final guess for now.
    LVL 18

    Author Comment

    by:Andrej Pirman
    Nope...Just checked with followong modifications:
    - added EVERYONE permissions to read/write/modify
    - removed DISABLED functions in PHP.INI
    But Joomla still *THINKS* all these are Unwriteable!?
    LVL 18

    Accepted Solution

    I found the BUG in PHP is_writable() function, which might report WRONG results regarding write permissions. For those who use WINDOWS platform, here is the improved function is__writable() for PHP (note double underscores "__" in function name!). Function provided by legolas558 d0t users dot sf dot net and was originally posted on

    function is__writable($path) {
    //will work in despite of Windows ACLs bug
    //NOTE: use a trailing slash for folders!!!

        if ($path{strlen($path)-1}=='/') // recursively return a temporary file path
            return is__writable($path.uniqid(mt_rand()).'.tmp');
        else if (is_dir($path))
            return is__writable($path.'/'.uniqid(mt_rand()).'.tmp');
        // check tmp file for read/write capabilities
        $rm = file_exists($path);
        $f = @fopen($path, 'a');
        if ($f===false)
            return false;
        if (!$rm)
        return true;
    LVL 18

    Author Comment

    by:Andrej Pirman
    Since I found the sollution myself, and it was far from suggested sollutions, I might refound points for later use.
    Thanks to both who tried to participate in sollution.
    LVL 1

    Expert Comment

    Closed, 500 points refunded.
    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now