Alex Tweedly wrote:

Mark Wieder wrote:


This is almost probably a script error. I was getting 500 errors until
I changed the line endings in my script file, then it suddenly started
working.
I'm also having the same problem (or at least the same symptoms) as Todd.

Can you specify *how* you changed the line endings in your script file ?
Or how I can verify if they are correct ?

(I ftp'ed the script file in Ascii mode, the same as I did for the other working CGI files (Python scripts), so afaik they should be set correctly. I copied another copy of the script to a text file - //tweedly.org/revbin/test1.txt - in case looking at that would help)

It's not a script error (that's not to say I understand it - but it's not a script error).

I enabled shell access, then telnet'ed in (as Jacque suggested in her cgi tutorial). Note that I had followed Phil's instructions up to this point - they're slightly different; the engine file is revolution.x86 and the cgi is test1.cgi - both 755 mode, and the first line of test1.cgi specifies
#!./revolution.x86 -ui

Here's the terminal log

Linux 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 (fig.dreamhos
t.com) (8)

fig login: alextweedly
Password:
Last login: Sun Jan 15 15:01:41 2006 from 87.112.17.11.bbplus.ptn-ag1.dyn.plus.n
et on pts/6
Linux fig 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mo
n Feb 7 13:23:30 PST 2005 i686 GNU/Linux
   _____.__
 _/ ____\__| ____
 \   __\|  |/ ___\
  |  |  |  / /_/  >
  |__|  |__\___  /
          /_____/
 Welcome to fig.dreamhost.com

Any malicious and/or unauthorized activity is strictly forbidden.
All activity may be logged by DreamHost Web Hosting.

[fig]$ pwd
/home/alextweedly
[fig]$ cd tweedly.org
[fig]$ cd revbin
[fig]$ dir
helloworld.cgi  revolution.x86  test1.cgi  test1.txt
[fig]$ ./revolution.x86 test1.chi
-bash: ./revolution.x86: Text file busy

So I try again just to see if I'm lucky !!

[fig]$ ./revolution.x86 test1.cgi
-bash: ./revolution.x86: Text file busy

Jacque's instructions said to name the engine "revolution", so I tried that

[fig]$ cp revolution.x86  revolution
[fig]$ ./revolution test1.cgi
Could not open libgdk-x11-2.0.so: libgobject-2.0.so: cannot open shared object f
ile: No such file or directory
Content-Type: text/html

Your ip is: <br>the params = "startup"<br>system version = Linux 2.4.29-grsec w fhs6b gr0501 nfs a32 p4 sata c4 gr2b-v6.189<br>version = 2.6.2<br>build = 77<b r>machine = i686<br>$OLDPWD = /home/alextweedly/tweedly.org<br>$LOGNAME = alextw eedly<br>$LANGUAGE = en_US:en_GB:en<br>$HOME = /home/alextweedly<br>$SHLVL = 1<b r>$PS1 = [\h]$ <br>$LANG = en_US<br>$PWD = /home/alextweedly/tweedly.org/revbin< br>$LC_COLLATE = C<br>$PATH = /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/gam es<br>$MAIL = /home/alextweedly/Maildir/<br>$USER = alextweedly<br>$HUSHLOGIN = FALSE<br>$TERM = ansi<br>$SHELL = /bin/bash<br>$HZ = 100<br>$REMOTEHOST = 87.112
.7.140.bbplus.ptn-ag1.dyn.plus.net<br>$0 = test1.cgi<br>

and it more or less worked - gave me an error message first, but the output appeared properly.
Note that at this point, the first line of test.cgi still says
#!./revolution.x86 -ui
and test1.cgi does not work from my browser.

However, I created test2.cgi - changing the first line to be
#!./revolution -ui
uploaded that, changed permissions to 755, and it now works OK from browser and from shell.

Still gives the error message

Could not open libgdk-x11-2.0.so: libgobject-2.0.so: cannot open shared object f
ile: No such file or directory

when run from the shell - but that doesn't appear to impact the subsequent output, so it works OK as a cgi from the browser.

I think the problem is not with the name of the revolution executable - I think for some reason the ftp upload of the original file has left the file marked as "in use" or some such thing, causing the "Text file busy" (note that the Unix error message "Text file" refers to an executable - very confusing !!).

I deleted it, then copied the working one
cp revolution revolution.x86
and it now works just the same as the one called simply "revolution". Summary - I don't understand exactly what happened, or why it worked - but I now have cgi scripts working (still to figure out whether the libgdk error matters or not).

Todd - I'd suggest activating shell on you r account (if you haven't already), and trying what I did above.


--
Alex Tweedly       http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.3/316 - Release Date: 17/04/2006

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to