FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » More safe_mode woes
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
More safe_mode woes [message #3436] Sun, 23 June 2002 06:37 Go to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
Hi there!

I quite recently upgraded my 1.2.8 forum to 2.0.2. When I try to post something I get this error: "Warning: SAFE MODE Restriction in effect. The script whose uid is 99 is not allowed to access /www/int2000/a/7676/html/forum owned by uid 2273 in /www/int2000/a/7676/html/forum/post.php on line 3948".

I'm starting to get really pissed off with safe_mode, but since it isn't my server I have to cope. What should and can I do about this?
Re: More safe_mode woes [message #3437 is a reply to message #3436] Sun, 23 June 2002 07:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
get your admin to chown the /www/int2000/a/7676/html/forum directory to the webserver account.

FUDforum Core Developer
Re: More safe_mode woes [message #3438 is a reply to message #3437] Sun, 23 June 2002 07:35 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
prottoss wrote on Sun, 23 June 2002 10:28

get your admin to chown the /www/int2000/a/7676/html/forum directory to the webserver account.


Is there any way to do this without involving the admin? A php script perhaps? I should be able to accomplish this with a simple exec, shouldn't I?
Re: More safe_mode woes [message #3440 is a reply to message #3438] Sun, 23 June 2002 08:39 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
Hi Basse,
I feel with u, because I suffer from the same braindead configuration on the rokop-security server. The following worked for me: Make a mirror of ur current forum on ur local server (I assume u got one running in ur home network or on localhost if its just one machine) Next run the upgrade, shouldn't make problems unless u would mess up something with rights and owners)
Now Fud should be running on ur local copy. Next would be: delete the symbolic links and replace them with php files which perform a include as a substitute:
<?php include_once "/home/httpd/ur-web-account/ur-hidden-dir/include/GLOBALS.php"; ?>

In other words: the include points to the real GLOBALS.php with an absolute UNIX path. In case this path is unknown to u u can reveal it by running phpinfo(). Save this code as GLOBALS.php and use it the same way u did with the symbolic links. Now u are able to upload the stuff to ur server. U probably need to change the files' rights so the server can modify them. Then u only need to update ur database (don't use phpadmin for it, as it will break if the process exceeds 30 secs):
$telnet urserver
[user,password]
$ mysql database -u uraccount -p < urdump.sql

After that it should run.
Bye
Ken
Re: More safe_mode woes [message #3441 is a reply to message #3440] Sun, 23 June 2002 09:50 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
This works well if you have shell access, which is a luxury I haven't got. So, I need a installation & upgrade process that can manage safe_mode. Prottoss seems to be quite good at writing code that bypasses safe_mode, but something went wrong this time.
Re: More safe_mode woes [message #3442 is a reply to message #3441] Sun, 23 June 2002 10:47 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
Well. But this has nothing to do with the code in itself but the crappy phpmyadmin which can't handle datadumps that are greater then 600-800k (it spins circles forever causing httpd to eat up all available CPU time). The shell command is a way of bypassing this restriction by talking directly to the sqlserver. But I have a script which u could try. I'll send it to u as PM with a short description of what it does
bye Ken
Re: More safe_mode woes [message #3443 is a reply to message #3436] Sun, 23 June 2002 11:32 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
The situation was even more interesting than I thought. When I try to post something I get the same error message as before (see earlier message in same thread), but the text gets posted anyway. What the heck is going on?
Re: More safe_mode woes [message #3445 is a reply to message #3438] Sun, 23 June 2002 18:10 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You cannot chown a directory to the www user/group since you account is not in that group.
The alternative is to move the directory esle where, then create a directory with the same name using a php script, with 777 permissions, and then copy your files into that directory using a php script.

Admitedly that is a pain in the ass, but unfortunatly for people upgrading from old versions on systems with safe_mode enabled that is about the only solution.


FUDforum Core Developer
Re: More safe_mode woes [message #3839 is a reply to message #3436] Sun, 07 July 2002 20:29 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
Today I tried to upgrade to version 2.2.0 but failed, again because of safe_mode. I placed the upgrade script in my forum's root and ran it, and got an error that explained that due to safe_mode mode the script cannot access GLOBALS.php. What to do? Shoot the ISP staff that turned on safe_mode? Or is there some kind of workaround?
Re: More safe_mode woes [message #3841 is a reply to message #3839] Sun, 07 July 2002 20:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to upload the upgrade script using the forum's file manager, after that it should work fine.

FUDforum Core Developer
Re: More safe_mode woes [message #3844 is a reply to message #3841] Sun, 07 July 2002 22:18 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Åbo, Finland
Karma: 0
Senior Member
But I cannot access the forums root directory with the file manager. When I try I get an "Access denied". (That particular error message is horrible misspelt, by the way...).
Re: More safe_mode woes [message #3850 is a reply to message #3844] Sun, 07 July 2002 22:56 Go to previous messageGo to next message
james is currently offline  james   United States
Messages: 65
Registered: June 2002
Karma: 0
Member
basse - I am having the exact same problems as you. EXACT I'm going to watch this thread, and I'll post in additional information if I come up with any.
Re: More safe_mode woes [message #3869 is a reply to message #3436] Mon, 08 July 2002 13:23 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Try the attached upgrade script, it should fix the problem.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Cannot access Admin Control Panel anymore
Next Topic: approving messages: query failed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:12:07 GMT 2024

Total time taken to generate the page: 0.02401 seconds