Here’s a new version of the turbo_realpath extension which solves the performance problems with PHP applications and NFS storage. This is mainly a maintenance release that adds support for the latest versions of PHP like 5.4 and 5.5.
How to install turbo_realpath?
You can download this extension from this link.
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, turbo_realpath extension will reenable open_basedir restrictions automatically.
I would like to thank Sebastian Siemssen for reporting the PHP 5.4 incompatibility issue and sending me a working solution (as this version of turbo_realpath extension is based only on his fix).