|
Maarten Machiels - 2012-03-01 16:41:54
Hi,
First off, thank you for this wonderful tool. I've been a proud user for many years.
Recently my shared hosting environment did some upgrades causing the setting safe_mode to be expressed as "off". In your file "email_message.php" on line 690, you test for safe mode using the following syntax:
if(function_exists("ini_get") && ini_get("safe_mode"))
return($this->OutputError("it is not possible to set the Return-Path header due to PHP safe mode restrictions"));
In my current setup, this causes safe_mode to be validated as "true", while it is clearly off. No idea why suddenly safe mode isn't expressed as 0 or false anymore.
Right now I've just removed this line, but I feel bad messing up your work. Could you please take this into account in future versions of your script?
Thanks in advance.
Manuel Lemos - 2012-03-02 08:55:26 - In reply to message 1 from Maarten Machiels
I just tried it here and it does not matter if you put off or Off in safe mode value.
What PHP version are you using?
Maarten Machiels - 2012-03-02 12:54:24 - In reply to message 2 from Manuel Lemos
Hi,
Please see my little test here: http://www.chocolata.be/smtest.php
This is the code of smtest.php
<?php
if(function_exists("ini_get") && ini_get("safe_mode")) {
echo 'Safe mode ON; value is '.ini_get("safe_mode");
} else {
echo 'Safe mode OFF; value is '.ini_get("safe_mode");
}
?>
I'm running http://chocolata.be/info.php
Here you can check the settings of my configuration: http://chocolata.be/info.php
Thank you for your follow-up.
Manuel Lemos - 2012-03-03 05:49:05 - In reply to message 3 from Maarten Machiels
I just tried it with PHP 5.3.3 version and it works as expected, so it does not work the way you are getting.
I noticed that you are using the Suhosin extension. I also use that extension in my development environment and it does not affect the outcome.
Still I read in several places that it may be affecting PHP installation on Ubuntu Linux.
I wonder if you can disable Suhosin in your installation and see if it works.
Maarten Machiels - 2012-03-03 12:14:25 - In reply to message 4 from Manuel Lemos
Hi there,
Thank you for your response. As I am on a shared hosting environment, I'm afraid I cannot disable this extension.
It is very well possible that it is just a bug. Is there no other, more elegant way to work around this bug?
Manuel Lemos - 2012-03-03 19:08:34 - In reply to message 5 from Maarten Machiels
I do not think it is a bug, it is probably something intentional that the Suhosin extension does, but I am afraid that only your system administrator can control.
The class itself has no other way of checking if safe mode is on or not to determine if it can set extra parameters. Anyway, that is only relevant if you are setting the message bounce address using the Return-path header. If you do not set that header, the safe mode setting becomes irrelevant.
Maarten Machiels - 2012-03-04 18:00:36 - In reply to message 6 from Manuel Lemos
Thank you for your time and your very clear answer. I'll look into the Suhosin extension with my system administrator.
|