Bug #14202
closed
ImageMagic detection fails in safe_mode
Added by old_powo over 20 years ago.
Updated about 6 years ago.
Description
If PHP is running in safe mode and "safe_mode_exec_dir" is set to multiple directories separated by colon, ImageMagic binaries are not found. If only one Directory is listed in "safe_mode_exec_dir" the Binaries are found.
Expected behaviour: The install tool should split the safe_mode_exec_dir option and look for the binaries in all directories.
(issue imported from #M158)
Files
As far as I know, directories need to be separated by semi-colons, not colons!
Please try the untested patch and tell me if it fixes the problem.
Unfortunately (otherwise fortunately) I couldn't reproduce the mentioned problem.
My safe_mode_exec_dir was "/bin:/usr/bin", which I replaced with "/usr/bin" to get typo3 working. Now when I changed it back to test the patch, i noticed that it worked even without the patch now. A fter completely reinstalling typo3 it also worked now. Very strange behaviour, I will give you feedback if I get the problem again.
Please try again, I need to know if the patch works. It's obvious to me that the current setting won't work with multiple directories.
- michael
Reminder sent to powo
Hello,
can you please check if my patch fixes your bug?
Cheers, michael
Hi michael,
the patch does not work anymore!
Hey Michael.
a) I updated your patch so it's validating against the latest trunk.
b) colons is correct!
If I set in php.ini:
safe_mode_exec_dir = /usr/local/bin/;/opt/local/bin/
then ini_get("safe_mode_exec_dir") returns only "/usr/local/bin/".
If I separate through colons:
safe_mode_exec_dir = /usr/local/bin/:/opt/local/bin/
then ini_get("safe_mode_exec_dir") returns "/usr/local/bin/:/opt/local/bin/".
And yes: My patch now works for me :). So +1 after testing and reading.
OK. I found out that still no version works. It seems like this isn't connected to the detection in the install tool, if I have lines like this in my php.ini
safe_mode_exec_dir = /usr/local/bin/;/opt/local/bin/
safe_mode_exec_dir = /usr/local/bin/:/opt/local/bin/
safe_mode_exec_dir = "/usr/local/bin/;/opt/local/bin/"
nothing gets detected at all. Seems like PHP cannot access the safe_mode_exec_dir if it has multiple entries.
OK. I found out that still no version works. It seems like this isn't connected to the detection in the install tool, if I have lines like this in my php.ini
safe_mode_exec_dir = /usr/local/bin/;/opt/local/bin/
safe_mode_exec_dir = /usr/local/bin/:/opt/local/bin/
safe_mode_exec_dir = "/usr/local/bin/;/opt/local/bin/"
nothing gets detected at all. Seems like PHP cannot access the safe_mode_exec_dir if it has multiple entries.
Resolved, no change required:
Multiple pathes for safe_mode_exec_dir are impossible.
- Status changed from Resolved to Closed
Also available in: Atom
PDF