Hi,
I'm working with SME7RC1 and I'm butchering the httpd.conf template. Not sure how, but I get an error message when expanding the template. If anybody has any ideas, I'd appreciate it.
[root@monkey ~]# expand-template /etc/httpd/conf/httpd.conf
ERROR in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/95AddType00PHP2ibays: Program fragment delivered error <<Bad name after PHPSafeModeIncludeDir' at /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/95AddType00PHP2ibays line 20.>> at template line 1
ERROR: Template processing failed for //etc/httpd/conf/httpd.conf: 1 fragment generated errors
at /sbin/e-smith/expand-template line 45
Line #20 looks like this:
my $safe_mode_include_dir = db_get_prop(\%accounts, $key, PHPSafeModeIncludeDir');
The 95AddType00PHP2ibays file looks like this.
{
my $status = $php{status} || 'disabled';
if ($status eq 'enabled')
{
use esmith::AccountsDB;
my $adb = esmith::AccountsDB->open_ro();
foreach my $ibay ($adb->ibays)
{
local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
if ($dynamicContent eq 'enabled')
{
$OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
$OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n";
$OUT .= " AddType application/x-httpd-php-source .phps\n";
# Set the sandbox within which PHP is confined to play
my $basedir = $ibay->prop('PHPBaseDir')
|| ("/home/e-smith/files/ibays/" . $ibay->key . "/");
my $safe_mode_include_dir = db_get_prop(\%accounts, $key, PHPSafeModeIncludeDir');
if ($safe_mode_include_dir)
{
$OUT .= " php_admin_value safe_mode_include_dir $safe_mode_include_dir\n";
}
$OUT .= " php_admin_value open_basedir $basedir\n";
$OUT .= "</Directory>\n";
}
}
}
}