Hallo zusammen,
ich habe ein Problem (denke mal Unverständnis meinerseits) mit Perl-Scripten unter xampp / os x.
Das folgende Script
#!/Applications/XAMPP/xamppfiles/bin/perl
print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">', "\n";
print "<html><head><title>CGI-Test</title></head>\n";
print "<body>hallo, das ist ein Test</body></html>\n";
lässt sich im Verzeichnis /Applications/XAMPP/cgi-bin nicht ausführen, laut dem Error-Log:
Options ExecCGI is off in this directory/Applications/XAMPP/xamppfiles/cgi-bin/test.pl
liegt es wohl daran, das ich in der Apache Konfiguration die Option ExecCGI für das CGI-Verzeichnis setze.
Das Problem:
in der httpd.conf (Verzeichnis Applications/XAMPP/etc) finde ich keinen Bereich der sich mit CGI befasst, wohl aber am Ende folgende beiden Zeilen:
#XAMPP
Include etc/extra/httpd-xampp.conf
Ich interpretiere das mal als Erweiterung der httpd.conf, und hab mir auch diese Datei angesehen. Allerdings weis ich beim besten Willen nicht wo ich dort was eintragen soll, um die Option ExecCGI zu setzen / zu erlauben.
Es mag sein, das ich einfach nur zu blöd dazu bin, jedoch sind mir diese Probleme von einer Apache / PhP Konfiguration unter Windoof unbekannt.
Die httpd-xampp.conf:
<IfDefine PHP>
LoadModule php5_module modules/libphp5.so
</IfDefine>
LoadModule perl_module modules/mod_perl.so
Alias /phpmyadmin "/Applications/XAMPP/xamppfiles/phpmyadmin"
<Directory "/Applications/XAMPP/xamppfiles/phpmyadmin">
AllowOverride AuthConfig Limit
</Directory>
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
AddType application/x-httpd-php .php .php3 .php4
XBitHack on
<IfModule perl_module>
PerlPostConfigRequire "/Applications/XAMPP/xamppfiles/etc/extra/startup.pl"
# mod_perl settings
<IfModule mime_module>
AddType text/html .pl
</IfModule>
<FilesMatch "\.pl$">
SetHandler perl-script
PerlResponseHandler ModPerl::RegistryPrefork
PerlOptions +ParseHeaders
</FilesMatch>
<Directory "/xampp/cgi-bin">
<FilesMatch "\.pl$">
SetHandler cgi-script
</FilesMatch>
</Directory>
# ASP settings
<IfModule mime_module>
AddType text/html .asp
</IfModule>
<FilesMatch "\.asp$">
SetHandler perl-script
PerlResponseHandler Apache::ASP
PerlSetVar Global .
PerlSetVar StateDir "/Applications/XAMPP/xamppfiles/temp"
</FilesMatch>
<Directory "/xampp/cgi-bin">
<FilesMatch "\.asp$">
SetHandler cgi-script
</FilesMatch>
</Directory>
</IfModule>
Hat jemand evtl. eine auch für einen nicht ganz so gescheiten Menschen verständliche Lösung?
Vielen Dank,
Arno Schmidt