You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Glen Stormbind <gl...@nuws.net> on 2002/09/15 17:50:20 UTC

[users@httpd] CGI/PERL setup issue 2.0.40/Win32

Please be patient and keep explanations simple as I am a novice. In the
interest of completeness, I have included full details regardless of
whether I think they are relevant.

I have installed 2.0.40/Win32 on WinXP Pro to test scripts locally
before adding them to my remote server (Apache/Linux)

The server is working but I cannot get CGI/PERL scripts to work.

Symptoms: 
Requests for .pl scripts returns the source code
Requests for .cgi scripts returns 'download file' prompt
Requests for HTML files in cgi-bin directory causes DNS failure
Requests for HTML files in any other directory works fine

# Changes I have made to httpd.conf

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

# I want to use .htaccess files because that's what my remote
# server is setup to accept and keeping things as similar as
# possible makes it easier for me to understand

AllowOverride Options

# Windows doesn't allow files to have no name so .htaccess is
# not allowed

AccessFileName ht.access
<Files ~ "^\ht.">
    Order allow,deny
    Deny from all
</Files>

# End of changes

My script is in directory /search/ so I have placed a .htaccess (or
ht.access) file in that directory. It reads:

AddHandler cgi-script cgi pl
Options +ExecCGI

I cannot connect to the local server by FTP so do not know how to change
CHMOD. I would appreciate it if someone could explain how to do this
using WinXP Network Folders. I don't know if CHMOD'ing is required for
WinXP servers.

Further, I don't know the path to PERL that goes in the first line of
the CGI/PERL scripts or even if WinXP requires this.

I have installed only Apache but as mod_SSI is working, I assume mod_CGI
or mod_PERL must also have been installed. I do not know how to see
which mods are installed.

There you go, I did say I was a complete novice! :)

Thanks for your time,
--Glen



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] CGI/PERL setup issue 2.0.40/Win32

Posted by Glen Stormbind <gl...@nuws.net>.
Thanks Joshua :)

> > # I want to use .htaccess files because that's what my remote
> > # server is setup to accept and keeping things as similar as
> > # possible makes it easier for me to understand
> >
> > AllowOverride Options
> 
> Well, that AllowOverride in the global content is going to be overridden
> itself by the <Directory /> block above.  Probably what you want is
> something more like
> <Directory "c:/path/to/cgi-bin">
> AllowOverride Options
> </Directory>

I am making that change now.

> > # Windows doesn't allow files to have no name so .htaccess is
> > # not allowed
> 
> That isn't strictly true.  Many windows editors have a hard time dealing
> with files that start in a "dot", but windows itself is fine with them.
>   Often if you create an empty .htaccess file first, the editor will be
> happy with it.

When I try to rename any txt file to .htaccess I recieve ERROR: You must
type a filename. But it doesn't matter if the following will work...
 
> > AccessFileName ht.access
> > <Files ~ "^\ht.">
> 
> I don't think does at all what you want.  More likely <Files ~ "^ht\.">

Heh, ok. Done :)
 
> > Further, I don't know the path to PERL that goes in the first line of
> > the CGI/PERL scripts or even if WinXP requires this.
> 
> It is required unless you set "ScriptInterpreterSource registry" in
> httpd.conf.  Do you have perl installed on the system at all?
> 
> JOshua.

PERL (the distro from perl.com/ActiveState) is not installed. I have
obviously wrongly assumed that mod_PERL/mod_CGI are interpreters :(

Thanks for pointing that out. I am downloading/installing ActivePerl
5.6.1 now.

Thanks again,
--Glen :)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] CGI/PERL setup issue 2.0.40/Win32

Posted by Joshua Slive <jo...@slive.ca>.
Glen Stormbind wrote:

> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> 
> # I want to use .htaccess files because that's what my remote
> # server is setup to accept and keeping things as similar as
> # possible makes it easier for me to understand
> 
> AllowOverride Options

Well, that AllowOverride in the global content is going to be overridden 
itself by the <Directory /> block above.  Probably what you want is 
something more like
<Directory "c:/path/to/cgi-bin">
AllowOverride Options
</Directory>

> # Windows doesn't allow files to have no name so .htaccess is
> # not allowed

That isn't strictly true.  Many windows editors have a hard time dealing 
with files that start in a "dot", but windows itself is fine with them. 
  Often if you create an empty .htaccess file first, the editor will be 
happy with it.

> AccessFileName ht.access
> <Files ~ "^\ht.">

I don't think does at all what you want.  More likely <Files ~ "^ht\.">

> Further, I don't know the path to PERL that goes in the first line of
> the CGI/PERL scripts or even if WinXP requires this.

It is required unless you set "ScriptInterpreterSource registry" in 
httpd.conf.  Do you have perl installed on the system at all?

JOshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org