הדדי רמי | :םש |
---|---|
11:07 20/12/02 | :ךיראת |
develope CGI in win/apache run on linux/apache | :אשונ |
I found something useful, that can save you and your developers time:
how to maintain and execute the same cgi file on windows and unix.
1. First of all the first line of the script(on windows machine also)
should be:
#!/usr/local/bin/perl --
the "--" is for ctrl-M replacements (line termination modes is
different on unix and windows machines) - that allows to edit the cgi
file in windows editor, and upload it even in binary mode to the unix
machine.
2. The httpd.conf should be set with:
ScriptInterpreterSource registry
3. the "cgi" file extension, should be associated with perl, as
follows:
"G:\Perl\bin\perl.exe" "%1" %*
Now the windows apache, will execute scripts, by it's file
association, and the unix apache by the first line in file.