Koozali.org: home of the SME Server

CGI-Problems

Lex

CGI-Problems
« on: November 24, 2003, 08:20:25 PM »
Hi,

i am Running E-smith 6.03b. I couldn´t execute *.cgi scripts.
The cgi´s are located not in /ibayname/cgi-bin. they
are located in /ibayname/html/cgi-bin/admin/...

This path is preconfigured from the scripts iam running.
In the ibay-config the "dynamic content" is enabled.

Please how i can solve the problem...

Greg Zartman

Re: CGI-Problems
« Reply #1 on: November 24, 2003, 08:31:48 PM »
If you've turned on Dynamic Content, then there are up to three reasons that your cgi script isn't working:

1. The script has a bug or syntax error that prevents it from running.  Solution:  Test the script from the command prompt using perl -c script_name.  If perl reports compile errors, you have syntax problems that need to fixed.  If perl reports nothing, have a look at the apache error logs to see if apache is having a problem executing the script.  Certain types of cgi bugs will allow the script to execute and run, but not display content via apache.  This type of bug can be difficult to track down.

2.  The ownership of the script is such that apache can't execute it.  Solution:  chown admin:shared script_name

3.  The permissions of the script are such that apache can't execute it. Solution:  chmod 755 script_name.

Greg Zartman.

Lex

Re: CGI-Problems
« Reply #2 on: November 24, 2003, 11:21:27 PM »
Thanks Greg

The script works with http://xxx.xxx.xxx.xxx/thw_bay/cgi-bin/pwmanager/admin.cgi

xxx=ip

But with domain name not:

http://mydomain.com/cgi-bin/pwmanager/admin.cgi

How the reason?

Tivon Coles

Re: CGI-Problems
« Reply #3 on: November 25, 2003, 01:22:44 PM »
I think i know what the problem is....
if your ibay is not set up with a virtual domain
ie mydomain.com is not pointing to that domain you may want to set up a virtual like pman.mydomain.com

otherwiseyou will still have to put the ibay name after the domain and before the cgi-bin like this
http://mydomain.com/thw_bay/cgi-bin/pwmanager/admin.cgi

if not then the server will be looking in the cgi-bin of the Primary ibay not thw_bay

hope this helps

Tivon Coles
EOL
eol.co.nz

Lex

Re: CGI-Problems
« Reply #4 on: November 25, 2003, 08:12:48 PM »
Thanks for info, but the virtualdomain is connected to the thw_bay (ibay)

Is the solution in the config (webmin):

CGI directory aliases From To?