Page 1 of 1
CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Wed Mar 28, 2007 1:51 pm
by ortegaj
I got
WARNING: PHP Safe mode is enabled. This will cause difficulty with files uploaded via the web browser interface, including images, theme and module XML packages. You are advised to contact your site administrator to see about disabling safe mode.
and
The modules folder is not writable, if you would like to install modules by uploading an XML file you need to make the modules folder have full read/write/execute permissions (chmod 777). Safe mode may also be in effect. (Troubleshooting)
I did chmod the modules to 777 so the only other thing is the safe mode.
Is there any other way to work around this NOT USING an ftp client or shell?
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Wed Mar 28, 2007 2:07 pm
by cyberman
You can try to create a file named .htaccess with
inside.
The question is if your provider allow this

...
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Sat Apr 07, 2007 8:15 am
by petert
ortegaj wrote:
The modules folder is not writable, if you would like to install modules by uploading an XML file you need to make the modules folder have full read/write/execute permissions (chmod 777). Safe mode may also be in effect. (Troubleshooting)
Had the same problem. Turns out the error is about the uploads folder ......
I chmoded it 777 and it all works now
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Tue Apr 10, 2007 10:12 pm
by ds236
ortegaj wrote:
I got
WARNING: PHP Safe mode is enabled. This will cause difficulty with files uploaded via the web browser interface, including images, theme and module XML packages. You are advised to contact your site administrator to see about disabling safe mode.
and
The safe mode check in 1.0.5 appears to be buggy. I have safe mode globally enabled, but it's disabled for the site where I just updated to 1.0.5. And phpinfo() confirms this. I did a little debug work, and the solution was simple.
The code said:
if (ini_get('safe_mode') )
{
issue the warning;
}
what it SHOULD say, is:
if (ini_get('safe_mode') != 'off')
{
issue the warning
}
At least that resolved the issue for me.
So how does one get this properly added to the bug list?
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Sun Apr 15, 2007 10:08 pm
by elin.rand.nielsen
In which file should I change the code?
I get the same warning updating.
Yours, elin
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 1:34 pm
by Pierre M.
ds236 wrote:
The safe mode check in 1.0.5 appears to be buggy.
(snip)
At least that resolved the issue for me.
So how does one get this properly added to the bug list?
Congrats. Well done.
Please look at
http://dev.cmsmadesimple.org/projects/cmsmadesimple
There is a "Bugs" link to
http://dev.cmsmadesimple.org/tracker/?a ... unc=browse
Pierre M.
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 2:08 pm
by calguy1000
It's fixed in svn and will be fixed in the 1.0.6 version if, and when, we push that out.
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 3:40 pm
by Gregor
Great solving this!
Without not willing to download the svn-version, but would you show us the code and source where you fixed it?
Thanks,
Gregor
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 3:44 pm
by calguy1000
in lib/misc.functions.php, change any lines (there are two) that have
ini_get('safe_mode')
to:
$safe_mode = (strtolower(ini_get('safe_mode')) == "off")?FALSE:TRUE;
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 4:10 pm
by Gregor
Thanks Calguy1000. I only had to change one line (the last one found)

my settings are equal to ds236, and it still gives the same error. I'm wondering if this did the trick for the dsr236.
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 4:17 pm
by calguy1000
you can also look at admin/index.php
and change the test to:
if( strtolower(ini_get('safe_mode')) != 'off' )
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Mon Apr 16, 2007 7:55 pm
by Gregor
Yep, that one did the trick

Thanks for your quick response, Calguy1000!
Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Tue Jun 26, 2007 5:12 pm
by ropale
Please i dont find this:
I have version 1.0.8.
in lib/misc.functions.php, change any lines (there are two) that have
ini_get('safe_mode')
to:
$safe_mode = (strtolower(ini_get('safe_mode')) == "off")?FALSE:TRUE;
Thank Youuuuu....

Re: CMSMS on a hosted env PHP SAFE MODE enabled
Posted: Tue Jul 03, 2007 1:56 am
by Jack @ PharSide
I am on version 1.0.8 too and I am having this same problem with the image and file manager. Is there a work around for this version? Was this fixed and I should refocus on permission issues - although went throw entire system and verified all permissions several times before submitting here

.
I was able to fake it sort of but the line of code you guys mentioned didn't look exactly the same. So, when I swapped it out - it bypassed the error message and uploaded a blank file. No file size but the name was there. Wat is this?? lol Now I replaced all original code in hopes to find another solution.
Thanks as always!