Using DMCGI, I am entirely unable to login. Using the /CGI Login() proc sends me to the login page correctly once, but after logging in my DMCGI application still decides I'm "guest" and further attempts to reach the login page instantly redirect me back to my own DMCGI page (still as guest). I may be doing something wrong, as DMCGI isn't my primary language, but I think everything's about correct.
Further, in the following code, I initially had it set to automatically send you to the login page if you were "guest" but it had a major flaw---similar to the above where, after the first time, attempts to reach the login page automatically redirect you back, I would get caught in an infinite loop between it sending me to the login page and the login page sending me back as guest.
Numbered Steps to Reproduce Problem:
1. Visit http://fairstrife.com/dmcgi/test.dmb
2. Try to login.
3. You're still guest. Try logging in again. Now you don't even get to the login page.
Code Snippet (if applicable) to Reproduce Problem:
CGI
Topic(href)
var/href_list[] = params2list(href)
if(("q" in href_list) && href_list["q"]=="login")
src.Login("http://fairstrife.com/dmcgi/test.dmb")
if(usr.ckey=="guest")
usr << "You are not logged in ([usr.key]). <a href='?q=login'>Please login</a>."
else
usr << "You are logged in as [usr.key]."
Expected Results: I would like to be able to login with DMCGI.
Actual Results: I am always guest.
Does the problem occur:
Every time? Or how often? Every time.
In other browsers? In other browsers, yes.
Your cgi needs write access to $HOME/.byond/cfg/cgicert.db and cgicert.str. Most likely, your web server is running the cgi under a different user from yours, and that user doesn't have permission to create a .byond directory under its home directory.
This thread has more information along with a sample diagnostic program to try. Solutions include creating the required .byond directory with sufficient permissions, or configuring the web server to use suEXEC.