Wahoo!  I am not alone :-)
 
Many thanks for posting this, I thought I was going mad!
 
This bug is preventing me from upgrading to PHP 5.2.6.
 
So the question is now, who does the bug lie with?  Zend of PHP?
 
Once again .. thank you!

:-)

  _____  

From: Justin Hendrickson [mailto:[EMAIL PROTECTED] 
Sent: 28 May 2008 17:42
To: Robert Castley
Cc: fw-general@lists.zend.com
Subject: Re: [fw-general] PHP 5.2.6 and Zend_Translate


Quick follow-up:

Looks like it's a PHP 5.2.6 bug in Windows. I'm able to reproduce the
behavior with:

<?php
$iterator = new RecursiveDirectoryIterator('/etc',
RecursiveDirectoryIterator::KEY_AS_PATHNAME);

foreach($iterator as $item) {
    echo (string) $item . "\n";
}

KEY_AS_PATHNAME is the source of the problem. On 5.2.5 it returns just the
filename and on 5.2.6 it returns the path information with the filename.


On Wed, May 28, 2008 at 11:30 AM, Justin Hendrickson
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote:


I've just run into the same problem. Windows XP, PHP 5.2.6. <http://5.2.6.> 

I've isolated the problem to line 140:

(Zend_Locale::isLocale((string) $info)

On 5.2.6, (string) $info returns the complete relative pathname
(../languages/en, ../languages/es). On Ubuntu 7.10 w/PHP 5.2.3 and Windows
XP w/PHP 5.2.5 it returns simply the directory name. 


On Tue, May 6, 2008 at 3:08 PM, Robert Castley <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:


WHOOPS! Spoke too soon, forgot to delete my cache. 

Still the same issue, I downloaded with Windows .zip of 5.2.6.
<http://5.2.6.>  
Php.ini files are the same. 

Maybe there is an issue with the SPL in 5.2.6? 

Cheers, 
- Robert 



-----Original Message----- 
From: Robert Castley 
Sent: 06 May 2008 20:42 
To: fw-general@lists.zend.com <mailto:fw-general@lists.zend.com>  

Subject: RE: [fw-general] PHP 5.2.6 and Zend_Translate 

WOW! You are good!  Learnt another thing about PHP5. 

Sorry to trouble you (again!) 

Cheers, 

- Robert 

-----Original Message----- 
From: Thomas Weidner [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent: 06 May 2008 20:26 
To: Robert Castley; fw-general@lists.zend.com
<mailto:fw-general@lists.zend.com>  
Subject: Re: [fw-general] PHP 5.2.6 and Zend_Translate 

Looks like you have not installed SPL. 

Directory scanning works with RecursiveDirectoryIterator and
RecursiveIteratorIterator. 
When eigther of these two is not available the result would be like
described from you. 

Greetings 
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com <http://www.thomasweidner.com>  

----- Original Message ----- 
From: "Robert Castley" <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
To: <fw-general@lists.zend.com <mailto:fw-general@lists.zend.com> > 
Sent: Tuesday, May 06, 2008 9:13 PM 
Subject: RE: [fw-general] PHP 5.2.6 and Zend_Translate 


> Hi, 
> 
> In my custom plugin ( http://framework.zend.com/wiki/x/p6o
<http://framework.zend.com/wiki/x/p6o>  ) I do 
> check for the language 
> 
> <snippet> 
> if (!$translate->isAvailable($locale->getLanguage())) { 
>    $locale->setLocale('en'); 
> } 
> </snippet> 
> 
> This works fine under PHP 5.2.5. <http://5.2.5.>   By adding some trace I
see the 
> following: 
> 
> print_r("List languages (getList) : "); 
> print_r($translate->getList()); 
> 
> HTTP_ACCEPT_LANGUAGE: en-gb 
> List languages (getList) : Array 
> ( 
>    [de] => de 
>    [en] => en 
>    [es] => es 
>    [fr] => fr 
>    [it] => it 
> ) 
> 
> If I switch to PHP 5.2.6 (and nothing else changes) I get: 
> 
> print_r("List languages (getList) : "); 
> print_r($translate->getList()); 
> 
> HTTP_ACCEPT_LANGUAGE: en-gb 
> List languages (getList) : Array 
> ( 
>    [en_GB] => en_GB 
> ) 
> 
> Really strange ... It seems as though with PHP 5.2.6 it won't scan and 
> pick up the other languages in the languages directory. 
> 
> - Robert 
> 
> 
> -----Original Message----- 
> From: Thomas Weidner [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
> Sent: 06 May 2008 19:39 
> To: Robert Castley; fw-general@lists.zend.com
<mailto:fw-general@lists.zend.com>  
> Subject: Re: [fw-general] PHP 5.2.6 and Zend_Translate 
> 
> This error is thrown by Zend_Translate when you try to translate a 
> language which does not exist. 
> 
> I got no problem with 5.2.6, and you are free to add a issue. 
> But you could help yourself and look which language exists before 
> throwing in a new issue. 
> 
> Greetings 
> Thomas Weidner, I18N Team Leader, Zend Framework 
> http://www.thomasweidner.com <http://www.thomasweidner.com>  
> 
> ----- Original Message ----- 
> From: "Robert Castley" <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > 
> To: <fw-general@lists.zend.com <mailto:fw-general@lists.zend.com> > 
> Sent: Tuesday, May 06, 2008 8:31 PM 
> Subject: [fw-general] PHP 5.2.6 and Zend_Translate 
> 
> 
>> Scanning for language files with Zend_Translate was working 
>> beautifully with PHP 5.2.5. <http://5.2.5.>  
>> 
>> Trying out PHP 5.2.6 and this no longer works.  Anyone else found the 
>> same? 
>> 
>> I get the error: 
>> Fatal error: Uncaught exception 'Zend_Translate_Exception' with 
>> message 'Language (en) has to be added before it can be used.' 
>> 
>> 
>> I am using my custom Plugin:   <http://framework.zend.com/wiki/x/p6o
<http://framework.zend.com/wiki/x/p6o> > 
>> http://framework.zend.com/wiki/x/p6o
<http://framework.zend.com/wiki/x/p6o>  
>> 
>> Shall I log an issue?  Or is this an issue with PHP itself? 
>> 
>> 
>> 
>> Robert W. Castley 
>> 
>> Macro 4 
>> 
>> 
>> 
>> 
>> 
>> 
>> _____________________________________________________________________ 
>> ___ This email has been scanned for all known viruses by the 
>> MessageLabs Email 
> 
>> Security Service and the Macro 4 plc internal virus protection system. 
>> _____________________________________________________________________ 
>> ___ 
> 
> 
> ______________________________________________________________________ 
> __ This email has been scanned for all known viruses by the 
> MessageLabs Email Security Service and the Macro 4 plc internal virus 
> protection system. 
> ______________________________________________________________________ 
> __ 
> 
> 
> ______________________________________________________________________ 
> __ This email has been scanned for all known viruses by the 
> MessageLabs Email Security Service and the Macro 4 plc internal virus 
> protection system. 
> ______________________________________________________________________ 
> __ 


________________________________________________________________________ 
This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.

________________________________________________________________________ 


________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________





________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________



________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________

Reply via email to