Page 1 of 1

Picture upload error (SAFE_MODE?)

Posted: Mon Oct 16, 2006 7:15 pm
by noppel
Hello all,

I'm very new to php and serendipity :)

First, great blog software to all programmers out there!!
Thanks for your work.

Okay, all works fine in my blog, only one thing goes wrong:

I've created a new directory "test" and want to insert pictures there, like in the root directory of my photo-gallery. The root directory works fine but new created directories not.

I get this error message:

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 2041 is not allowed to access /home/www/user44/html/uploads/test owned by uid 133 in /home/www/user44/html/include/admin/images.inc.php on line 256
Ein Fehler trat beim Dateiupload auf. Vielleicht ist die Datei größer als durch die Server-Konfiguration zugelassen. Bitte mit Ihrem ISP absprechen oder die php.ini datei bearbeiten um größere Uploads zuzulassen.


I hope you understand it because it's german :) the CHMOD of "test" directory is 777... I don't know how to get this working :/

Someone can help?

thx :)

Re: Picture upload error (SAFE_MODE?)

Posted: Mon Oct 16, 2006 10:11 pm
by garvinhicking
Hi!

SafeMode is very picky. You cannot create directories using the s9y interface, you need to do that using your FTP client and assign permissions the same like with you did on your "upload" path.

This is sadly not something that Serendipity can fix. It's only related to your web-servers configuration of the PHP SafeMode.

Not only chmod is important in such an environment, but also the OWNER of a directory/file.

HTH,
Garvin

Posted: Sun Nov 12, 2006 9:37 pm
by mike
Hi,

I'm also a new s9y user. Thank's for this code :D

But I got the same problem as noppel!

Upload into the root (/uploads/) works, but if I try to upload a file into a subfolder I got the same error message:
Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 2583 is not allowed to access .../uploads/test owned by uid 33 in .../include/admin/images.inc.php on line 256
Ein Fehler trat beim Dateiupload auf. Vielleicht ist die Datei größer als durch die Server-Konfiguration zugelassen. Bitte mit Ihrem ISP absprechen oder die php.ini datei bearbeiten um größere Uploads zuzulassen.
BUT: Safe Mode is OFF!

I believe that during the installation the script also shows: Safe Mode is on, but phpinfo shows Off!

Serendipity v1.0.3

EDIT: The same if I try "Rebuild Thumbs" after uploading the images with ftp:
Warning: imagejpeg(): SAFE MODE Restriction in effect. The script whose uid is 2583 is not allowed to access /home/www/web858/html/blog/uploads/privat owned by uid 33 in /home/www/web858/html/blog/include/functions_images.inc.php on line 1011

Warning: imagejpeg(): Invalid filename in /home/www/web858/html/blog/include/functions_images.inc.php on line 1011
Resize privat/2006-11-12_60.jpg: 110x83

Wanted to use privat/2006-11-12_60.jpg as its own thumbnail, but failed to copy!
Best Regards,
Mike

Posted: Mon Nov 13, 2006 10:55 am
by garvinhicking
Hi!

Sadly, chances are that if a PHP error tells you "Safe Mode" is on, that it really is on.

Can you show your phpinfo() script that you have put into the s9y directory?

Best regards,
Garvin

Posted: Mon Nov 13, 2006 2:37 pm
by mike
Got me :( No not really me, but the server seems to be misconfigurated!

I checked the setting via the IP-Conf for my Webaccount. If I open the phpinfo in this way the safe_mode is off (local and server). If I put a file with the phpinfo on the server and open it ...
... safe_mode is ON (local).

Sorry for that (and my english). I'll give you a feedback after my webhoster corrected it.

One Question: Is it possible to get this "information" page, which was shown during the installation (safe mode on/off, memory size, ...), also in the running system. To check if everything is still ok?

Ciao,
Mike

Posted: Mon Nov 13, 2006 3:43 pm
by garvinhicking
Hi!

Not a problem. Glad we got down to that problem so quickly. :)
One Question: Is it possible to get this "information" page, which was shown during the installation (safe mode on/off, memory size, ...), also in the running system. To check if everything is still ok?
Yes, either by "installing" serendipity into a temporary directory, or by temporarily removing the 'serendipity_config_local.inc.php'. if that file is not present, s9y thinks it must be installed.

Regards,
Garvin

Posted: Tue Nov 14, 2006 8:45 pm
by mike
After upgrading my account, safe_mode in on and it works!

Thank you,

Mike