Page 1 of 1

how: image manager on SAFE MODE ON ?

Posted: Fri May 11, 2007 4:13 pm
by OlafNoehring
Hi

on a server with safe mode turned on I can not access the image manager. The following error occurs

Fatal error: Call to a member function on a non-object in /home/www/htdocs/XXXXXXXX/html/cms/lib/filemanager/ImageManager/Classes/ImageManager.php on line 106

I do not see any image. Does anyone have the same problem? Any idea how I can solve this?

Olaf

Re: how: image manager on SAFE MODE ON ?

Posted: Fri May 11, 2007 4:50 pm
by calguy1000
if you check out the php safe_mode documentation: http://ca3.php.net/features.safe-mode

it states that:
When safe_mode is on, PHP checks to see if the owner of the current script matches the owner of the file to be operated on by a file function or its directory.
Therefore, if the owner of the script is your ftp user, and the owner of the directory or file is the www user, it won't work. This causes lots of problems with lots of php apps, not just CMS Made Simple.  and that's why (well one of the reasons) it has been discontinued, and is generally thought of as a bad idea.

That's why we have that warning in the admin panel about safe mode, and in the listmodules, etc, etc.  I just didn't get to putting anything into the ImageManager when I did the changes.  The same issues will apply there.

In the case you specified, there was a problem reading a directory.  I'm not sure if this is a safe_mode issue, and not a permissions issue in this case, but either way, in 1.1 I've added one line to stop the error from happening (but the functionality still won't work).