Mostly, I would like to use the same "shebang" on my scripts, and also use
the same relative paths to my files. For the remote server (Dreamhost) Perl
scripts I use #!/usr/bin/perl -T, while the xampp version requires
#!"\xampp\perl\bin\perl.exe". And for PHP scripts I use
#!"C:\xampp\php\php-cgi.exe", although it appears that it might not be
needed.
I moved the perl and php folders to a new folder called C:\usr\, and I
verified that my scripts work fine using the command line. But they do not
work in the browser (I get a file not found error). So I think the browser
and localhost use directory locations determined by the config files.
So far I have found this in the C:\xampp\apache\conf\httpd.conf file:
ServerRoot "C:/xampp/apache"
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
# XAMPP specific settings
Include "conf/extra/httpd-xampp.conf"
# Perl settings
Include "conf/extra/perl.conf"
And the httpd-xampp.conf file has:
<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "C:\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "C:\\xampp\\php"
SetEnv PHPRC "C:\\xampp\\php"
SetEnv TMP "C:\\xampp\\tmp"
UnsetEnv PERL5LIB
</IfModule>
and the C:\xampp\apache\conf\extra\perl.conf file has:
LoadFile "C:/xampp/perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so
LoadModule apreq_module modules/mod_apreq2.so
PerlSwitches -T
PerlPostConfigRequire "C:/xampp/apache/conf/extra/startup.pl"
I can see from this several places where I will need to make changes, but I
don't want to screw things up.
My other problem seems to be that now the browser can't find files located
in certain directory paths where I know them to be, so it is probably
because the localhost is no longer configured correctly. There seems to be a
problem if I try to open an HTML file in the cgi-bin folder, which is
probably because the permissions do not allow a file read there (only
execute).
Also, my Dreamhost server is configured as I thought was correct with the
cgi-bin folder at the same level as my SCGBG or other website folders, while
the xampp implementation has the cgi-bin folder as C:\xampp\cgi-bin while
the SCGBG folder is C:\xampp\htdocs\SCGBG and it will not allow the use of
C:\xampp\htdocs\cgi-bin for my server-side scripts. I want to be able to use
a path such as:
"../SCGBG/SCGBG_Outings.htm"
to write HTML pages to that directory where other HTML pages can link to it.
I have not had much luck on the xampp forums
http://www.apachefriends.org/f/viewtopic.php?f=16&t=44200&p=172682#p172682
or on other newsgroups who sent me here. I'd appreciate some guidance as to
how I should proceed, as the documentation I have found seems confusing.
Thanks,
Paul