Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: None
-
Fix Version/s: 1.7.6
-
Component/s: Zend_Locale
-
Labels:None
-
Tags:
Description
Creating a new date with Zend_date throws an exception about missing locale files:
Ex:
$myDate = new Zend_Date("2009-02-03");
results in:
Fatal error: Uncaught exception 'Zend_Locale_Exception' with message 'Missing locale file '/usr/local/php5/lib/php/Zend/Locale/Data/ca.xml' for 'ca' locale.
Zend framework libraries are found under /usr/local/php5/lib/php/Zend/...
Had a look to the server, and the files are really there so I suppose it's trying to load the xml file from somewhere else.
If I upload the Zend Libraries to my project, for example: /home/myProject/library/Zend/...
then this works fine. and the new date is ok.
So, I think there's a problem in Locale/Data.php, in concrete, in line 140 when the function _findRoute( .. ) tries to load the locale xml file.
...
$filename = dirname(_FILE_) . '/Data/' .$locale . '.xml';
...
No there is not.
As you note:
$filename = dirname(FILE) . '/Data/' .$locale . '.xml'
dirname is the directory where Data.php resists.
Subdir Data and the file ca.xml.
You way that the file is there, and Zend_Locale says that it can not read the file.
Maybe both is true.
Still, this is no problem is Zend_Locale but a file system, privilege or php settings problem.