Forums / General Questions / safe mode question

safe mode question

Results 1 to 7 of 7
28 Jul 2013, 18:09
#1
johnboycr avatar

johnboycr

Zen Follower

Join Date:
Jan 2009
Posts:
201
Plugin Contributions:
2

safe mode question

I have noticed that in Linux server PHP settings that the safe mode is set to off, as it should be. However, when I look at the version information in the Zen Cart admin it shows that the safe mode is On. Can someone explain how that could be?

And yes, I know I should upgrade. I have tried but with no success. I WILL keep trying. But until then if someone could explain why the safe mode shows a different setting I would be most grateful.
28 Jul 2013, 18:43
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: safe mode question

It's simply responding to whatever PHP replies with this request: ini_get('safe_mode')

What version of PHP are you using?
28 Jul 2013, 18:46
#3
johnboycr avatar

johnboycr

Zen Follower

Join Date:
Jan 2009
Posts:
201
Plugin Contributions:
2

Re: safe mode question

Just for some additional info, I have looked at all of the code, including the .htaccess files, and find nowhere that the value for safe mode was being changed (using php_value). Also, if the safe mode was truly set to On, then I would think that I would get a message to that affect when I entered the admin . Seems strange.
28 Jul 2013, 18:49
#4
johnboycr avatar

johnboycr

Zen Follower

Join Date:
Jan 2009
Posts:
201
Plugin Contributions:
2

Re: safe mode question

PHP version is 5.3.23. Just went through the process of changing all of the deprecated ereg family functions. Also had to change & new to just new in the functions_email.php (I think it was there).
28 Jul 2013, 19:02
#5
johnboycr avatar

johnboycr

Zen Follower

Join Date:
Jan 2009
Posts:
201
Plugin Contributions:
2

Re: safe mode question

Is it possible, at the server, to have different safe mode settings for the server and for a local user ? If so, perhaps I should contact the server admin and ask if they have done this.
28 Jul 2013, 19:07
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: safe mode question

JohnBoyCR:

PHP version is 5.3.23. Just went through the process of changing all of the deprecated ereg family functions. Also had to change & new to just new in the functions_email.php (I think it was there).

As of PHP 5.3.0, PHP safe_mode is deprecated: http://www.php.net/manual/en/features.safe-mode.php
And thus the value displayed is moot, that is: it is meaningless.

JohnBoyCR:

Is it possible, at the server, to have different safe mode settings for the server and for a local user ?

And, yes, while your php.ini files might have a value set in them (in your custom php.ini or your server's master php.ini), the value is meaningless in PHP 5.3.0+

Modern versions of Zen Cart detect the PHP version and skip checking and displaying the value of safe_mode if PHP is greater than 5.3.0
28 Jul 2013, 19:14
#7
johnboycr avatar

johnboycr

Zen Follower

Join Date:
Jan 2009
Posts:
201
Plugin Contributions:
2

Re: safe mode question

Thank you so much DrByte. I will stop worrying this issue and get back to seeing if I can get 1.5.1 to work.
I have incorporated all of the 1.3.8a security upgrades and am using the 1.3.9 .htaccess files, so hopefully
we are a bit more secure than a standard 1.3.8a site. Thanks again for your time and answers.