using system php-fpm always gets us php5.3 ~_~

This commit is contained in:
Shish
2015-08-01 14:25:53 +01:00
parent 21a1b176c6
commit 4f413e7386
6 changed files with 16 additions and 85 deletions

View File

@@ -1,9 +1,6 @@
<?php
// custom routing for stand-alone mode
if(php_sapi_name() != 'cli-server') {
die('local testing only');
}
if(PHP_SAPI !== 'cli-server') die('cli only');
// warehouse files
$matches = array();
@@ -13,12 +10,12 @@ if(preg_match('/\/_(images|thumbs)\/([0-9a-f]{32}).*$/', $_SERVER["REQUEST_URI"]
return true;
}
// static files
if(preg_match('/\.(?:png|jpg|jpeg|gif|css|js)$/', $_SERVER["REQUEST_URI"])) {
// use the default handler (serve static files, interpret php files)
if(preg_match('/\.(?:png|jpg|jpeg|gif|css|js|php)(\?.*)?$/', $_SERVER["REQUEST_URI"])) {
return false;
}
// all other requests
// all other requests (use shimmie routing based on URL)
$_SERVER["PHP_SELF"] = '/';
$_GET['q'] = $_SERVER["REQUEST_URI"];
require_once "index.php";