Author Topic: Downloads and Upload problems  (Read 6622 times)

0 Members and 1 Guest are viewing this topic.

Offline Luis

  • Pre-Newbie
  • Posts: 3
    • View Profile
Downloads and Upload problems
« on: May 18, 2002, 06:12:31 AM »
Hi:
Congrats for the excellent program Jan, but I've observed some problems in uploads and downloads as well.

When I upload a file it's stored on my server sometimes as chmod 600 (if I do the upload), sometimes as 755 (if a registered user does it) but not always, most of time at 600. I've tried to eliminate the @ from chmod line on upload.php script and change 0777 to 0644 but no way

Code: [Select]
@chmod($this->upload_path[$this->image_type]."/".$this->file_name, 0777);

Doing so, I got the following msg:

Warning: SAFE MODE Restriction in effect. The script whose uid is 23209 is not allowed to access ./data/media/2/image.jpg owned by uid 48 in /home/virtual/site2/fst/home/lluque/public_html/gallery/includes/upload.php on line 134

So, there is no way to download the image just until I change the chmod manually to 644 or something.

Well, the problem is that I can't do it using FlashFXP or Windows Commander. I got the msg: You can't modify attr from remote files, then if I upload the file manually using any FTP client, I've got the file chmod as 644 and no more problems on download.

I've tried the scripts on another server without SAFE MODE and no problems at all.
Any ideas?

Thanks in advance!!  :roll:

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Downloads and Upload problems
« Reply #1 on: May 19, 2002, 08:24:54 PM »
Hi,

because your PHP version is running in Safe Mode, the script is not allowed to set permissions for files. The @ at the beginning of the chmod function only supress the error message you got if you remove it.

Ask your host host to disable Safe Mode or, if you have access, set safe_mode to off in your php.ini.

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

Offline Luis

  • Pre-Newbie
  • Posts: 3
    • View Profile
Downloads and Upload problems
« Reply #2 on: May 19, 2002, 08:31:39 PM »
Thanks for your fast answer. I'l try to talk with my host.

See you!! :)