Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4589
  • Last Modified:

Joomla installation on Windows with IIS

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?
Andrej Pirman
Andrej Pirman
1 Solution
Is PHP running in safe mode?
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.
Andrej PirmanAuthor Commented:
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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Andrej PirmanAuthor Commented:
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!?
Andrej PirmanAuthor Commented:
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 php.net.

function is__writable($path) {
//will work in despite of Windows ACLs bug
//NOTE: use a trailing slash for folders!!!
//see http://bugs.php.net/bug.php?id=27609
//see http://bugs.php.net/bug.php?id=30931

    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;
Andrej PirmanAuthor Commented:
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.
Closed, 500 points refunded.
Community Support Moderator

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now