I click login on my DM site and I log in, but it won't tell me I am logged in. It works fine on my computer, but it's not doing somehting right on the server.
See for yourself: http://www.hyperbyond.com/eChat/
else if(!page_title) page_title = "Untitled"//Default page title if nothing is entered. if(!page_content) page_content = "Nothing here!" F.dir.Add(page_name) //Add the page to the file. F.cd = page_name //And navigate to it. F["page_title"] << page_title //Then, input the data. F["page_content"] << page_content return_data = "Page added." F.cd = "/" return return_data EditPage(page_name,page_title,page_content) var/savefile/F = new(PAGE_FILE) var/return_data F.cd = "pages" if(!F.dir.Find(page_name)) return_data += "Page not found." else F.cd = page_name F["page_title"] << page_title F["page_content"] << page_content return_data = "Page edited." return return_data RemovePage(page_name) var/savefile/F = new(PAGE_FILE) var/return_data F.cd = "pages" if(!F.dir.Find(page_name)) return_data = "Page not found." else F.dir.Remove(page_name) return_data = "Page removed." F.cd = "/" return return_data
AddNews(title,content,author,date) var/savefile/F = new(NEWS_FILE) F.cd = "news" F["title"] << title F["content"] << content F["author"] << author F["date"] << date F.cd = "/" return"News posted." //Since the news for the site is only a single-post system, this is basic.
Nope, you just need to 'chown' the .dmb file to a proper user ('nobody' has no permissions!) and make sure it's chmodded to 755. Also might want to change the owner stuff to not be me ;).
Nope, you just need to 'chown' the .dmb file to a proper user ('nobody' has no permissions!) and make sure it's chmodded to 755. Also might want to change the owner stuff to not be me ;).
chown won't help anything. In fact, it could make things worse if suEXEC is being used.
The basic problem here is that Apache is configured to run your CGI as the user 'nobody' but 'nobody' has no real home directory. DM CGI needs a writable home directory in order to store login information. Depending on how much control you have over your server environment, there are a few things you can do about it. If you have administrative access to the server, you can change your Apache configuration to run CGI scripts as a more appropriate user - but often this gets a little hair with all the necessary security checks. Or you could give the user 'nobody' a real home directory that it has write access to.
But probably the easiest thing to do would be to create a wrapper script that fakes a different home directory that you have access to. Where this might be is completely dependent on how the server is setup, so I can't even begin to speculate. The one place that you can almost certainly use is /tmp. Only problem is that /tmp is usually readable by anyone else on the system. If you're on shared hosting, that may or may not be desirable.
Anyway, here's a script you could use as a wrapper for the actual dmb:
Save that as index.cgi and make sure you chmod 755 index.cgi as well. If you know there's a directory outside of /tmp that you have write access to, I'd urge you to change the HOME setting to avoid having it readable by everyone else on the machine.
Hi, guest!<p>login
<p>
<pre> I seem to be running as user: nobody HOME directory: /var/www/dmcgi .byond: drwx------ 5 root root 4096 Jun 22 07:35 /var/www/dmcgi/.byond .byond contents: .byond/cfg contents: </pre>
And that's exactly what we expect. The dmb uses "nobody"'s default home directory, which doesn't exist. It doesn't work when called directly. The cgi resets that to a different location which does exist and only then calls the dmb. That's why it works. The cgi should be the only version accessible from the web.
Another thing you might try is giving the 'nobody' user a home directory, that way you won't need to use the wrapper, you can just upload your DMCGI and run it right away.