First of all, why do this check?? Session may be working perfectly without the webuser having write access in this directory. Also what if someone uses another way to store sessions (a database for instance)?
Second, the check does not work when you use the path prepend options (as described on http://nl3.php.net/manual/en/ref.sessio ... .save-path ):
Also in PHP5 you can prepend the default permissions a session file is created with like so:There is an optional N argument to this directive that determines the number of directory levels your session files will be spread around in. For example, setting to '5;/tmp' may end up creating a session file and location like /tmp/4/b/1/e/3/sess_4b1e384ad74619bd212e236e52a5a174If . In order to use N you must create all of these directories before use. A small shell script exists in ext/session to do this, it's called mod_files.sh. Also note that if N is used and greater than 0 then automatic garbage collection will not be performed, see a copy of php.ini for further information. Also, if you use N, be sure to surround session.save_path in "quotes" because the separator (;) is also used for comments in php.ini.
session.save_path = "0;0660;/usr/local/apache/sessions"
But the joomla preinstallation check reads the string and then tries to write to the exact string session_save_path() returns, so it tries to write in "0;0660;/usr/local/apache/sessions". Which obviously fails.
How to fix: strip the prepended options from the return string.
How to really fix: remove the check entirely, or test it by actually creating a session and reading variables from it.