CMSMS on a hosted env PHP SAFE MODE enabled

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
ortegaj

CMSMS on a hosted env PHP SAFE MODE enabled

Post 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?
cyberman

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post by cyberman »

You can try to create a file named .htaccess with

Code: Select all

php_admin_flag safe_mode off
inside.

The question is if your provider allow this  ::) ...
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
ds236

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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?
elin.rand.nielsen

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post by elin.rand.nielsen »

In which file should I change the code?
I get the same warning updating.

Yours, elin
Pierre M.

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post by calguy1000 »

It's fixed in svn and will be fixed in the 1.0.6 version if, and when, we push that out.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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;
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post by calguy1000 »

you can also look at admin/index.php
and change the test to:

if( strtolower(ini_get('safe_mode')) != 'off' )
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post by Gregor »

Yep, that one did the trick :)
Thanks for your quick response, Calguy1000!
ropale

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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.... :)
Jack @ PharSide

Re: CMSMS on a hosted env PHP SAFE MODE enabled

Post 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!
Locked

Return to “CMSMS Core”