diff --git a/xcache.c b/xcache.c index 9cf549f..2f0de76 100644 --- a/xcache.c +++ b/xcache.c @@ -1955,11 +1955,13 @@ static int xcache_admin_auth_check(TSRMLS_D) /* {{{ */ } if (admin_user == NULL || admin_pass == NULL) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "xcache.admin.user and xcache.admin.pass is required"); + php_error_docref(XCACHE_WIKI_URL "/InstallAdministration" TSRMLS_CC, E_ERROR, + "xcache.admin.user and/or xcache.admin.pass settings is not configured." + " Make sure you've modified the correct php ini file for your php used in webserver."); zend_bailout(); } if (strlen(admin_pass) != 32) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "unexpect %lu bytes of xcache.admin.pass, expected 32 bytes, the password after md5()", (unsigned long) strlen(admin_pass)); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "xcache.admin.pass is %lu chars unexpectedly, it is supposed to be the password after md5() which should be 32 chars", (unsigned long) strlen(admin_pass)); zend_bailout(); } @@ -2008,7 +2010,22 @@ static int xcache_admin_auth_check(TSRMLS_D) /* {{{ */ #define STR "WWW-authenticate: Basic Realm=\"XCache Administration\"" sapi_add_header_ex(STR, sizeof(STR) - 1, 1, 1 TSRMLS_CC); #undef STR - ZEND_PUTS("XCache Auth Failed. User and Password is case sense\n"); +#define STR "Content-type: text/html; charset=UTF-8" + sapi_add_header_ex(STR, sizeof(STR) - 1, 1, 1 TSRMLS_CC); +#undef STR + ZEND_PUTS("\n"); + ZEND_PUTS("XCache Authentication Failed\n"); + ZEND_PUTS("\n"); + ZEND_PUTS("

XCache Authentication Failed

\n"); + ZEND_PUTS("

You're not authorized to access this page due to wrong username and/or password you typed.
The following check points is suggested:

\n"); + ZEND_PUTS("\n"); + ZEND_PUTS("Check XCache wiki page for more information.\n"); + ZEND_PUTS("\n"); + ZEND_PUTS("\n"); zend_bailout(); return 0; diff --git a/xcache.h b/xcache.h index 3feaa58..575edf7 100644 --- a/xcache.h +++ b/xcache.h @@ -5,6 +5,7 @@ #define XCACHE_AUTHOR "mOo" #define XCACHE_COPYRIGHT "Copyright (c) 2005-2007" #define XCACHE_URL "http://xcache.lighttpd.net" +#define XCACHE_WIKI_URL XCACHE_URL "/wiki" #include #include