[Koha-devel] Another patch for running Koha 2.2.0RC2 under mod_perl

Urbez Santana Roma urbez at linuxupc.upc.es
Wed Nov 24 16:16:02 CET 2004


El Martes, 23 de Noviembre de 2004 13:00, Andrés Tarallo escribió:
> We discovered yesterday that we've forgot to apply this patch. This bug
> was fixed and submited by ernesto silva a while ago, we're resubtting it
> again since it wasn't commited.
>
>
> Please test it under both modperl and traditional CGI. We think that the
> bug solved here might also appear under traditional cgi.
>
> Andres

For this problem, i have used in my modified scripts the next lines:
----------------------------------------------------------------------------
	if ($^O eq "MSWin32")
	{
		$ENV{'SCRIPT_FILENAME'}=~ m#(.*/)[^/]+$#;
		chdir($1);
	}
----------------------------------------------------------------------------
The problem, with windows, is that mod_perl uses the
path of "Document and Settings" not the path from actual
script, as Unix.
These lines in C4::Context   or  before the opendir relative 
solve the problem using directly:
	opendir(DIR, "../value_builder") 
or another open's of any file in the same directory of scripts.
This system use i for all project with perl + (unix or windows)
apache systems, and include it in the init script.
-- 
################################################
#- Urbez Santana i Roma -
#- Email: urbez at linuxupc.upc.es
#- Private Web:  http://linuxupc.upc.es/~urbez/
################################################




More information about the Koha-devel mailing list