- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Joomla Framework. Troubleshooter. Warning: Invalid CRT parameters detected
January 9, 2012
Installing Gantry Framework and Joomla template on local server (WAMP) on Windows 7 you can see the following error:
Warning: Invalid CRT parameters detected in …joomla\libraries\gantry\core\utilities\gantrydate.class.php on line 242
This is caused by the CRT values used which are not compatible with Windows.
To resolve it open Joomla installation directory and edit “ibraries\gantry\core\utilities\gantrydate.class.php” file
on line 242 before
1date = strftime(1format, 1time); return 1date;
add
if(PHP_OS == 'WINNT'){ $format = str_replace("%h", "%b", $format); $format = str_replace("%e", "%#d", $format); }
as a result you should have
function _strftime($format, $time) { if(strpos($format, '%a') !== false) $format = str_replace('%a', $this->_dayToString(date('w', $time), true), $format); if(strpos($format, '%A') !== false) $format = str_replace('%A', $this->_dayToString(date('w', $time)), $format); if(strpos($format, '%b') !== false) $format = str_replace('%b', $this->_monthToString(date('n', $time), true), $format); if(strpos($format, '%B') !== false) $format = str_replace('%B', $this->_monthToString(date('n', $time)), $format); if(PHP_OS == 'WINNT'){ $format = str_replace("%h", "%b", $format); $format = str_replace("%e", "%#d", $format); } $date = strftime($format, $time); return $date; }