Author Topic: [MOD] for Bypassing The SAFE MODE  (Read 165377 times)

0 Members and 2 Guests are viewing this topic.

Offline ib41

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Almost complete
« Reply #30 on: June 01, 2003, 05:49:13 AM »
I got the mod working on my site ( it does upload the images ) but I still get this ERROR text above the uploaded image

Code: [Select]
Warning: SAFE MODE Restriction in effect. The script whose uid is 12669 is not allowed to access /mnt/datadisk/users/webs/sitename.breezeland.com/pictures/data/thumbnails/1 owned by uid 51 in /mnt/datadisk/users/webs/sitename.breezeland.com/pictures/includes/image_utils.php on line 141

Warning: SAFE MODE Restriction in effect. The script whose uid is 12669 is not allowed to access ./data/thumbnails/1/P1172924-g.jpg owned by uid 51 in /mnt/datadisk/users/webs/sitename.breezeland.com/pictures/includes/image_utils.php on line 83


when I view the folders it doesn't show, ONLY just right after the image is uploaded


great mod BTW ;)
People gain a lil authority and suddenly they think they're god
then you tell them the truth and they can't handle it
so they abuse the power bestowed upon them

Offline Adagio

  • Pre-Newbie
  • Posts: 3
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #31 on: June 02, 2003, 04:40:38 PM »
Same for me too. All works, except when I try to upload a picture. All chmod's are set to 777 ... and even with this mod, I get the message:

Warning: SAFE MODE Restriction in effect. The script whose uid is 636 is not allowed to access /home/www/web1/html/galerie/data/media/1 owned by uid 30 in /home/www/web1/html/galerie/includes/upload.php on line 114

Not funny ...

Offline DANG_BLUE

  • Pre-Newbie
  • Posts: 2
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #32 on: June 05, 2003, 08:52:06 AM »
I'm using this MOD buts it still error:
Code: [Select]
Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 65941 is not allowed to access ./data/media/7 owned by uid 65768 in /customer/tnt/docs/gallery/includes/upload.php on line 109

Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 65941 is not allowed to access ./data/media/7 owned by uid 65768 in /customer/tnt/docs/gallery/includes/upload.php on line 114


No image uploaded in forder, no image in gallery... help!

Offline Tocsi

  • Pre-Newbie
  • Posts: 1
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #33 on: June 18, 2003, 03:07:43 AM »
i've the same problem!
i also do the second modification on page 2 of this thread.
same error without the mod on page 2.
please help! i won't change my provider again!

Code: [Select]

Warning: SAFE MODE Restriction in effect. The script whose uid is 647 is not allowed to access /home/www/web12/html/foddoalbum/data/media/3 owned by uid 30 in /home/www/web12/html/foddoalbum/includes/upload.php on line 109

Warning: SAFE MODE Restriction in effect. The script whose uid is 647 is not allowed to access /home/www/web12/html/foddoalbum/data/media/3 owned by uid 30 in /home/www/web12/html/foddoalbum/includes/upload.php on line 114

Offline spiffykiwi

  • Pre-Newbie
  • Posts: 4
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #34 on: June 18, 2003, 07:42:50 PM »
Quote from: Adagio
Same for me too. All works, except when I try to upload a picture. All chmod's are set to 777 ... and even with this mod, I get the message:

Warning: SAFE MODE Restriction in effect. The script whose uid is 636 is not allowed to access /home/www/web1/html/galerie/data/media/1 owned by uid 30 in /home/www/web1/html/galerie/includes/upload.php on line 114

Not funny ...


I get the same exact thing :( ... and I'm getting really frustrated over here...

Offline pepsity

  • Pre-Newbie
  • Posts: 1
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #35 on: June 19, 2003, 05:46:21 AM »
Hey all
It works for me but I get this when I go into Add Categories

Code: [Select]
Parse error: parse error, unexpected $ in /home/username/public_html/website/gallery/admin/categories.php on line 596


pepsity

Offline mrdummy

  • Pre-Newbie
  • Posts: 1
    • View Profile
[MOD] for Bypassing The SAFE MODE
« Reply #36 on: June 20, 2003, 02:27:14 PM »
Mod for bypassing safe mode works not always. UID problems occurs when i upload images to the site.

I think you must use 'FTP code mod' before you start with 4images site for first time.

I know now why UID codes are in trouble. Because script makes directories which are made by server self, thus own UID number. But uploaded images are from user / ftp method, thus another UID number.
That's not easy problem.

When i checks which commands are needed to bypass UID checks, there are some solutions:

- in apache http.conf you need for example:
Code: [Select]
<Directory /home/www/4images/data/>
php_admin_value safe_mode 0
php_admin_value open_basedir /home/www/4images/data/tmp_media/
php_admin_value open_basedir /home/www/4images/data/tmp_thumbnails/
</Directory>


But it works not very well.

Remove dirs and make same dirs again with your FTP program, then switch to chmod 777. It solves UID problem, but it takes little much work.

But now i have new command seen in PHP.
The command move_uploaded_file is possible solution for UID problem. Because it bypasses UID checks and does only move uploaded files to another dir. Useful for user uploaded files.

Is this code used into 4images site script? I see the script use copy() command for move files, but it causes UID conflicts.

Here manual for code: http://nl.php.net/manual/en/function.move-uploaded-file.php

Can you use this command or not?

Offline Mogandi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] for Bypassing The SAFE MODE
« Reply #37 on: April 05, 2005, 01:28:18 PM »
Hi,

