MyBB Community Forums

Full Version: [SOLVED] MyBB trying to access a root directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This has been solved; this reply explains the solution. Thanks!

I'm not entirely sure, but it looks like my forum may be trying to access a root directory for some reason. This only occurs on one page, specifically when viewing a particular thread. Oddly, though, the error is reported as coming from the thread's parent board - where all the threads are listed. When the thread is viewed (any page), it is just blank.

This is the error:

Quote:[Sun Apr 05 15:39:48 2009] [error] [client {user's IP address}] sh: line 1: /usr/bin/uptime: Permission denied, referer: http://www.{my forum}.com/web-development-scripting-languages/php-f-20.html

I don't really know where to begin looking for the offending code. It's strange that it's just this one thread, and that the error comes from the page of its parent board.

What should I do about this? Any suggestions?

Thanks!
-Matt
'sh: line 1: /usr/bin/uptime' sounds like something to do with the host to me... is there anything unusual being loaded on the page that causes the error?? Something that isn't loaded anywhere else??
inc/functions.php and archive/global.php do exec('uptime') or exec("uptime") in order to get at the load of the host. If your host has an issue with that, just remove those two calls.
MattRogowski Wrote:sh: line 1: /usr/bin/uptime' sounds like something to do with the host to me... is there anything unusual being loaded on the page that causes the error?? Something that isn't loaded anywhere else??

I contacted my host. They told me that since it's a root directory, it isn't available to the customers that have their basic "shared"-like plan.

This started happening, seemingly, after a new reply to the thread. I looked directly at the database at the reply and it had some PHP code in it, but that's commonplace in my forum, and I've never had a problem. I removed it temporarily and it still wouldn't work, so the post contents doesn't seem to be the problem.

Otherwise, I don't think there's anything unusual. It's just another thread.

frostschutz Wrote:inc/functions.php and archive/global.php do exec('uptime') or exec("uptime") in order to get at the load of the host. If your host has an issue with that, just remove those two calls.
Server load is not applicable; it's on a grid. I'm actually with Media Temple. Perhaps that is the issue (strange that I've never had it before though!) -- let me try that and I'll let you know.
Unfortunately, removing those calls hasn't had any effect on the page. It is still blank.

(Really good idea though, I never thought of that.)
If you still get the /usr/bin/uptime error even after you removed those calls, maybe you have any other code that tries to do the same, maybe a plugin that does something with statistics and / or tries to display server load?

grep your files for usr/bin/uptime, something should come up
(2009-04-06, 01:16 AM)frostschutz Wrote: [ -> ]If you still get the /usr/bin/uptime error even after you removed those calls, maybe you have any other code that tries to do the same, maybe a plugin that does something with statistics and / or tries to display server load?

grep your files for usr/bin/uptime, something should come up

I've looked but can't find anything unusual, especially to that particular page. I contacted my host and they said that there simply must be something in the script. It might be worth noting, then, that MyBB is not 100% compatible with Media Temple (gs) Grid Service accounts.

Thanks for the help. If anyone else finds out anything on the matter, please post it! I will, of course, keep investigating.
After a little bit of help with my research from Joshua Collins, I've found a solution. I wouldn't have thought to Google the SEO plugin I was using. (Thanks Joshua!)

This is not a Media Temple issue, nor is it a MyBB issue. Apparently the issue spawns from the SpiceFuse SEO plugin.

Random blank pages on your MyBB forum with the SEO plugin installed can be solved by one of two ways. (You can find these on the SpiceFuse forums, but I'll post my solution here.)

The method I used was to disable "Enable search engine friendly URLs?" in the MyBB Admin Panel (Configuration -> Sever & Optimization Settings, first option). Apparently it was randomly conflicting with the plugin's link modifications.

As for the whole uptime/root directory glitch, I still don't know why that would be a factor, but it seemed to have been related. Thanks for everyone's help! Smile
The SpiceFuse SEO plugin is notorious for causing all sorts of issues. Switch to the Google SEO plugin IMO.