• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

freebsd ..perl

hi,

i would like to 'enable' the .pl and .cgi outside the cgi-bin folder, so i add something like this :-

ScriptAlias /cgi-bin/ /usr/home/genius/cgi-bin/
AddHandler cgi-script .cgi .pl

but i found that some of the user can not running the scripts and some of them can...amazing ?

besides changing inside the httpd.conf , where can we check?

thanx
0
qazaka
Asked:
qazaka
  • 3
1 Solution
 
ahoffmannCommented:
did all the users have execute permissions on the dir?
0
 
gashalotCommented:
Look for a block like this in the srm.conf or httpd.conf file

<Directory /SOME/DIRECTORY/HERE>
....
Options None
</Directory>

You are concerned with the options line, you want to change this by adding "ExecCGI" on the string there.  You can read all about what other "options" are available by going to http://www.apache.org/docs/mod/core.html#options .
If you don't have a <Directory> entry for the area which is causing the problems you can simply add one, further up on that URL there is a link to what <Directory> requires and what you can do with it.

After restarting your HTTP daemon to re-read those http files (a `killall -HUP httpd` will work, or `apachectl restart`), you should also make sure that the file you wish to execute is named .cgi or .pl and you should also make sure the filel has eXecute prems (chmod a+rx /filename/somewhere).  Try running the program on the command line to make sure it can find the programs it needs to run.

This will allow you to run the CGI's from anywhere you want, as long as you have a <Directory> block for each dir you want to run CGI from (it is recursive, so you don't have to set one up for the subfolders).
0
 
qazakaAuthor Commented:

i had chmod 755 those files
i found this in one of the conf files

<Directory /usr/local/www/cgi-bin>
AllowOverride All
Options None
</Directory>

something strange happened..
i test the testing.pl  and testing .cgi in 3 users outside the cgi-bin folder

user a
testing.pl  (executable)
testing .cgi  (executable)

user b
testing.pl  (failed)  view as text file
testing .cgi  (executable)

user c
testing.pl   (failed) internal server error
testing .cgi (failed) internal server error

whats wrong ?
help me pls

thanx

0
 
qazakaAuthor Commented:
plus : i am using apache 1.2.6 /frontpage
0
 
qazakaAuthor Commented:
some one pls tell me
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now