after getting the safe mode error message and finding the solution here, I rewrite the files as written in the first "Beitrag" ;-) Buit it doesn't work. Now i get errors when i make a new categorie.

Is there a possibility to solve this problem without ftp? I don't want my admins on my ftp account and i want them to admin all about the 4images script.
Probably the new version 1.7.1 helps?

Greetings Moggl

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] for Bypassing The SAFE MODE
« Reply #38 on: April 06, 2005, 05:15:45 AM »
Is there a possibility to solve this problem without ftp?
yes, as soon as your hoster turn off safe mode - no ftp will require ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline tpc010

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] for Bypassing The SAFE MODE
« Reply #39 on: April 21, 2005, 12:46:25 AM »
Hello,

this working in my skript.

I have search for this in forum. But nothing can be found.

I hope its usefull for other servers. :D

mfg tpc010


function create_cat_folder($path, $mode) {

//initialisation de la connection FTP
$ftp_server='serverIP'; // your FTP IP Serveur
$conn_id = ftp_connect($ftp_server);

// login et mot de passe
$user="USER"; // your login name
$passwd="XXXX"; // your password
$login_result = ftp_login($conn_id, $user, $passwd);

// Vérification de la connection
if ((!$conn_id) || (!$login_result)) {
echo "Schlechte Verbindung über FTP";
echo "Es wird versucht sich am Server: $ftp_server mit dem User: $ftp_user_name anzumelden";
die;
} else {

//ici, la connection est bien effectuée, alors on appelle la fonction qui crée le répertoire
$result = ftp_mkdir($conn_id,$path);
$chmod_cmd="CHMOD 0777 ".$path;
$chmod=ftp_site($conn_id, $chmod_cmd);

}

Offline vietdragon

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: [MOD] for Bypassing The SAFE MODE
« Reply #40 on: May 16, 2005, 02:46:15 PM »
Hosting safe mode is on .

After i hacked this mod.

when i add categories  have this Warning :

Warning: ftp_mkdir(): Can't create directory: No such file or directory in /home/muzic/public_html/vnp/admin/categories.php on line 90

Warning: ftp_mkdir(): Can't create directory: No such file or directory in /home/muzic/public_html/vnp/admin/categories.php on line 90
Category added




Offline Justin761985

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [MOD] for Bypassing The SAFE MODE
« Reply #41 on: July 26, 2005, 01:24:39 AM »
Hello,

I edit both files as required and used my FTP IP Address and all the login details and I still get the same old error message:

Warning: move_uploaded_file(./../data/media/4/Winter.jpg): failed to open stream: No such file or directory in /home/vhosts_111mb/puder-source.111mb.com/includes/upload.php on line 113

Warning: move_uploaded_file(): Unable to move '/tmp/phpYzlOt0' to './../data/media/4/Winter.jpg' in /home/vhosts_111mb/puder-source.111mb.com/includes/upload.php on line 113
Image 1
    Error uploading image file: Winter.jpg
Winter.jpg: Copy error. Please check the directory permissions.

No database entry!

What else can I do to fix that or what may I be doing wrong?

Thanks,
Justin.

Offline andybxxx

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] for Bypassing The SAFE MODE
« Reply #42 on: August 03, 2005, 01:31:16 PM »
how do I find out my ftp IP, I know the ftp path, but ddon't know how to get the IP

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] for Bypassing The SAFE MODE
« Reply #43 on: August 03, 2005, 02:06:59 PM »
ask your hoster
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline baconzoo

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
    • http://www.baconzoo.com/library
Re: [MOD] for Bypassing The SAFE MODE
« Reply #44 on: September 25, 2005, 04:20:12 PM »
I'm using this MOD buts it still error:
Code: [Select]
Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 65941 is not allowed to access ./data/media/7 owned by uid 65768 in /customer/tnt/docs/gallery/includes/upload.php on line 109

Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 65941 is not allowed to access ./data/media/7 owned by uid 65768 in /customer/tnt/docs/gallery/includes/upload.php on line 114

No image uploaded in forder, no image in gallery... help!

I also get this same error but only on images I upload in a New "Private" category.  ????  My old "Registered User" categories are fine.  So I switched the permissions to Registered just to see but still I error.  Very strange.