ID:134293
 
I'm unsure of the steps to follow. I've done the following thus far (according to .bash_history, irrelevant mistakes with using an SSH terminal trimmed off ;-)):

unzip byond_linux.zip
cd /home2/[mydir]/byond
make here
source /home2/[mydir]/byond/bin/byondsetup
cat .bash_profile
exit
[downloaded .bash_profile via FTP, added line 'source /home2/[mydir]/byond/bin/byondsetup, reuploaded; probably could've used a stream operator to append that line, but I prefer hands-on file editing ;-)]
chmod 777 /home2/[mydir]/byond/bin/DreamDaemon
cd public_html
cat .htaccess
exit
[downloaded .htaccess via FTP, added line 'AddHandler cgi-script .dmb' to allow Apache to treat DMBs as CGI programs, reuploaded]
[uploaded index.dmb via FTP and set permissions to 755]

However, I'm still stuck. When attempting to run Dream Daemon, I receive the following errors:

[Wed Nov 29 19:45:43 2006] [error] [client 206.116.185.89] Premature end of script headers: /home2/[mydir]/public_html/index.dmb
/home2/[mydir]/byond/bin/DreamDaemon: error while loading shared libraries: libbyond.so: cannot open shared object file: No such file or directory

I guess the real question is:

I don't have to create a symlink to libbyond.so in the public_html directory, do I? How do I tell the server where libbyond.so is?

I could also add the question "Am I missing anything else?" after that.


Bear in mind this is a shared webserver, so I don't have administrator access.
If you're installing it for your user only, you have to execute byondsetup everytime you want to view a page, or it will complain.
Installing it as root would be the best option here, since there'd also be no errors with having to recompile the entire thing just so it works on your site.
Seems that .bash_profile is not ran when you run the script.

I'm confused.
Jtgibson wrote:
[Wed Nov 29 19:45:43 2006] [error] [client 206.116.185.89] Premature end of script headers: /home2/[mydir]/public_html/index.dmb
/home2/[mydir]/byond/bin/DreamDaemon: error while loading shared libraries: libbyond.so: cannot open shared object file: No such file or directory

I guess the real question is:

I don't have to create a symlink to libbyond.so in the public_html directory, do I? How do I tell the server where libbyond.so is?

Put index.dmb somewhere outside your public_html directory (maybe in /home2/[mydir]/byond). Instead, create a file called index.cgi in public_html. Its contents should be:

#!/bin/sh
export LD_LIBRARY_PATH=/home2/[mydir]/byond/bin
exec /home2/[mydir]/byond/bin/DreamDaemon /home2/[mydir]/byond/index.dmb -CGI -trusted -logself


Set permissions of index.cgi to 755.
In response to Mike H
Aha! I'll give it a whirl.

Looks like it did it, although now I have to figure out why the page works in BYOND mode but not in CGI mode, because the same DMB produces a server error on my byondhome page, too! I guess it's important to have a test page that actually works on a CGI-DMB enabled server before I try testing it out on a server that I'm experimenting with. ;-)


[edit]OK, now I have it working on my byondhome site, but it still fails on my private site. The problem is almost certainly world.executor. I have it set to
world/executor = "/home2/[mydir]/byond/bin/DreamDaemon -CGI -logself -trusted"
and it still craps out on me. Setting it to the default
world/executor = "/usr/local/byond/bin/DreamDaemon -CGI -logself -trusted"
and running it on my byondhome site works perfectly.

Hrm.

[edit2] Actually, wait, that's apples and oranges. The DMB is being executed directly on my byondhome space...

[edit3]The DMB's source is as follows:

CGI/Topic(href, href_list[])
var/HTML = "<!doctype html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"

HTML += "<head><title>Test DMB Page</title></head><body>"
HTML += "\n\n<h3>If I can see this, I have succeeded.</h3>"
HTML += "\n\n<h3>If I can't, then I hate myself. *emo*</h3>"
HTML += "\n\n</body></html>"
usr << browse(HTML)



[edit4]Okay, it's no longer relevant to BYOND, I think. The error I'm now getting is:

[Thu Nov 30 16:08:22 2006] [error] [client 206.116.185.89] Premature end of script headers: /home2/[mydir]/public_html/cgi-bin/index.cgi
/home2/[mydir]/byond/bin/DreamDaemon: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory

Which is strange, because when I installed BYOND it would've had to have those libraries installed on the server, wouldn't it?

In any case, I'll talk to my host. =)
In response to Jtgibson
Jtgibson wrote:
Which is strange, because when I installed BYOND it would've had to have those libraries installed on the server, wouldn't it?

No. That specific library is not included by default and will have to be included by your host. Perhaps moving it to the place libbyond.so and such files are located would work.
In response to Jtgibson
In response to Mike H
I love you two.

Purely platonically. But if you were really lonely and I was really drunk...