Roundcube Community Forum

 

Error loading template - looking in installer directory

Started by texas12, June 25, 2010, 02:31:59 PM

Previous topic - Next topic

texas12

I have Roundcube setup on IIS 7 with PHP 5.2 via FastCGI on Windows Server 2008 R2.  I know this isn't a supported configuration, but I'm hoping I can find some help here.

The only change I had to make beyond the basic installation instructions was to edit where INSTALL_PATH is set to the root directory in the iniset file.

That line now reads:
if (!defined('INSTALL_PATH')) {
  define('INSTALL_PATH', 'D:/clients/webmail/');
}


I passed all of the /installer/ tests and removed that folder, but when I try to actually run the package, I get a 501 error. Specifically, the error message reads:

SERVICE CURRENTLY NOT AVAILABLE!

Error No. [501]


The corresponding error from the log file is:

PHP Error: Error loading template for login in D:\clients\webmail\program\include\rcube_template.php on line 375 (GET /)

I then fired up ProcessMonitor (file system tracer utility for all running processes) to find out what was going on behind the scenes and found the following lines before the error is triggered:


1:00:32.7883136 PM php-cgi.exe 3568 CreateFile D:\clients\webmail SUCCESS Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: ***, OpenResult: Opened
1:00:32.7883563 PM php-cgi.exe 3568 QueryDirectory D:\clients\webmail\installer NO SUCH FILE Filter: installer
1:00:32.7883938 PM php-cgi.exe 3568 CloseFile D:\clients\webmail SUCCESS
1:00:32.7885712 PM php-cgi.exe 3568 CreateFile D:\clients\webmail\installer NAME NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: ***
1:00:32.7886720 PM php-cgi.exe 3568 CreateFile D:\clients\webmail\installer\skins\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: ***
1:00:32.7887407 PM php-cgi.exe 3568 CreateFile D:\clients\webmail\installer\skins\default\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: ***
1:00:32.7888034 PM php-cgi.exe 3568 CreateFile D:\clients\webmail\installer\skins\default\templates\ PATH NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: ***
1:00:32.7888721 PM php-cgi.exe 3568 CreateFile D:\clients\webmail\installer\skins\default\templates\login.html PATH NOT FOUND Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, Impersonating: ***


As you can see, instead of looking in the D:\clients\webmail\skins\ directory, PHP is looking in the D:\clients\webmail\installer\skins directory. When it can't find the skin there, the error is triggered.

Any ideas on how I can fix this?

WHairstonLOI

I am experiencing the same problem with the same files on a Windows Server 2008 (not R2). I'm using PHP 5.2.1.1 via FastCGI, IIS7, and MS SQL Server 2008 Express database running Roundcube 0.4beta.

I had some issues during installation that were only resolved by replacing the relative pathnames with absolute pathnames in INSTALL_PATH. Could this be a similar problem?

SKaero

Does you install path include "installer" in it?

WHairstonLOI

I don't see "installer" in either the INSTALL_PATH or $include_path.

SKaero

Well that was my best guess based my logs above, I am no windows expert.

WHairstonLOI

I've temporarily gotten this to work by copying the \bin, \plugins, \program and \skins folders underneath the \installer folder and deleting the original contents of \installer. :confused:

Obviously, this is NOT ideal, but it does allow me to successfully login and use RoundCube with my hMailServer.

It seems that something is referring to \installer in either one of the scripts or in one of the configuration files. I've searched for hours, but can't see anything obvious.

Perhaps someone a little more skilled than me in PHP will know what to suggest?

WHairstonLOI

OK, I've spoken too soon.

My "workaround" only works if I immediately load RoundCube after running the installer. If I wait a few minutes and let the web site process die due to inactivity, then return to RoundCube, I'm back to the 501 error.

However, I CAN run the installer again (without changing anything) and then immediately load and run RoundCube again.

I think there's some environment variable that is being set by the installer that the main RoundCube scripts are using to determine where things are. This might also explain why everything appears to be "tied" to the \installer folder.

Any ideas?

SKaero

Did you delete the installer directory after you finished installing, it maybe loading a global path from there.

WHairstonLOI

Quote from: WHairstonLOI;28914I've temporarily gotten this to work by copying the \bin, \plugins, \program and \skins folders underneath the \installer folder and deleting the original contents of \installer. :confused:

As I said, I deleted the original contents of \installer.

SKaero

I know but I was asking about the installer directory itself, not what was inside of it.

WHairstonLOI

Sorry, I misunderstood your question.

I have tried several things. First, I left the original folder in place and just deleted the contents. Second, I tried deleting the original folder and creating a new folder named \installer. I appear to get the same results either way.

It appears the only way I can get into the program is to copy of the original contents of \installer from the distribution archive back into \installer, then run the installation (without changing any settings or creating new config files), then immediately run RoundCube with the installer files still in place and the other folders copied beneath \installer (as previously described). Once I delete the original \installer files, I can't get RoundCube to start at all - just a HTTP 501 error.

SKaero

Try running RoundCube with any installer folder.

texas12

I have been eagerly following this thread in hopes of finding a solution.

I have tried to run RC with the installer folder deleted and I receive the same result.

dziobak

did you disable the installer in main config??

texas12

Yes

$rcmail_config['enable_installer'] = false;