Browse Source

move api warning to diagnosis

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1125 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 9 years ago
parent
commit
41153f0826
  1. 1
      devel/run
  2. 14
      htdocs/diagnosis/index.php
  3. 9
      mod_cacher/xc_cacher.c

1
devel/run

@ -300,7 +300,6 @@ run() {
esac
# run {{{1
export XCACHE_SKIP_FCGI_WARNING=1
commandLine=("${tracer[@]}" "${cmd[@]}" "$@")
case "${cmd[0]}" in

14
htdocs/diagnosis/index.php

@ -385,6 +385,20 @@ else {
result(N_("info"), _T("Looks good"));
}
// }}}
checking(_T("SAPI Compatibility")); // {{{
if (php_sapi_name() == "cgi" || php_sapi_name() == "cgi-fcgi" && !isset($_SERVER["FCGI_ROLE"])) {
result(N_("error"), _T("CGI is not supported"), _T("Use FastCGI or FPM instead"));
}
else if (php_sapi_name() == "cgi-fcgi" && isset($_SERVER["FCGI_ROLE"]) && (int) getenv("PHP_FCGI_CHILDREN") < 1) {
result(N_("error")
, "PHP_FCGI_CHILDREN<1"
, _T("PHP_FCGI_CHILDREN should be >= 1 and use 1 group of parent/childs model. See http://xcache.lighttpd.net/wiki/Faq"));
}
else {
result(N_("info"), _T("Looks good"));
}
// }}}
include "./diagnosis.tpl.php";

9
mod_cacher/xc_cacher.c

@ -3296,15 +3296,6 @@ static PHP_MINIT_FUNCTION(xcache_cacher) /* {{{ */
}
}
/* additional_functions requires PHP 5.3. TODO: find simpler way to do it */
#ifdef ZEND_ENGINE_2_3
if (strcmp(sapi_module.name, "cgi-fcgi") == 0 && !sapi_module.additional_functions && !getenv("XCACHE_SKIP_FCGI_WARNING") && !getenv("GATEWAY_INTERFACE")) {
if ((getenv("PHP_FCGI_CHILDREN") == NULL) || (atoi(getenv("PHP_FCGI_CHILDREN")) < 1)) {
zend_error(E_WARNING, "PHP_FCGI_CHILDREN should be >= 1 and use 1 group of parent/childs model. Set XCACHE_SKIP_FCGI_WARNING=1 to skip this warning. See " XCACHE_WIKI_URL "/Faq");
}
}
#endif
xc_config_long(&xc_php_size, "xcache.size", "0");
xc_config_hash(&xc_php_hcache, "xcache.count", "1");
xc_config_hash(&xc_php_hentry, "xcache.slots", "8K");

Loading…
Cancel
Save