Author Topic: SAFE MODE Restriction  (Read 11348 times)

0 Members and 1 Guest are viewing this topic.

Offline HMMaster

  • Pre-Newbie
  • Posts: 7
    • View Profile
SAFE MODE Restriction
« on: November 22, 2002, 06:04:35 AM »
Warning: SAFE MODE Restriction in effect. The script whose uid is 23345 is not allowed to access /usr/local/libexec/apache/html owned by uid 0 in /home/t/the1985comm/public_html/album/includes/functions.php on line 366

Warning: SAFE MODE Restriction in effect. The script whose uid is 23345 is not allowed to access /usr/local/libexec/apache/html owned by uid 0 in /home/t/the1985comm/public_html/album/includes/functions.php on line 366

 
Can anyone help?
I can't upload too :

Warning: SAFE MODE Restriction in effect. The script whose uid is 23345 is not allowed to access /usr/local/libexec/apache/html owned by uid 0 in /home/t/the1985comm/public_html/album/includes/functions.php on line 366

Warning: Unable to create './data/media/1/dog.gif': No such file or directory in /home/t/the1985comm/public_html/album/includes/upload.php on line 114

Warning: Unable to move '/tmp/phpmi1Pz3' to './data/media/1/dog.gif' in /home/t/the1985comm/public_html/album/includes/upload.php on line 114

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
SAFE MODE Restriction
« Reply #1 on: November 22, 2002, 09:16:49 AM »
1. Open inlcudes/functions.php and replace
Code: [Select]
$src = (!file_exists($media_src) && file_exists(preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src) : $media_src;
with
Code: [Select]
$src = (!@file_exists($media_src) && @file_exists(preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/", "/", get_document_root()."/".$media_src) : $media_src;

2. Check if the folder "1" exists in the data dir. If no, create the fodler and chmod with 777.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Pastorius

  • Pre-Newbie
  • Posts: 2
    • View Profile
SAFE MODE Restriction
« Reply #2 on: November 28, 2002, 02:18:25 AM »
I get simular errors:

========
Warning: SAFE MODE Restriction in effect. The script whose uid is 1105 is not allowed to access /home/rpiil.dk/public_html/web/4images/data/media/5 owned by uid 80 in /home/rpiil.dk/public_html/web/4images/includes/upload.php on line 109

Warning: SAFE MODE Restriction in effect. The script whose uid is 1105 is not allowed to access /home/rpiil.dk/public_html/web/4images/data/media/5 owned by uid 80 in /home/rpiil.dk/public_html/web/4images/includes/upload.php on line 114
Image 1  
  Error uploading image file: 1.JPG
1_2.JPG: Copy error. Please check the directory permissions.

No database entry!
 
=========

I have checked the directory for permissions and its ok (777).
I suppose I have to add a "@" somewhere in upload.php, but I'm not sure where.

Offline Pastorius

  • Pre-Newbie
  • Posts: 2
    • View Profile
SAFE MODE Restriction
« Reply #3 on: November 28, 2002, 02:21:07 AM »
Well I managed to bypass the savemode restrictions, but I still get:

======
Image 1  
  Error uploading image file: 1.JPG
1_2.JPG: Copy error. Please check the directory permissions.

No database entry!
============

Offline farahaqil

  • Pre-Newbie
  • Posts: 1
    • View Profile
SAFE MODE Restriction
« Reply #4 on: December 11, 2002, 05:05:15 AM »
i'm getting similar problem too. have tried the above mod but problem still persists...

Warning: SAFE MODE Restriction in effect. The script whose uid is 628 is not allowed to access /home/virtual/site124/fst/var/www/html/gallery/data/media/1 owned by uid 48 in /home/virtual/site124/fst/var/www/html/gallery/includes/upload.php on line 114

category was created successfully. chmod dbl checked and all are correct.

i think i've done everything to the book but simply cannot upload pictures...

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
SAFE MODE Restriction
« Reply #5 on: December 11, 2002, 09:06:35 AM »
Solution posted by other user with safe_mode enabled: After adding a category, delete the folder in "data/media" and "data/thumbnails" and create it again via FTP and chmod 777.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Cornerbreaker

  • Newbie
  • *
  • Posts: 21
    • View Profile
SAFE MODE Restriction
« Reply #6 on: December 23, 2002, 03:26:46 PM »
ein dankeschön an jan - bei mir gings!

Offline nwpw

  • Pre-Newbie
  • Posts: 6
    • View Profile
    • http://www.nwpw.com
Safe Mode
« Reply #7 on: December 27, 2002, 07:10:28 PM »
Hi farahaqil (and others using Ensim to manage their servers),

I'm not sure if you figured this one out yet but, your site appears to be running on a server managed with a package called Ensim.  Not only do you need to turn off safe_mode as root but, you need to drop a file called PHPSAFE (create with a text editor) into /etc/httpd/conf/site124/ with one line of code in it:

Code: [Select]
php_admin_flag safe_mode off

This will turn off safe_mode at the "local" level.  Restart your webserver and that should do it...


Quote from: farahaqil
i'm getting similar problem too. have tried the above mod but problem still persists...

Warning: SAFE MODE Restriction in effect. The script whose uid is 628 is not allowed to access /home/virtual/site124/fst/var/www/html/gallery/data/media/1 owned by uid 48 in /home/virtual/site124/fst/var/www/html/gallery/includes/upload.php on line 114

category was created successfully. chmod dbl checked and all are correct.

i think i've done everything to the book but simply cannot upload pictures...
Code: [Select]

Offline Karim

  • Pre-Newbie
  • Posts: 2
    • View Profile
    • http://www.karimsaad.com
SAFE MODE Restriction
« Reply #8 on: February 02, 2003, 11:08:17 AM »
@jan: thx to the incude !

MfG,
Karim