I proudly present new version of my PHP extension which solves the performance problems with PHP application and NFS storage. This version adds support for safe_mode = on setting.
How to install turbo_realpath?
Please note that 1.2 version of turbo_realpath extension is not compatible with PHP 5.4. Please download the latest 1.3 version which solves this problem (thanks Sebastian Siemssen for reporting and fixing that issue).
In order to use this extension, you have to compile it first:
unzip realpath_turbo_1.2.zip cd realpath_turbo phpize ./configure make cp modules/turbo_realpath.so /usr/lib/php/modules
Please, remember to change /usr/lib/php/modules to the path used by your PHP installation.
Next, you have to configure this PHP extension in php.ini file, like so:
; you have to load the extension first enable=turbo_realpath.so ; set this to 1 in order to disable dangerous PHP functions (link,symlink), or set to 0 in order to ignore potential security issues realpath_cache_security = 1 ; if you want, you can enable safe_mode, in order to do so, you have to switch off ; standard open_basedir setting... open_basedir = off ; and then switch on custom realpath_cache_open_basedir setting, ; (remember, safe mode is not required by realpath_turbo extension, ; you can safely ignore these settings if you want) real_path_cache_safe_mode = on ; then copy the value of open_basedir into realpath_cache_basedir parameter realpath_cache_basedir = /var/www/html/drupal ; and finally DISABLE the open_basedir setting, ; it will be changed automatically to the value of a realpath_cache_basedir setting. ; open_basedir=""
As you can see, in order to use this extension, you have to move the value of open_basedir setting into realpath_cache_basedir and then disable open_basedir itself. After this, PHP will reenable open_basedir restrictions automatically.