Back to index

php5  5.3.10
skipif.inc
Go to the documentation of this file.
00001 <?php
00002 // This script prints "skip" if condition does not meet.
00003 if (!extension_loaded("session") && ini_get("enable_dl")) {
00004   $dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
00005   @dl("session$dlext");
00006 }
00007 if (!extension_loaded("session")) {
00008     die("skip Session module not loaded");
00009 }
00010 $save_path = ini_get("session.save_path");
00011 if ($save_path) {
00012        if (!file_exists($save_path)) {
00013               die("skip Session save_path doesn't exist");
00014        }
00015 
00016        if ($save_path && !@is_writable($save_path)) {
00017               if (($p = strpos($save_path, ';')) !== false) {
00018                      $save_path = substr($save_path, ++$p);
00019               }
00020               if (!@is_writable($save_path)) {
00021                      die("skip session.save_path $save_path is not writable\n");
00022               }
00023        }
00024 }
00025 ?>