David Everly
2005-04-03 22:24:19 UTC
I would like to suggest that paths no longer are hard coded, but instead
configured at run time. This will allow more flexibility within Emilda.
For a rationale, please see:
http://www.onlamp.com/pub/a/onlamp/2005/03/31/packaging.html
Page Two (Configuration Techniques) of the above is especially relevant.
The configuration can be accomplished via apache mod_env's SetEnv
directive.
I've attached a patch based on emilda-1.2.2 that appears to accomplish
this. I'll also attach a sample emilda section of httpd.conf that can
be used to set these values. These are currently set for how the Debian
package is installed, but can be easily changed to work with where you
have installed emilda on your system.
The new variables are:
# What is the base url path to access emilda within the browser
# (used in src/perl/MARC.pl and src/perl/book_manager.pl). Example:
SetEnv emilda_alias_url_path /emilda
# What is the base url path to access emilda's cgi scripts
# within the browser (used in src/user_add.php, src/book_add.php,
# src/book_edit.php, src/pdf.php, and src/book_manager.php).
# Example:
SetEnv emilda_cgi_url_path /cgi-bin/emilda
# What is the directory that contains all the configuration files
# (used in src/lib/config.inc, src/lib/db.inc, src/perl/PDF.pl,
# src/perl/MARC.pl, src/perl/barcode.pl, src/perl/book_manager.pl,
# and src/setup.php). Example:
SetEnv emilda_config_dir /etc/emilda
# What is the directory that contains the emilda "private" perl
# module(s). This is used by src/perl/barcode.pl,
# src/perl/book_manager.pl, src/perl/MARC.pl, and src/perl/PDF.pl:
SetEnv emilda_perl_dir /usr/share/emilda/perl
# What is the directory that is writable by the web server and
# contains information related to the variable state of emilda (used
# by src/setup.php and src/index.php). Example:
SetEnv emilda_var_state_dir /var/lib/emilda
There may be better ways of doing this, but I wanted to at least show
one possible way.
Thanks,
Dave.
--
Encrypted Mail Preferred:
Key ID: 8527B9AF
Key Fingerprint: E1B6 40B6 B73F 695E 0D3B 644E 6427 DD74 8527 B9AF
Information: http://www.gnupg.org/
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
Information: http://www.expita.com/nomime.html
configured at run time. This will allow more flexibility within Emilda.
For a rationale, please see:
http://www.onlamp.com/pub/a/onlamp/2005/03/31/packaging.html
Page Two (Configuration Techniques) of the above is especially relevant.
The configuration can be accomplished via apache mod_env's SetEnv
directive.
I've attached a patch based on emilda-1.2.2 that appears to accomplish
this. I'll also attach a sample emilda section of httpd.conf that can
be used to set these values. These are currently set for how the Debian
package is installed, but can be easily changed to work with where you
have installed emilda on your system.
The new variables are:
# What is the base url path to access emilda within the browser
# (used in src/perl/MARC.pl and src/perl/book_manager.pl). Example:
SetEnv emilda_alias_url_path /emilda
# What is the base url path to access emilda's cgi scripts
# within the browser (used in src/user_add.php, src/book_add.php,
# src/book_edit.php, src/pdf.php, and src/book_manager.php).
# Example:
SetEnv emilda_cgi_url_path /cgi-bin/emilda
# What is the directory that contains all the configuration files
# (used in src/lib/config.inc, src/lib/db.inc, src/perl/PDF.pl,
# src/perl/MARC.pl, src/perl/barcode.pl, src/perl/book_manager.pl,
# and src/setup.php). Example:
SetEnv emilda_config_dir /etc/emilda
# What is the directory that contains the emilda "private" perl
# module(s). This is used by src/perl/barcode.pl,
# src/perl/book_manager.pl, src/perl/MARC.pl, and src/perl/PDF.pl:
SetEnv emilda_perl_dir /usr/share/emilda/perl
# What is the directory that is writable by the web server and
# contains information related to the variable state of emilda (used
# by src/setup.php and src/index.php). Example:
SetEnv emilda_var_state_dir /var/lib/emilda
There may be better ways of doing this, but I wanted to at least show
one possible way.
Thanks,
Dave.
--
Encrypted Mail Preferred:
Key ID: 8527B9AF
Key Fingerprint: E1B6 40B6 B73F 695E 0D3B 644E 6427 DD74 8527 B9AF
Information: http://www.gnupg.org/
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
Information: http://www.expita.com/nomime.html