[Bug 912] Changed - special_characters.php fails to find required lib/Registry.php

bugs@bugs.horde.org bugs@bugs.horde.org
Tue, 19 Mar 2002 19:27:55 -0400


http://bugs.horde.org/show_bug.cgi?id=912

*** shadow/912	Tue Mar 19 06:42:21 2002
--- shadow/912.tmp.32667	Tue Mar 19 19:27:55 2002
***************
*** 3,9 ****
  Version: 2.0 Stable
  Platform: PHP Code
  OS/Version: HP-UX
! Status: RESOLVED   
  Resolution: INVALID
  Severity: minor
  Priority: P4
--- 3,9 ----
  Version: 2.0 Stable
  Platform: PHP Code
  OS/Version: HP-UX
! Status: REOPENED   
  Resolution: INVALID
  Severity: minor
  Priority: P4
***************
*** 76,78 ****
--- 76,140 ----
  ------- Additional Comments From jan@horde.org  03/19/02 06:42 -------
  This is some really odd problem with your php. It works fine here and with 
  everyone else too.
+ 
+ ------- Additional Comments From lodder@yacc.com.au  03/19/02 19:27 -------
+ Hi Jan, 
+ 
+ There is always a first ;-) 
+ 
+ OK, I think I have it sussed... (for both 911 and 912) 
+ 
+ My setup is that a have a webroot of say /some/folder 
+ horde sits under that and imp, turba under horde. 
+ To use imp I have to reference http://myhost.domain/horde/imp 
+ 
+ By default when I login (with the current distribution unchanged) my browser 
+ ends up displaying a blank page with a url like 
+ http://my.domain/horde/maintenance.php?module=imp&getvars=actionID%3D105 
+ 
+ My initial diagnosis was incorrect but that still leaves the problem. 
+ 
+ For #911 
+ In horde/maintenance.php, base.lib gets included by specifying a relative path 
+ 
+ include_once './lib/base.php'; 
+ 
+ It appears that on MY system when base.php is included with a relative path, 
+ the __FILE__ value is set to the string commencing with the first "/". 
+ In this case that is "/lib/base.php". This means that HORDE_BASE gets set to 
+ "/lib/.." which is obviously incorrect. When base.php tries to find 
+ Registry.php 
+ 
+ require_once HORDE_BASE . '/lib/Registry.php'; 
+   
+ it results in the error message 
+ "Failed opening required '//lib/../lib/Registry.php'" 
+ 
+ When I change the above inlude_once line in maintenance.php to the following 
+ two lines it works out the correct path. 
+ 
+ @define('HORDE_BASE', dirname(__FILE__)); 
+ include_once HORDE_BASE . '/lib/base.php'; 
+ 
+ In this case, HORDE_BASE gets set to /some/folder/horde which is correct for 
+ the duration. 
+ 
+ Whether this is a HP-UX specific problem or a problem that was introduced when 
+ I 
+ built Apache and PHP I do not know. This is my first attempt at using PHP. 
+ Perhaps you can enlighten me? 
+ 
+ #912 similar 
+ 
+ 
+ Thanks for your patience and apologies if I wasted your time. 
+ 
+ 
+ I suspect that if you modify the files as I have it will also work for you.... 
+ 
+ Cheers 
+ 
+ 
+ Ged 
+ 
+ Nothing but grief....