summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2007-05-23 12:06:45 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2007-05-23 12:06:45 +0000
commit4e665a79b321a5a83b8a87efb9fb8ab10cf061dd (patch)
tree9668870c05ff630548a6267a60e0520deedb4a64
parent3a500543eda93bfe54bb578976d20c86e2d55ac1 (diff)
include smarty path
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@269 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xbin/ldap2apache10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache
index ff15a5c..38b69a8 100755
--- a/bin/ldap2apache
+++ b/bin/ldap2apache
@@ -141,6 +141,12 @@ clients.each{ |c|
end
end
+ phpincludepath = [
+ '.',
+ "#{home}/include",
+ "/usr/share/php",
+ "/usr/share/pear",
+ "/usr/share/php/smarty/libs" ].map { |d| File.exists?(d) ? d : nil }.compact.join ':'
if ssl
crtfile = "/etc/ssl/certs/apache-#{server_name}.pem"
@@ -215,7 +221,7 @@ clients.each{ |c|
config << " php_value magic_quotes_gpc 0"
config << " php_admin_value open_basedir \"#{basedir}\"" if basedir
config << " php_admin_value safe_mode_include_dir \"#{safemode_include}\"" if safemode_include
- config << " php_value include_path \".:#{home}/include:/usr/share/php:/usr/share/pear\""
+ config << " php_value include_path \"#{phpincludepath}\""
config << " </IfModule>"
end
config << " Options #{docdiroptions}" if docdiroptions != ""
@@ -247,7 +253,7 @@ clients.each{ |c|
phpini << "sendmail_path = \"/usr/sbin/sendmail -t -i -f #{server_admin}\""
phpini << "allow_url_fopen = 0"
phpini << "magic_quotes_gpc = 0"
- phpini << "include_path = \".:#{home}/include:/usr/share/php:/usr/share/pear\""
+ phpini << "include_path = \"#{phpincludepath}\""
inilp = c['o'][0] +"-"+ server_name
throw "Clash on #{server_name} of client#{c['o'][0]} for phpinifiles" if phpinifiles[ inilp ]