Gettext errors on IIS
Permalink
I know that there aren't that many people running Concrete5 on IIS servers, but I'd like to ask if anyone has any clue about random error that pops up usually on first page load after the site has been inactive for like few hours.
To clarify the error a bit, I've shortened the path to MY_SITE_PATH. Normally it is the IIS style c:\domains\client\domain.com\wwwroot
The next page load after error works just fine until the error occurs again after certain amount of inactivity.
Warning: include_once(gettext.php): failed to open stream: No such file or directory in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php on line 146 Warning: include_once(): Failed opening 'gettext.php' for inclusion (include_path='MY_SITE_PATH/libraries/3rdparty;MY_SITE_PATH\concrete/libraries/3rdparty;.;C:\php\pear') in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php on line 146 Warning: include_once(gettext.php): failed to open stream: No such file or directory in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php on line 146 Warning: include_once(): Failed opening 'gettext.php' for inclusion (include_path='MY_SITE_PATH/libraries/3rdparty;MY_SITE_PATH\concrete/libraries/3rdparty;.;C:\php\pear') in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php on line 146 Fatal error: Uncaught exception 'Zend_Exception' with message 'File "gettext.php" does not exist or class "gettext" was not found in the file' in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php:99 Stack trace: #0 MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Translate.php(131): Zend_Loader::loadClass('gettext') #1 MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Translate.php(93): Zend_Translate->setAdapter(Array) #2 MY_SITE_PATH\concrete\core\libraries\localization.php(62): Zend_Translate->__construct(Array) #3 MY_SITE_PATH\concrete\core\libraries\localization.php(35): Concrete5_Library_Localization->setLocale('fi_FI') #4 MY_SITE_PATH\concrete\core\libraries\localization.php(14): Concrete5_Library_Localization->__construct() #5 MY_SITE_PATH\concrete\core\libraries\localizati in MY_SITE_PATH\concrete\libraries\3rdparty\Zend\Loader.php on line 99
To clarify the error a bit, I've shortened the path to MY_SITE_PATH. Normally it is the IIS style c:\domains\client\domain.com\wwwroot
The next page load after error works just fine until the error occurs again after certain amount of inactivity.
I'd like to add that if I recall correctly, the problem started somewhere around 5.6.1 - 5.6.1.2
I wonder if this has anything to do with case sensitivity? The file is Gettext.php
Best Wishes,
Mike
Best Wishes,
Mike
I've noticed too that the Loader is trying to find gettext.php and the filename itself has some uppercase characters. I'll see if there are any configurable options on IIS side for that. When looking at the error it somehow it also seems that the Loader is looking for the file directly in Zend folder and not in the /Translate/Adapter/ -folder.
What makes this weird is that the next page load works just fine.
What makes this weird is that the next page load works just fine.
Are you using something kind of caching engine? xCache..
I know that APC had similar issues with stale cache items. I don't recall the exact details though
I know that APC had similar issues with stale cache items. I don't recall the exact details though
We used to have Wincache on almost every site before 5.6.1 came out, but after that we've used the default because there isn't much difference.
I wonder if this has something to do with in-memory cache (CacheLocal) and how IIS handles the application pools and their memory "reservations"? Maybe there's something fishy going on when pools get either recycled or have gone to sleep mode and then being waked up?
I wonder if this has something to do with in-memory cache (CacheLocal) and how IIS handles the application pools and their memory "reservations"? Maybe there's something fishy going on when pools get either recycled or have gone to sleep mode and then being waked up?
I'd like to bump up this thread and share a solution, or a workaround at least.
We got around the problem by copying the Gettext.php directly to /concrete/libraries/3rdparty and /concrete/libraries/3rdparty/Zend too, as we're still not sure which is the "critical" one. Anyway, after copying the file we haven't seen any errors related to Zend/Gettext. Go figure.
We got around the problem by copying the Gettext.php directly to /concrete/libraries/3rdparty and /concrete/libraries/3rdparty/Zend too, as we're still not sure which is the "critical" one. Anyway, after copying the file we haven't seen any errors related to Zend/Gettext. Go figure.