ID:169825
 
A "hello, world" DMCGI file is generating a 500 error, and I can't figure out why. It's CHMODed 755, httpd.conf includes " Options Indexes FollowSymLinks ExecCGI" and "AddHandler cgi-script .cgi .dmb" The file is named "test.cgi" and located at http://www.peopleforasolution.org/test.cgi. BYOND is installed at usr/local/bin/byond and the path in the .DMB is correct. The VHost entry in httpd.include is
<VirtualHost \
82.165.30.196:80 \
>
UseCanonicalName Off
DocumentRoot /home/httpd/vhosts/peopleforasolution.org/httpdocs
ServerName www.peopleforasolution.org
ServerAlias peopleforasolution.org *.peopleforasolution.org
ScriptAlias /cgi-bin/ "/home/httpd/vhosts/peopleforasolution.org/httpdocs/"
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory /home/httpd/vhosts/peopleforasolution.org/httpdocs>
AllowOverride All
Options ExecCGI
Allow from all
</Directory>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir "/home/httpd/vhosts/peopleforasolution.org/httpdocs:/tmp"
</IfModule>
</VirtualHost>

What could be causing this problem?
What are the permissions on the directory? If they're too lenient/permissive, apache can throw up errors like that. Also, who are the owners of the directory and file?
In response to Jon88
It's got to be something to do with Apache, I guess. When I ran ./helloworld.cgi in shell, it returned
[root@server httpdocs]# ./helloworld.cgi
/usr/local/byond/bin/DreamDaemon: error while loading shared libraries: libbyond.so: cannot open shared object file: No such file or directory

I verified that the file was in byond/bin, and it was.
byondsetup   DreamMaker   libbyond.so  libzip.so
DreamDaemon DreamSeeker libpng.so

I then CHMODed libbyond.so to 777, and went back to httpdocs and ran ./helloworld.cgi. That returned
[root@server httpdocs]# ./helloworld.cgi
Expires: 0
Content-type: text/html

Hello, world!

So I said, "Yay." But, of course, it doesn't work. http://www.peopleforasolution.org/helloworld.cgi still returns a 500. Any ideas?
In response to HavenMaster
Try making a copy or a symlink of the library in the folder with all your other libraries. /lib, /usr/lib, or something like that. I'm guessing that the apache user can't find the library, since the BYOND bin isn't in its list of library paths.
In response to Jon88
I did that, but I had that fixed anyway.

The problem is, CGI scripts aren't executing via a webbrowser. Any of them.

http://www.peopleforasolution.org/test.cgi - normal CGI
http://www.peopleforasolution.org/helloworld.cgi - DMCGI

Neither execute. I added a clause in httpd.conf
<Directory /home/httpd/vhosts/*/httpdocs>
Options All
AddHandler cgi-script .cgi .pl .dmb .pfas
</Directory>


And she still won't execute. What can be doing this?

EDIT:

CGI Scripts *will* execute, actually. http://www.peopleforasolution.org/hello.cgi, so it seems to be a DMCGI problem. I'll check my logs to see if anything would cause this, but I see nothing so far.

ReEdit: SuExec shows nothing. :-(
In response to Jon88
I got the same thing ( http://www.hyperbyond.com/test.dmb ). I chmodded it to 777.
In response to King Gunnerblast
Do you understand what CHMODing does? The difference from 755 to 777 would have no impact on the script working. It sets permissions for various user groups and owner can read, write, and execute. CHMODing isn't the problem.
In response to HavenMaster
I know.
In response to King Gunnerblast
I fixed the permission problem on my site. I used this script in my httpd.conf:

<Directory [website directory]>
Options +ExecCGI
</Directory>