View Full Version : Problems with CGI
Roadie
07-16-2004, 10:24 PM
Okay I know this isn't really the right place for my question, but maybe the're someone around to help me out...
If programmed a bunch of cgi-script on my dev box. After uploading it seemed really scewed. My main problem is that a link to a perl script works fine in a browser, but does not if it is called from winthin a .shtml page.
Does anyone of you have an idea ?
Best shown in :
http://www.winkelcentrumvlissingen.nl/indexnieuw.shtml
while the scripts seem to work fine:
http://www.winkelcentrumvlissingen.nl/cgi-bin/winkelcentrum/weergeven/weergeven.pl?file=prijsvraag&action=html
Other scripts (without the questionmark) seem to work right.
Sorry for the dutch content :p
thanx a lot
Roadie
thuskey
07-17-2004, 12:06 AM
I had the same problem, and found by looking at the apache error logs, that my server was attempting to read all cgi scripts out of the /var/www/cgi-bin directory and would not attempt to pull a script from inside my public_html directory.
Roadie
07-17-2004, 12:35 AM
Okay partitional it solves things...
the log says...
[Sat Jul 17 09:05:23 2004] [error] [client 24.XXX.255.XXX] invalid CGI ref "cgi-bin/XXX/weergeven/weergeven.pl?file=evenementen&action=cgi" in /home/XXX/winkelcentrumvlissingen.nl/public_html/content.shtml
I tried serveral ways of executing the script but nothing seems to work correct.
Maybe thuskey can tell me how he solved the problem?
I've tried to call the script from .shtml with:
<!--#exec cgi="/home/XXX/domains/winkelcentrumvlissingen.nl/public_html/cgi-bin/XXX/weergeven/weergeven.pl?file=prijsvraag&action=cgi"-->
<!--#exec cgi="/cgi-bin/XXX/weergeven/weergeven.pl?file=prijsvraag&action=cgi"-->
<!--#exec cgi="cgi-bin/XXX/weergeven/weergeven.pl?file=prijsvraag&action=cgi"-->
<!--#exec cgi="http://winkelcentrumvlissingen.nl/cgi-bin/XXX/weergeven/weergeven.pl?file=prijsvraag&action=cgi"-->
So now I'am out of options...
Greetings for now...
Roadie
:confused: :confused:
thuskey
07-17-2004, 09:39 AM
It appears we are not using the same commands at all. I used:
<!--#include virtual="/cgi-bin/myperlscript.pl" -->
It only worked when I had it in the /var/www/cgi-bin/ directory, or whichever directory is the cgi-bin for the default apache server.
thuskey
07-17-2004, 09:41 AM
oh and just a quick note, using php and the include and include_once commands for all this stuff turned out being much easier and alot less limited. I just haven't had time to convert my old SSI stuff to php, but one day I will.
Roadie
07-17-2004, 09:53 AM
TNX A LOT !!!
Seems to work as planned now !
Maybe you are right about php, but that's a new language to me... so that will take a lot of testing time :(
I've learned a lot, tnx again !
Roadie
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.