1<?php 2// This script prints "skip" if condition does not meet. 3if (!extension_loaded("session") && ini_get("enable_dl")) { 4 $dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so"; 5 @dl("session$dlext"); 6} 7if (!extension_loaded("session")) { 8 die("skip Session module not loaded"); 9} 10$save_path = ini_get("session.save_path"); 11if ($save_path) { 12 if (!file_exists($save_path)) { 13 die("skip Session save_path doesn't exist"); 14 } 15 16 if ($save_path && !@is_writable($save_path)) { 17 if (($p = strpos($save_path, ';')) !== false) { 18 $save_path = substr($save_path, ++$p); 19 } 20 if (!@is_writable($save_path)) { 21 die("skip session.save_path $save_path is not writable\n"); 22 } 23 } 24} 25?> 26