ID:262043
 
My current site code:
mob/var
Status


CGI
authenticate=1
Topic(href,href_list[])
if("byondcert" in href_list)href_list.Remove("byondcert")
if(usr.key=="guest") usr.Status="Guest - <a href=?Login>Login</a>"
else usr.Status="[usr.key] - <a href=?Logout>Logout</a>"
if(href)
if("Login")
var/CGI/C=new
C.Login("http://theabyss.dragonabyss.com/~phoenixman/hs/ra.dmb")
if("Logout")
var/CGI/C=new
C.Logout("http://theabyss.dragonabyss.com/~phoenixman/hs/ra.dmb")
else if(!href)
usr<<browse("Home page <BR><BR><BR>[usr.Status]")


Whenever I open ra.dmb it redirects me to Dantoms secure login page. When I fill in my key/password and login, I get redirected back to the site, and I get an 500 Internal Server Error.

Does anybody know a fix?

If you want to see:
http://theabyss.dragonabyss.com/~phoenixman/hs/ra.dmb
I had the same problem when I tried setting up my own DMCGI site on my Linux box. We never did fix it, Nadz nor Jon88 new what was wrong.
In response to Airjoe
I think it's an internal error. Some bug inside the system.
In response to JohnReaper
Hmmm, yah think? It says Internal Sever Error right on the page. >.<
In response to Airjoe
Heh, it does! Perhaps. But a problem is that some DMCGI projects are not affected, while new ones are.
In response to JohnReaper
Well, any way to fix mine?

<small>Off to bed...
In response to Phoenix Man
Well, I didn't think "OMG U R A FAG!" could get any worse, but, proved wrong.
In response to JohnReaper
There's no difference between new projects or old. Airjoe's old site is older than BYOND100, yet I get no ISEs.
In response to HavenMaster
Right, perhaps his permissions are messed up, he should probably chmod it, or make sure it's accepting dmb's as text outputs.
In response to Teh Governator
I have chmodded ra.dmb, the full byond and .byond directory, the directory byond and .byond [using root], AND the directory ra.dmb is being hosted in, AND the .log file.

Do I need to chmod anything else?
In response to Phoenix Man
Well, not only chmod...but, does the webserver recognize the dmb as the correct mime type?
In response to Teh Governator
I think so... I did AddHandler cgi-script .cgi .dmb
Well, while looking at the error I saw this:
Apache/2.0.48 (Unix) Server at theabyss.dragonabyss.com Port 80
Could it be that he's running his server on apache and port 80 is closed?
In response to JohnReaper
If port 80 would be closed, it'd mean you couldn't access the site at all.
In response to Phoenix Man
Not exactly, it'll just prevent you from the inside goodies like BYOND transfering the certification over.
In response to JohnReaper
JohnReaper wrote:
Not exactly, it'll just prevent you from the inside goodies like BYOND transfering the certification over.

Port 80 being closed would mean you wouldn't see ANYTHING. (other than your browser's generic "There's no server here!" error)
In response to Phoenix Man
What did you chmod to? Mike H./Air Mapster made a post somewhere (I'm trying to find it) about the group write mode or something. Post [link]
In response to Airjoe
"Bump."

Hmm.
Phoenix Man wrote:
Whenever I open ra.dmb it redirects me to Dantoms secure login page. When I fill in my key/password and login, I get redirected back to the site, and I get an 500 Internal Server Error.

Several problems here. First, if there is any parameter at all (passed in as href), nothing happens. Why? Let's trace the logic:

        // true if there is a parameter
if(href)
// a non-empty string always evaluates to true
if("Login")
// why create a new CGI object? this proc is running in one
var/CGI/C=new
// does absolutely nothing, because C is not the running CGI object
C.Login("http://theabyss.dragonabyss.com/~phoenixman/hs/ra.dmb")
// again, evaluates true
if("Logout")
// same as above
var/CGI/C=new
C.Logout("http://theabyss.dragonabyss.com/~phoenixman/hs/ra.dmb")
// false because href is true
else if(!href)
// this line never gets executed
usr<<browse("Home page <BR><BR><BR>[usr.Status]")


So what happens is "Login" evaluates to true, the new CGI object is called and its Login() proc is called. Nothing is output to the web browser. Then "Logout" is true, and again a new CGI object is created to do nothing. Finally, the one line that outputs something is not executed because href is not false. When a CGI program produces no output whatsoever, Apache sends a 500 Internal Server Error, which is exactly what you got.

What you want to do is check if "Login" or "Logout" are named elements in href_list[]. You already have an example for checking that in the line handling "byondcert". In each of those cases, you want to call the current CGI object's (src's) Login() or Logout(), and then return. This is because Login() and Logout() send browser output to redirect to secure.dantom.com, and you don't need to go any further for that instance of the CGI.

Finally, the usr<<browse() line must execute if the Login/Logout was not called. There should be no if/else condition that causes it not to be executed, because then you'll get the Apache Internal Server Error.

I've made the changes I outlined here and it works fine for me.
In response to Mike H
It doesn't work!
I even tried going to nadrew.com and directly using Nadrews source with no changes made at all and it doesn't work! Why?!!?
Page: 1 2