World: r3wp
[CGI] web server issues
older newer | first last |
Pekr 11-Aug-2006 [499x3] | uploading should be ok .... |
what is your script suffix? | |
if it is .r, try to change it to .cgi for a while | |
Janeks 11-Aug-2006 [502] | Already tried! |
Pekr 11-Aug-2006 [503] | does any other, etc. pl or shell script work i cgi directory .... |
Janeks 11-Aug-2006 [504] | Btw content of one of file in the interpreters dir: #!/bin/bash if [ -z "$REDIRECT_STATUS" ]; then echo -e "Content-Type: text/html\r\n\r <b>Security Alert!</b> The Perl CGI cannot be accessed directly. <p>This Perl CGI launcher is configured to require a redirect. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.</p> <p>For more information as to <i>why</i> this behaviour exists, see the <a href=\"http://php.net/security.cgi-bin\"> PHP manual page for CGI security</a>.</p> else export SCRIPT_NAME=${PATH_TRANSLATED##${DOCUMENT_ROOT}} export SCRIPT_FILENAME=$PATH_TRANSLATED /usr/bin/perl $SCRIPT_FILENAME" fi As newcomer in linux and apache I can only ques what it mean, but I am thinking about this line: This Perl CGI launcher is ... |
Pekr 11-Aug-2006 [505x3] | ah, then this apache is configured strangely imo .... in Apache httpd.conf, you normally specify ScriptAlias for directory, where cgi is going to be placed. Then you can always manually set whatever directory, to perform cgi action by adding SetHandler cgi-script for specific directory .... but then all files in there are regarded being a cgi and Apache could try to run them ... |
mostly, if you want to perform cgi outside scriptalias location, following directive is uncommented - AddHandler cgi-script .cgi | |
it seems to me, that this apache, if the perl script is right, is unnecessarily configured other way, but du not know ... | |
Janeks 11-Aug-2006 [508x2] | That web server is hosting and I think that I can not access httpd.conf. Btw - where it resides? |
The web server service providers told/wrote that it is possible to run cgi scripts on this server. | |
Sunanda 11-Aug-2006 [510] | win --> linux: Does your uploaded script have the right line terminations? |
Janeks 11-Aug-2006 [511x2] | I did write file read file. |
Before uploading. | |
Pekr 11-Aug-2006 [513] | janeks, you could try to put .htaccess file into your directory, specifying e.g. AddHandler cgi-script .cgi for your directory .... it will override httpd.conf settings IF rewriteengine is set to enabled ... |
Janeks 11-Aug-2006 [514x2] | In which directory exactly? |
It looks like I need good link to Apache for begginers... ;-) | |
Pekr 11-Aug-2006 [516] | try your document root directory ... |
james_nak 11-Aug-2006 [517] | Janeks,. I think httpd.conf in in the 'confs' dir. I don't think that a normal host allows you access to that though. |
Pekr 11-Aug-2006 [518] | surely not ... |
james_nak 11-Aug-2006 [519x2] | Janeks, here are some things to try: 1. Make sure you uploaded the rebol exe as binary and the rebol script as ascii. 2. make sure you chmod your rebol files, rebol and even the cgi-bin (755). Hope that helps. I have seen the same thing as you many times when I first set up rebol. |
BTW, if i makes you feel any better, I tested your script in my host and it works. I'm wondering if the "#!/var/www/cgi-bin/rebol -cs" is not actually pointing to the where it should be. Did the hosting company give you the exact path? | |
Janeks 11-Aug-2006 [521x2] | Thanks all - as always most obvious things are those on which we make mistakes. All was o' k except I changed rebol to rebcore, because I wanted also work with Rebol view and ... ... forgot it. Too much copy & paste. Well the next question is - if and what else is needed to install rebol view for cgi operations? |
It even works with .r extension. | |
Pekr 11-Aug-2006 [523x4] | nothing, but it might eventually not work ... |
it all depends, if such machine has X-Windows installed, or not. Mine has not IIRC .... | |
not sure what dependencies are there ..... there might be some library missing, as happened with my Command due to AGG | |
you can check by issuing: ldd your-rebol-view.exe | |
james_nak 11-Aug-2006 [527] | Janeks, I suppose it depends on what you want View to do. You can go ahead and put it in your cgi bin but It won't create interactive interfaces as you can when you run it locally. You can try the plugin for that kind of thing. |
Janeks 12-Aug-2006 [528x2] | What I want is just do some image conversation and to make some human control (small image with string on some patern background ...) |
I uploaded view but it it does not work - I just see error 500, but i think rview is the reason , because I changed in working script just first line that points to rebol executable. Its a pitty - I wanted to add some funcionality above to my home page. Q: Is it possible to add required libs? F.ex. just in the same dir. | |
Pekr 13-Aug-2006 [530] | not sure where/how view looks for such library ... |
Sunanda 13-Aug-2006 [531] | Running View as a CGI can be a problem. I don;t know any solutions to that. |
Graham 13-Aug-2006 [532] | switch to a windows host. solves that. |
Pekr 13-Aug-2006 [533] | ldd rebol-view-executable under Linux could tell you what libraries are needed. If that is not much (e.g. one library being dependant upon other etc.), you could try to upload those libraries to where your view executable resides. The question is, what is Linux OS strategy to look for libraries - current dir, some central libraries storage path, elsewhere ...? |
Gabriele 14-Aug-2006 [534x2] | configured library path (usually /lib/, /usr/lib/, etc), or the value of the env variable LD_LIBRARY_PATH. |
(iirc) | |
Ryan 15-Aug-2006 [536x2] | When I tried it, View seemed to want to try to install itself, and errored out when it tried to show an installation window. Various combinations of command line options were no help. I didnt try using old versions of view, or tricking view into thinking its already installed. |
Let me know if anyone figures this out. | |
Sunanda 16-Aug-2006 [538] | I susoect View may be trying to pop-up an installation window......And so that appears on the server's console (if any). meanwhile, you wait at the end of an Internet connection unable to see anything. Possible work-around: manually install whatever files View is trying to configure? |
Janeks 16-Aug-2006 [539] | I found that in my case on Linux RebViev needs linux-gate.so.1! I tried to google for "download linux-gate.so.1", but there was a lot of links for different things and it seems form me that it is included in some installation packgage. Could some body help with this library an is it worthwile (will RebView takes it from current dit)? |
Pekr 16-Aug-2006 [540x2] | according to Gabriele, Linux might have some default library locations ... but e.g. I run sqlite as dll, and I point rebol to load the library and it loads it from anywhere. The question is, if the same is right for executable dependant libraries |
what about asking server admin to add the library for you? He just could unpack it for you from his distro CD/DVD to the location where it belongs .... | |
Anton 16-Aug-2006 [542x2] | Ryan, are you sure that the -i or --noinstall command-line argument option does not help ? |
or all these ? -csiw | |
Gabriele 17-Aug-2006 [544] | petr, load/library is probably a bit different from what ldd does on startup. i suppose ldd wants current dir in the lib path to load libs from current dir (same issue as executing programs from current dir...) |
Janeks 20-Aug-2006 [545] | I asked for mu web service provider to add linux-gate.so.1 to the server he did not aprove that he did (actualy I did not get any answer yet), but today I found that my test script: #!/var/www/cgi-bin/rebview -cs REBOL [Title: "CGI Basics"] print ["Content-type: text/html" newline] print "Heloooooo!!!" works differently - I am getting following response: ** Near: size-text self You can check: http://www.jk.serveris.lv/cgi-bin/test What could it mean? |
Tomc 20-Aug-2006 [546x2] | first guess view may not work without X installed (does not on solaris) and there is no good reason to run X on a web server ... and then there are all those fiddley fonts |
and if you do have X installed the cgi script is likely not run from a graphicly aware shell so there may be virtual frame buffers involved | |
Janeks 21-Aug-2006 [548] | It is on Linux! |
older newer | first last |