Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Rien on September 14, 2003, 01:38:53 PM
-
Hy,
Can anyone tell me how to use cgi-script on my home page? I've placed cgi-scripts in my cgi-bin directory of the ibay, enabled "Execution of dynamic content", chmod 777 the directory and scripts, call the script from an .shtml page and set the perl directory to /usr/bin/perl.
I've tried different scripts (textcounters) and different virtual en absolute path's, but nothing works.
What did I do wrong?
Rien
-
The cgi-bin directory and the files in it should be 755 not 777. As far as I know apache wont run cgis with 777.
In future you need to supply as much info as you can. I know you don't always know where to look. I don't. But in this case look at:
/ver/log/httpd/error_log
I've a couple of helpfull scripts that you can user to view system info and the apache error_log in a browser. If you like I'll post the link.
Hope this helps
-NTB
-
> I've a couple of helpfull scripts that you can user to view
> system info and the apache error_log in a browser. If you
> like I'll post the link.
> Hope this helps
> -NTB
I would like to see those links
I'm having a learning curve hard time with cgi and apache.
Thanks
-
Hy NTB,
I chmod the files and directory as you said. But it still don't work. I've looked in the /var/log/httpd/error_log file but I can't find anything.
The script I want to have on my homepage is the textcounter scrip from
http://www.ncrvnet.nl/cgi-bin/linkstat/redirect.pl?url=http://cgi-resources.com/&name=computer_internet
I like to see the scripts you mentioned.
Thanks,
Rien
-
Here are the links...
http://perlservices.net/en/programs/error_log_viewer/
http://www.dotmatrix.net/scripts/setup/
-
Hy NTBlade
The tester.pl script doesn't work on my server. The error is: ": bad interpreter: No such file or directory"
I have the following questions:
If the absolute path to the script is:
/home/e-smith/files/ibays/"ibayname"/cgi-bin/tester.pl", what is than the virtual path? Is the absolute path correct?
How do I start an script from an shtml page in the directory:
/home/e-smith/files/ibays/"ibayname"/html/countertest.shtml
what is than the virtual path to the scriptfile?
Rien
-
OK, I'm assuming you're a newbie like me :-)
Try this,
Unzip the script
If you are running windows find and download winscp
connect to you server and tranfer tester.pl to your primary cgi-bin ie
/home/e-smith/files/primary/cgi-bin
you can either ssh into your server and run mc to edit tester.pl or use win scp.
Cange the first line to the path to perl which should be
#!/usr/bin/perl
Do NOT edit the file on a windows machine before transferring.
from the command line chmod 755 tester.pl OR chmod using winscp
Then point your browser to http://yourservernameorip/cgi-bin/tester.pl
Hope this helps
N
-
Hy,
Yes I'm a newby. I installed the "tester" script as you said, but it still doesn't work. I had already textcount scripts installed. They work when execute them from the command line (as "root", with Midnight Commander). But when I want to execute them from a shtml, shtm, html of htm page, it don't work. Nothing happens, no error, just nothing.
I really don't know what I do wrong. That is very frustating I can tell you.
Rien
-
I had the same problem with .pl files..
Try to upload these files with an ftp program in binary mode. not automatic, not text file transfer. solved my problem.
hope it helps.;
cheers
-
Hey Georges,
I did that. The scripts execute when I execute them from the commandline so they can't be wrong installed.
I just can't execute them from a (s)html page
Rien