From 4e665a79b321a5a83b8a87efb9fb8ab10cf061dd Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 23 May 2007 12:06:45 +0000 Subject: include smarty path git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@269 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- bin/ldap2apache | 10 ++++++++-- 1 file 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 << " " 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 ] -- cgit v1.2.3