Changeset 1125


Ignore:
Timestamp:
2012-08-05T05:32:16+02:00 (21 months ago)
Author:
moo
Message:

move api warning to diagnosis

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/devel/run

    r1124 r1125  
    301301 
    302302    # run {{{1 
    303     export XCACHE_SKIP_FCGI_WARNING=1 
    304303    commandLine=("${tracer[@]}" "${cmd[@]}" "$@") 
    305304 
  • trunk/htdocs/diagnosis/index.php

    r1103 r1125  
    386386} 
    387387// }}} 
     388checking(_T("SAPI Compatibility")); // {{{ 
     389 
     390if (php_sapi_name() == "cgi" || php_sapi_name() == "cgi-fcgi" && !isset($_SERVER["FCGI_ROLE"])) { 
     391    result(N_("error"), _T("CGI is not supported"), _T("Use FastCGI or FPM instead")); 
     392} 
     393else if (php_sapi_name() == "cgi-fcgi" && isset($_SERVER["FCGI_ROLE"]) && (int) getenv("PHP_FCGI_CHILDREN") < 1) { 
     394    result(N_("error") 
     395        , "PHP_FCGI_CHILDREN<1" 
     396        , _T("PHP_FCGI_CHILDREN should be >= 1 and use 1 group of parent/childs model. See http://xcache.lighttpd.net/wiki/Faq")); 
     397} 
     398else { 
     399    result(N_("info"), _T("Looks good")); 
     400} 
     401// }}} 
    388402 
    389403include "./diagnosis.tpl.php"; 
  • trunk/mod_cacher/xc_cacher.c

    r1118 r1125  
    32973297    } 
    32983298 
    3299     /* additional_functions requires PHP 5.3. TODO: find simpler way to do it */ 
    3300 #ifdef ZEND_ENGINE_2_3 
    3301     if (strcmp(sapi_module.name, "cgi-fcgi") == 0 && !sapi_module.additional_functions && !getenv("XCACHE_SKIP_FCGI_WARNING") && !getenv("GATEWAY_INTERFACE")) { 
    3302         if ((getenv("PHP_FCGI_CHILDREN") == NULL) || (atoi(getenv("PHP_FCGI_CHILDREN")) < 1)) { 
    3303             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"); 
    3304         } 
    3305     } 
    3306 #endif 
    3307  
    33083299    xc_config_long(&xc_php_size,       "xcache.size",        "0"); 
    33093300    xc_config_hash(&xc_php_hcache,     "xcache.count",       "1"); 
Note: See TracChangeset for help on using the changeset viewer.