Author Topic: safe mode  (Read 22901 times)

0 Members and 1 Guest are viewing this topic.

Offline shadow600

  • Pre-Newbie
  • Posts: 2
    • View Profile
safe mode
« on: September 10, 2002, 09:12:00 PM »
Hi,
ich folgendes Problem. Wenn ich Bilder hochlade und nachträglich die Thumbnails erstellen will, bekomme ich immer folgende Fehlermeldung:

Warning: SAFE MODE Restriction in effect. The script whose uid is 1038 is not allowed to access ./../data/media/1/018_2.jpg owned by uid 30

Dann gehe ich immer per FTP auf den Server (pureserver) und lösche den File und spiele die unter dem chmod 777 wieder drauf. Nur, das geht momentan noch, wenn es auch andere User gibt, ist das nicht mehr möglich.

Was kann ich machen???

Gruß Jörg

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
safe mode
« Reply #1 on: September 10, 2002, 09:20:18 PM »
Einige User hatten hier gepostet, dass es geht wenn man die Kategorie-Ordner von Hand erstellt und mit 777 chmoded.

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

Offline shadow600

  • Pre-Newbie
  • Posts: 2
    • View Profile
safe mode
« Reply #2 on: September 11, 2002, 08:18:23 AM »
Das hatte ich gemacht. Also der Ordner und Unterordner sind per Hand auf 777 gesetzt. Ich will mal den Provider fragen, ob man nicht den Safe Mode abschalten kann. Außerdem muß ich mich mal erkundigen, was das überhaupt ist.
Vielleicht kann man es dann umgehen. Ich hatte erst nachdem ich gepostet hatt gesehen, daß mehrere auch mein Problem haben.

Gruß Jörg

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Warning: SAFE MODE Restriction in effect.
« Reply #3 on: September 20, 2002, 02:36:17 PM »
Hi,

Sorry, I have the same problem. It happened suddenly. I don't know the reason. I did not change anything in my program since a few days, and it was perfectly OK till now.
Please, could you explain what happened it in English?

The WARNING messages as follows:

Warning: SAFE MODE Restriction in effect. The script whose uid is 33073 is not allowed to access ./data/media/117/P1010059.jpg owned by uid 99 in /home/violadab/public_html/violin.pictures/includes/functions.php on line 107

Warning: SAFE MODE Restriction in effect. The script whose uid is 33073 is not allowed to access ./data/thumbnails/117/P1010059.jpg owned by uid 99 in /home/violadab/public_html/violin.pictures/includes/functions.php on line 107

Warning: SAFE MODE Restriction in effect. The script whose uid is 33073 is not allowed to access ./data/thumbnails/117/P1010059.jpg owned by uid 99 in /home/violadab/public_html/violin.pictures/includes/functions.php on line 107


With many thanks,
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
safe mode
« Reply #4 on: September 20, 2002, 02:59:19 PM »
You have enabled safe_mode in your php.ini. Disable it or aks your host if he can do it for you.

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

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Host
« Reply #5 on: September 20, 2002, 03:03:49 PM »
Thanks, Jan for your ever fast response.
I just sent a complaint to my host. I hope they will answer  - they usually don't reply so readily.
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Host response
« Reply #6 on: September 20, 2002, 03:17:48 PM »
Jan, my host replied:

Yes due to certain security issue php has been set to safe mode. It will not run under null or null user, you will need to use your username now.

Is it very bad news?
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
safe mode
« Reply #7 on: September 20, 2002, 04:21:02 PM »
Yes, of course. First, you should update to the newest version of 4images.
Some users reported that creating the cat folders by ftp will allow you to upload images and use the Auto-Thumbnailer while safe_mode is enabled.

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

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
safe_mode
« Reply #8 on: September 20, 2002, 04:35:22 PM »
Dear Jan,
Thanks. I will first try to resolve that issue with my host.
I was reluctant to upgrade because I've done quite a lot of customization, and it was working really fine till now.
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
safe mode
« Reply #9 on: September 20, 2002, 05:08:59 PM »
Dear Jan,

I got that reply from my host:

"php.ini is enabled with
safe mode so your code needs to be able to
run under the user."

So, if I upgrade, this problem would be partially solved?

Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
safe mode
« Reply #10 on: September 20, 2002, 05:26:59 PM »
No, the problem is safe_mode, not the script. I think you should first change the code in functions.php, line 107.

I guess there is the function getimagesize(). Put a @ before the function name:
Code: [Select]
@getimagesize
This will supress the error message and you can run your site for the first time.

The problem will be that you can't use the Auto-Thumbnailer and maybe the folder creation while adding categories will fail. Only way is, to create these folders by hand.

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

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
getimagesize()
« Reply #11 on: September 20, 2002, 06:02:45 PM »
Jan,
There is no getimagesize() on line 107 in includes/functions.php
(I have version 1.6)
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Host reply
« Reply #12 on: September 20, 2002, 09:44:44 PM »
Dear Jan,
I have been on the wire with the host whole day.
Here is what the host's developer wrote:

Here's part of the problem.

The files in Media/117 is not owned by your account.
They are owned by 99

Let me show you a (unix command) ls -la

-rw-rw-rw- 1 99 99 51435 Aug 26 18:41 P1010003.jpg
-rw-rw-rw- 1 99 99 48283 Aug 26 19:14 P1010014.jpg
-rw-rw-rw- 1 99 99 61438 Sep 7 14:47 P1010021.jpg
-rw-rw-rw- 1 99 99 61438 Sep 8 16:47 P1010021_2.jpg
-rw-rw-rw- 1 99 99 16647 Sep 3 14:05 P1010059.jpg
-rw-rw-rw- 1 99 99 47874 Sep 3 14:08 P1010060.jpg

Now I've seen that to happen because your visitors are uploading their images.

The main source of this is your upload script (correct me if i'm wrong) is
not configured to upload the images from your website as your user.

Since safe_mode will not let your run anything that isn't owned by you, you'll
get that problem.

Where did you get this script?


Does it give you any idea?
Dmitry
Regards,
Dmitry
____________________
www.violadabraccio.com

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
safe mode
« Reply #13 on: September 20, 2002, 10:56:29 PM »
hi,

i don't know where you hosting your site, but your server admin should know that every php upload process over a webbrowser will upload files as webserver user and not as your userid
example
Quote

-rw-rw-rw- 1 wwwrun www 51435 Aug 26 18:41 P1010003.jpg

or in your case
Quote

-rw-rw-rw- 1 99 99 51435 Aug 26 18:41 P1010003.jpg


well, what he can do for you:
he should go with his SSH client to your data folder and do following
Quote
linux:/home/account/4images/data # chown -R YOURUSERID:YOURGROUP *


OR

you have to download all data folders (including pics of course) to your pc.
delete the folders and images on your server..
then upload the folders again to the server...
BUT do that just where is the owner/group 99

hope this will help...
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Dmitro

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
safe mode
« Reply #14 on: September 20, 2002, 11:00:06 PM »
Dear Nicki,
Thanks for a comprehensive reply. I will send your comm to the host (in USA). Let's see if it will help.
Best regards,
Dmitry
P.S. Thanks and congratulations for the great program!
Regards,
Dmitry
____________________
www.violadabraccio.com