Safe mode warning

See all posts Reply

Safe mode warning new!
by D. Koper, 15 years ago
Hi,

I'm using your class on several sites and now I'm trying to implement it on a new site. I'm on a shared host and when I upload an image I get the following warning (no error because everything else works fine!):

Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'MAGIC' - it's not in the allowed list in /storage/../upload/class.upload.php on line 2270

In know this is because the server runs with safe_mode turned on, but is there a solution so I don't see this warning?

Best regardsReply
Re: Safe mode warning new!
by colin, 15 years ago
Version 0.27 will fix that. You can find 0.27RC2 here, in which the bug is already fixed.Reply
Re: Safe mode warning new!
by Byron, 15 years ago
Colin,

Do you have an ETA on 0.27?

I have created a WordPress plugin call PhotoSmash that utilizes your class, and I have some users that are hitting the Safe Mode problem. I tried out RC2 on one of the them, and it seemed to fix their problem.

I'd be very, very interested in upgrading PhotoSmash to use the new version of class.upload when it comes out.

BTW, thanks a ton for creating this excellent piece of code. So many users take free code for granted...I know I did before writing PhotoSmash and Supple Forms for WordPress. So, thanks for your hard work on this code.

Cheers,
ByronReply
Re: Safe mode warning new!
by colin, 15 years ago
0.27 should be released soon. It will probably not change much compared to 0.27RC2, so I reckon you can safely use 0.27RC2 in your plugin.Reply
Re: Safe mode warning new!
by Byron, 15 years ago
Thanks Colin. That's great news!

Another question: do you have any plans to include support for (or does Upload Class already) using Imagemagick for resizing?

One of my users was having problems with allowable memory limits, so he put in a pre-resize using Imagemagick, which apparently takes less memory than GD. This seemed to get the file sizes small enough that GD didn't blow the PHP Allowable Memory.

I have also noticed that phpThumb uses Imagemagick when possible for speed/memory reasons.

Just wondering if you have any plans to include support for that.

Thanks again!
ByronReply
Re: Safe mode warning new!
by D. Koper, 15 years ago
Awesome, thank you.Reply
Re: Safe mode warning new!
by MOON CONCEPT, 14 years, 10 months ago
I still have a problem with SAFE_MODE :

Avertissement à 10:05:57 10/06/2009 : putenv() : Safe Mode warning: Cannot set environment variable 'MAGIC' - it's not in the allowed list
dans le fichier /home/user/html/composants/include/class.upload_0.27/class.upload.php à la ligne 2283

Avertissement à 10:05:57 10/06/2009 : shell_exec() : Cannot execute using backquotes in Safe Mode
dans le fichier /home/user/html/composants/include/class.upload_0.27/class.upload.php à la ligne 2304

Using the latest version 0.27....Reply
Re: Safe mode warning new!
by colin, 14 years, 10 months ago
The following release should fix this problem when in safe mode: 0.28RC2Reply