problem with akeeba backup on shared windows host using iis

This forum is for issues with installing Joomla! 3.x on IIS webservers.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
dlondon
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Mar 15, 2014 11:45 pm

problem with akeeba backup on shared windows host using iis

Postby dlondon » Sun Jul 27, 2014 1:23 pm

Hi,

I'm working on a joomla site in IIS 8 on Windows Server 2012 Standard. The host is shared with others who have their own accounts and spaces on the server

PHP version is 5.4

I have installed akeeba backup which is written in php but produces the following error when it attempts to back up the files:

Warnings
Unreadable directory E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot
Unreadable directory E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot
Unreadable directory E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot

(I've changed my account name in the message to a generic "myaccount" for this posting)

I installed IIS on my Windows 7 machine at home and installed PHP. MySQL and Joomla. I then installed akeeba backup via joomla and it backed up with no problems

I contacted akeeba support after rummaging through their support documents and tickets. I was advised that it might be one of 2 things:

- lack of permissions. A quick test was done by giving the Everyone group Full permission on wwwroot and below
- need to assign a value to the php directive "open_basedir" which is not set by the systemwide php.ini
I was able to set this in my local "user_ini.filename" which is called ".user.ini".
I tried
open_basedir = "E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot"
and
open_basedir = "E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot\"

For both of the above there was no change - still got the same error

I looked at the akeeba code (it's on GIT) and saw that the spot that generates the message "Unreadable directory" comes from a bit of code that makes use of "DirectoryIterator" in PHP

I made a test bit of code on my Windows 7 machine and ran it successfully there. I do not do the more sophisticated try-catch that akeeba does as I actually wanted to see what the error was

My code is

<?php
$di = new DirectoryIterator("E:/HostingSpaces/myaccount/test.myaccount.org.au/wwwroot/");
$dir = array();
$files = array();
foreach ($di as $file)
{
# Assigns only the file name. Alternatively, we can use $file->__toString()
$tmp = $file->getFilename();
if($file->isDir())
{
# Ignore the "dot" directories
if($file->isDot() === false)
{
$dir[] = $tmp;
}
} else {
$files[] = $tmp;
}
}
print_r($dir);
print_r($files);
?>

When I ran it on the Shared Windows Server I got a "IIS 8.0 Detailed Error - 500.0 - Internal Server Error"

I searched and searched but couldn't find anything that helped. The detailed info implied PHP was having the problem:

Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP via FastCGI (*.php)
Error Code 0x00000000

So I enabled PHP error messages using:
log_errors = off;
display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;

This then with my test script produced the following error message:

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(E:/HostingSpaces/myaccount/test.myaccount.org.au/wwwroot/,E:/HostingSpaces/myaccount/test.myaccount.org.au/wwwroot/): Access is denied. (code: 5)' in E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot\ListFiles.php:3 Stack trace: #0 E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot\ListFiles.php(3): DirectoryIterator->__construct('E:/HostingSpace...') #1 {main} thrown in E:\HostingSpaces\myaccount\test.myaccount.org.au\wwwroot\ListFiles.php on line 3

I don't get it. We've tried adding Everyone with Full premissions to that directory and below. Surely that should have fixed the issue? In addition the actual Application Pool User which is HOSTNAME\testmyaccountorgau_web has full rights to wwwroot and below.

..................................................................................

- Given that the test code and akeeba work fine on my windows 7 machine, is there something in IIS on the Shared Host that might be causing this sort of problem?
- Does anyone have any suggestions on what else to look at/try to solve this problem?

Regards,

David

RenniePet
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Fri Nov 19, 2010 2:22 am
Location: Denmark
Contact:

Re: problem with akeeba backup on shared windows host using iis

Postby RenniePet » Sun Dec 31, 2017 1:03 pm

@David, I realize this is 2 1/2 years old, but I'm having the same or a similar problem with Akeeba backup on a Windows / IIS system. Did you find out what the problem was?

RenniePet
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Fri Nov 19, 2010 2:22 am
Location: Denmark
Contact:

Re: problem with akeeba backup on shared windows host using iis

Postby RenniePet » Sun Dec 31, 2017 1:47 pm

@David, never mind, I've figured it out. It's basically due to a bug in PHP for Windows:

https://bugs.php.net/bug.php?id=43817

The bug was first reported in 2008. The good news is that in October 2017 they finally got around to assigning a programmer to fix it.

(And Microsoft can't understand why they lost the server software battle to Linux.)

RenniePet
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Fri Nov 19, 2010 2:22 am
Location: Denmark
Contact:

Re: problem with akeeba backup on shared windows host using iis

Postby RenniePet » Mon Jan 01, 2018 8:09 am

1. Should a moderator maybe move this to the IIS-specific part of this support forum?

2. For what it's worth, I've added a workaround, at least for my way of running Joomla under IIS, to a blog article I'd previously written:

https://renniestechblog.com/information ... ew-website

See the last section, "One more step, due to a bug in PHP for Windows".


Return to “Joomla! 3.x on IIS webserver”

Who is online

Users browsing this forum: No registered users and 1 guest