Author Topic: Error loading template - looking in installer directory  (Read 19260 times)

Offline texas12

  • Newbie
  • *
  • Posts: 9
Error loading template - looking in installer directory
« on: June 25, 2010, 02:31:59 PM »
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:
Code: [Select]
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:

Code: [Select]
SERVICE CURRENTLY NOT AVAILABLE!

Error No. [501]


The corresponding error from the log file is:

Code: [Select]
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:

Code: [Select]

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?

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Experiencing Same Problem on Win Server 2008
« Reply #1 on: July 24, 2010, 12:45:01 PM »
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?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Error loading template - looking in installer directory
« Reply #2 on: July 24, 2010, 03:25:05 PM »
Does you install path include "installer" in it?

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Error loading template - looking in installer directory
« Reply #3 on: July 24, 2010, 03:54:19 PM »
I don't see "installer" in either the INSTALL_PATH or $include_path.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Error loading template - looking in installer directory
« Reply #4 on: July 24, 2010, 03:58:08 PM »
Well that was my best guess based my logs above, I am no windows expert.

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Error loading template - looking in installer directory
« Reply #5 on: July 24, 2010, 11:49:31 PM »
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?

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Error loading template - looking in installer directory
« Reply #6 on: July 25, 2010, 12:06:15 AM »
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?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Error loading template - looking in installer directory
« Reply #7 on: July 25, 2010, 03:00:01 AM »
Did you delete the installer directory after you finished installing, it maybe loading a global path from there.

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Error loading template - looking in installer directory
« Reply #8 on: July 25, 2010, 05:28:15 PM »
Quote from: WHairstonLOI;28914
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:


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

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Error loading template - looking in installer directory
« Reply #9 on: July 25, 2010, 05:41:52 PM »
I know but I was asking about the installer directory itself, not what was inside of it.

Offline WHairstonLOI

  • Jr. Member
  • **
  • Posts: 14
Error loading template - looking in installer directory
« Reply #10 on: July 25, 2010, 06:12:59 PM »
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.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Error loading template - looking in installer directory
« Reply #11 on: July 26, 2010, 08:21:08 AM »
Try running RoundCube with any installer folder.

Offline texas12

  • Newbie
  • *
  • Posts: 9
Error loading template - looking in installer directory
« Reply #12 on: July 26, 2010, 11:34:12 AM »
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.

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
Error loading template - looking in installer directory
« Reply #13 on: July 26, 2010, 12:23:48 PM »
did you disable the installer in main config??

Offline texas12

  • Newbie
  • *
  • Posts: 9
Error loading template - looking in installer directory
« Reply #14 on: July 26, 2010, 01:04:11 PM »
Yes

$rcmail_config['enable_installer'] = false;