Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
.htaccess options and perl don't mix
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- .htaccess options and perl don't mix
.htaccess options and perl don't mix
18-03-2010 11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi All.
I am testing out the use of .htaccess placed in a specific directory, cgi-bin (permissions 0710). Its contents are very simple
Options +ExecCGI
AddHandler cgi-script pl cgi
It's uploaded as ascii with default permissions of 0640.
When I then try to run a perl script in that directory I receive the 'Server Error 500'. If I remove the .htaccess file altogether (and there are no others in my area), all the .pl scripts work fine.
Would anyone know why this is ?
I am testing out the use of .htaccess placed in a specific directory, cgi-bin (permissions 0710). Its contents are very simple
Options +ExecCGI
AddHandler cgi-script pl cgi
It's uploaded as ascii with default permissions of 0640.
When I then try to run a perl script in that directory I receive the 'Server Error 500'. If I remove the .htaccess file altogether (and there are no others in my area), all the .pl scripts work fine.
Would anyone know why this is ?
Message 1 of 6
(1,147 Views)
5 REPLIES 5
Re: .htaccess options and perl don't mix
18-03-2010 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
We don't allow the AddHandler directive on the new platform, so that would be the cause of the 500 error.
However, due to the way suEXEC works, you can have perl scripts in any directory in your CGI space and it will work.
However, due to the way suEXEC works, you can have perl scripts in any directory in your CGI space and it will work.
Message 2 of 6
(347 Views)
Re: .htaccess options and perl don't mix
18-03-2010 12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi Ben,
Does this mean that any perl script must end in and only end in .pl ? It's just I have some perl scripts without extensions and I was seeing if the .htaccess file could force these files to be processed by the Perl interpreter.
thanks, Mark
Does this mean that any perl script must end in and only end in .pl ? It's just I have some perl scripts without extensions and I was seeing if the .htaccess file could force these files to be processed by the Perl interpreter.
thanks, Mark
Message 3 of 6
(347 Views)
Re: .htaccess options and perl don't mix
18-03-2010 12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
At the moment it will only work for .php, .pl or .cgi. Naming perl files .php would be a bit odd, but should work, .pl or .cgi makes more sense. You could always use a rewrite once the file has been renamed so you don't have to change all your links.
Message 4 of 6
(347 Views)
Re: .htaccess options and perl don't mix
18-03-2010 12:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Nah, .php will go to the php interpreter, but .cgi would work with a shebang line. Ben's suggestion of a rewrite's best, if you really don't want extensions.
Gabe
Gabe
Message 5 of 6
(347 Views)
Re: .htaccess options and perl don't mix
18-03-2010 1:07 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Oh yeah, I forgot about the binfmt stuff, that forces the interpreter for .php files to be php.
Message 6 of 6
(347 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- .htaccess options and perl don't mix