SafeMode detection issue
According to a report on http://www.typo3.net/viewtopic.php?p=43617 Typo3 install tool sometimes claims SafeMode would be turned on although it isn't.
I suspect this is very similar to the SSL detection bug:
(issue imported from #M155)
Updated by Michael Stucki almost 17 years ago
To all those who can reproduce this, can you please do this:
- Fetch this script: http://bugs.typo3.org/qa/path_reporter.php.txt
- Remove the ".txt" extension and put it into the same directory where
your TYPO3 site is installed
- Call it from the browser
- Submit the results including phpinfo (cause this is what we actually need)
After that, please tell us the ID you will get after your submission.
Further, please create a simple script with this content below and put it again into the same directory where your TYPO3 site is installed:
if(ini_get("safe_mode")) echo "1";
else echo "0";
If your safe_mode is enabled, you will get "1", otherwise "0".
If you think this value is wrong, please post it as well.
Thanks for your help!
edited on: 12.06.04 17:29
Updated by Karsten Dambekalns over 14 years ago
Georg Rehfeld sent me this note:
I have found the reason for false detection of
safe_mode = on
on my (hosted) TYPO3 install and believe, that this might be the reason for most others suffering from that problem. Thus I wanted to add a comment to the mentioned (closed) bug, but can't.
The reason in my case was: the friendly hoster tried to turn off safe_mode for me by adding this to my virtual hosts config:
php_admin_value safe_mode off
where he instead should have added:
php_admin_flag safe_mode off
So there seems to be no real issue with TYPO3 at all. His setting is interpreted by PHP as a string value and thus ini_get() returns that string, which is then interpreted as a true value in all the:
if (ini_get('safe_mode')) ...
The only issue remaining would be, that the install tool (and ONLY the install tool) could/should check for such misconfiguration and hint the TYPO3 admin more specifically.
Updated by Michael Stucki over 14 years ago
I can confirm this problem. This is what I just tested (vice versa to your case):
- safe_mode is turned off in php.ini
- httpd.conf sets "php_admin_value safe_mode on" (instead of "php_admin_flag")
- however, PHP honours the setting and turns safe_mode on!
- phpinfo writes that safe_mode is turned off (wrong)
- ini_get says that safe_mode is turned on (correct)
Tested with PHP 4.3.10.
So it seems to me like the ini_get() output is correct, and phpinfo() is not. In any way it's not a TYPO3 issue, and there's even nothing we can change about it. Just consider that there is a configuration problem when you encounter this problem...
I'm closing this but again.