[fw-general] Bug in Zend_Form_Element_Multi?

2008-05-07 Thread Xavier Vidal Piera
Hi

I'm building a Zend_Form and one of the elements is a select element,
which needs to be filled with optgroups and values to be rendered like this:

select name=list id=list
optgroup label=Jedis
option value=1 label=ObiObi/option
option value=2 label=YodaYoda/option
/optgroup
optgroup label=Siths
option value=3 label=VaderVader/option
option value=4 label=MaulMaul/option
/optgroup
/select

The passed data array is like this:

$s = new Zend_Form_Element_Select('list');
$data = array(
'Jedis' = array(1 = 'Obi', 2 = 'Yoda'),
'Siths' = array(3 = 'Vader', 4 = 'Maul')
);
$s-setMultiOptions($data);

But, there's a problem inside the addMultiOption function as it
tries to translate an array and it throws this error:

 Warning: array_key_exists() [function.array-key-exists
http://php/function.array-key-exists]:
The first argument should be either a string or an integer in
C:\Documents and Settings\xvidal\Mis
documentos\projects\test\lib\Zend\Translate\Adapter.php on line *460*



-- 
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://web.xaviervidal.net
610.68.41.78


[fw-general] Web services licensing issues

2008-05-07 Thread Federico Cargnelutti
Hi,

A quick question, visiting the Audioscrobbler's site, I found out that the
Web service they provide is for non-commercial use only and it's distributed
under the Creative Commons Attribution-NonCommercial-ShareAlike License. No,
this is a bit confusing, people/companies using the
Zend_Service_Audioscrobbler, for example, might be using their service
illegally without knowing it. If that's the case, I might be wrong, a couple
of questions:

1. Is this documented somewhere?
2. What are the requirements, in terms of licensing, when a web service is
proposed?
3. Are there any other components/services distributed with the Zend
Framework that cannot be used in commercial sites that we need to be aware
of?

Regards,
Federico.


[fw-general] Zend_Search_Lucene and Apache Nutch

2008-05-07 Thread Jani
I've been trying to figure out whether it's possible to use
Zend_Search_Lucene in combination with Apache Nutch,
which has a crawler and it can parse out a lot of formats like HTML, PDF
etc. so it would be perfect for my case.

The docs say Zend_Search_Lucene supports Lucene index formats 1.9 to 2.0,
and according to the change
list for the latest Nutch version (0.9), Nutch uses Lucene 2.0.0, but for
some reason I haven't been able to get ZSL to
open the indexes.

When trying to open() the index, ZSL fails with Fatal error: Uncaught
exception 'Zend_Search_Lucene_Exception' with message 'File
'data/index/_0.cfs' is not readable.'


Anyone got any insight to this matter? Or perhaps a separate crawler
solution to suggest?


[fw-general] Error supression on calls to loadClass across ZF obscuring parse errors

2008-05-07 Thread James Dempster
Hi All,

I've wasted so much time creating row classes and not finding out about a
parse errors all because line 119 of Zend_Db_Table_Rowset_Abstract and it's
shut up operator.

See http://framework.zend.com/issues/browse/ZF-2724

My application would just silently die without any errors in my php.log or
in the output. Very very frustrating.

Can some one explain to me why they are there, why there is such a reliance
on Zend_Loader. Why can't it just try to create the object and have any
class auto loads deal with it, including user auto loads. Using Zend_Loader
in this way put a reliance on Zend_Loader and with the @ sign break my app
without me knowing where the problem occurs.

What can be done to solve this? I've tried removing the @ sign and all seems
to work fine. The same problem exists in other classes.

--
/James


Re: [fw-general] Web services licensing issues

2008-05-07 Thread Bradley Holt
Federico,

I was curious as to how one could legally license a web service (unless it's
through an API key that can only be obtained for non-commercial use) as a
license does not make much sense for a web services API (a terms of use
may make sense, not a license). So, I went and looked at the Audioscrobbler
Web Services http://www.audioscrobbler.net/data/webservices/ page and it
looks like technically the Audioscrobbler *content* you retrieve through the
web service is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike License, not the use of the web service
itself. I know this probably sounds like a trivial point, but I think it's
important. I haven't used Audioscrobbler, but I imagine anyone using the
Audioscrobbler API is an Audioscrobbler user who is aware that the content
on Audioscrobbler is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike License (or at least that it's
copyrighted material) and that the API wouldn't give you any special license
to this content that you wouldn't otherwise have. Perhaps someone who is an
Audioscrobbler user can shed more light on this.

On Wed, May 7, 2008 at 4:37 AM, Federico Cargnelutti 
[EMAIL PROTECTED] wrote:

 Hi,

 A quick question, visiting the Audioscrobbler's site, I found out that the
 Web service they provide is for non-commercial use only and it's distributed
 under the Creative Commons Attribution-NonCommercial-ShareAlike License. No,
 this is a bit confusing, people/companies using the
 Zend_Service_Audioscrobbler, for example, might be using their service
 illegally without knowing it. If that's the case, I might be wrong, a couple
 of questions:

 1. Is this documented somewhere?
 2. What are the requirements, in terms of licensing, when a web service is
 proposed?
 3. Are there any other components/services distributed with the Zend
 Framework that cannot be used in commercial sites that we need to be aware
 of?

 Regards,
 Federico.







-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Zend_Mail_Protocol - Warning

2008-05-07 Thread Thomas Gelf

Hi list,

there is a WARNING not catched by Zend_Mail_Protocol_Abstract:

 Warning: stream_socket_client(): unable to connect to tcp://1.2.3.4:25
 (Connection refused) in /usr/share/php/Zend/Mail/Protocol/Abstract.php
 on line 224

Attached to this mail there is one possible way to fix this. This is
annoying if you are (like me) using Zend_Mail_Protocol_Smtp to test
whether a certain SMTP server is responding or not.

Kind regards,
Thomas

NB: Please let me know if instead of posting to this list directly
opening an issue would have been the better / preferred option.


diff -urN Zend-1.5.1/Mail/Protocol/Abstract.php Zend-1.5.1_patched/Mail/Protocol/Abstract.php
--- Zend-1.5.1/Mail/Protocol/Abstract.php	2008-05-07 13:48:02.0 +0200
+++ Zend-1.5.1_patched/Mail/Protocol/Abstract.php	2008-05-07 13:46:16.0 +0200
@@ -221,7 +221,7 @@
 $errorStr = '';
 
 // open connection
-$this-_socket = stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);
+$this-_socket = @stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);
 
 if ($this-_socket === false) {
 if ($errorNum == 0) {


[fw-general] Zend_Form global decorators overriding per element decorators when using array of options to construct

2008-05-07 Thread Jonathan Tullett

Hello.

I've been playing with Zend_Form today, specifically with the text
decorators, however it's not behaving quite how I expect.

I've extended the Zend_Form class, and I create the form using an array of
options, like so:
class forms_MediaOutletForm extends Zend_Form
{

public function __construct($options = null) {

$loader = Zend_Registry::get('loader');

$loader-load('FormUtils');

parent::__construct(array(
'action' = '/mediaoutlet/process',
'method' = 'post',
'decorators' = array(
'FormElements',
array('HtmlTag', array('tag' = 'p')),
),
'elementDecorators' = array(
array('ViewHelper'),
array('Errors'),
array('Label', array(
'requiredSuffix' = ' *',
'class' = 'leftalign',
)),
array('HtmlTag', array('tag' =
'div', 'class' = 'field')),
),
'elements' = array(
'MediaOutletId' = array('hidden', array(
'validators' = array(
'digits',
),
'readonly' = true,
)),
'Name' = array('text', array(
'validators' = array(
array('stringLength', false,
array(3,70)),
),
'filters' = array('StringTrim'),
'required' = true,
'label' = 'Name',
)),
'CompanyID' = array('select', array(
'validators' = array(
'notEmpty',
),
'required' = true,
'MultiOptions' =
Companies::getIDName(array(Publisher)),
'label' = 'Publisher',
'decorators' =  array(
array('ViewHelper'),
array('Errors'),
array('Label', array(
'requiredSuffix' =
' XXX',
'class' =
'leftalign',
)),
array('DivTag' = 'HtmlTag',
array('tag' = 'div', 'id' = 'company_div' )),
)
)),
),
));
}
}

What's happening is that the specific element decorate is being overridden
due to the setOptions method in Zend/Form.php doing this:
$this-setElementDecorators($elementDecorators);

after all the elements are set.  This is causing my specific element
decorators to be overridden.

Does anyone have any ideas on how I can do what I'm wanting while staying
with this method of form configuration?

Cheers,
Jonathan.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-global-decorators-overriding-per-element-decorators-when-using-array-of-options-to-construct-tp17105287p17105287.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Web services licensing issues

2008-05-07 Thread Federico Cargnelutti
Hi Brad

Yes, I was referring to the consumption of the Web service, the component
itself is distributed under the new BSD licence. Some users might not know
that Audioscrobbler does not allow the use of their Web service in
commercial apps. A quote taken from their site:

If you are making a healthy profit from your site, and using this data to
enhance the site, that sounds commercial. Any queries, just get in touch
with us.

I'm aware that Zend is not responsible for the use of any of the Zend
Framework components, the user is. So, should ZF provide information to the
user of the TC, license and/or any restrictions imposed by a particular Web
service? Or a simple link to the TC page or license?


On Wed, May 7, 2008 at 1:09 PM, Bradley Holt [EMAIL PROTECTED]
wrote:

 Federico,

 I was curious as to how one could legally license a web service (unless
 it's through an API key that can only be obtained for non-commercial use) as
 a license does not make much sense for a web services API (a terms of use
 may make sense, not a license). So, I went and looked at the Audioscrobbler
 Web Services http://www.audioscrobbler.net/data/webservices/ page and it
 looks like technically the Audioscrobbler *content* you retrieve through the
 web service is licensed under a Creative Commons
 Attribution-NonCommercial-ShareAlike License, not the use of the web service
 itself. I know this probably sounds like a trivial point, but I think it's
 important. I haven't used Audioscrobbler, but I imagine anyone using the
 Audioscrobbler API is an Audioscrobbler user who is aware that the content
 on Audioscrobbler is licensed under the Creative Commons
 Attribution-NonCommercial-ShareAlike License (or at least that it's
 copyrighted material) and that the API wouldn't give you any special license
 to this content that you wouldn't otherwise have. Perhaps someone who is an
 Audioscrobbler user can shed more light on this.


 On Wed, May 7, 2008 at 4:37 AM, Federico Cargnelutti 
 [EMAIL PROTECTED] wrote:

  Hi,
 
  A quick question, visiting the Audioscrobbler's site, I found out that
  the Web service they provide is for non-commercial use only and it's
  distributed under the Creative Commons Attribution-NonCommercial-ShareAlike
  License. No, this is a bit confusing, people/companies using the
  Zend_Service_Audioscrobbler, for example, might be using their service
  illegally without knowing it. If that's the case, I might be wrong, a couple
  of questions:
 
  1. Is this documented somewhere?
  2. What are the requirements, in terms of licensing, when a web service
  is proposed?
  3. Are there any other components/services distributed with the Zend
  Framework that cannot be used in commercial sites that we need to be aware
  of?
 
  Regards,
  Federico.
 
 
 
 
 


 --
 Bradley Holt
 [EMAIL PROTECTED]




[fw-general] No pdo_mysql no mysqli, other options?

2008-05-07 Thread Mark Steudel
Hi All,

 

I've just gotten access to a clients NetworkSolutions hosting account and
tried uploading an application to it only to find out that despite having
php 5.2.4 it doesn't have pdo_mysql or mysqli extension installed. Is there
any hope of changing the adapter to something else without having to rewrite
all of my database code?

 

Thanks, MS 

 



[fw-general] Datagrid in Zend Framework

2008-05-07 Thread Filipe Carvalho


   Hi all,

   I'm looking for something like phpGrid (http://www.phpgrid.com/). 
Not so advanced... i will be happy in having out the box features like:

   - Paging
   - Sorting columns
   - Capability to create links values of some columns

   It is not hard to do it, but using model-view-controller pattern I 
can't realize how to do something clean and reusable.


   Can you give some clues how to do it?

   Best Regards,

   Filipe Carvalho
 


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [fw-general] PDO Sqlite + Zend_DB

2008-05-07 Thread Matthew Weier O'Phinney
-- Daniel Rossi [EMAIL PROTECTED] wrote
(on Wednesday, 07 May 2008, 02:12 PM +1000):
 This is the error ive discovered
 
 Uncaught exception 'Zend_Db_Statement_Exception' with message 
 'SQLSTATE[HY000]:
 General error: 10 disk I/O error'

This is an exception being thrown by pdo_sqlite; I suggest googling for
the message to see what potential issues may be.

My guess is it's likely a permissions issue, or a matter of the location
of your sqlite db file (for instance, if it's on a network share, there
may be potential locking issues).

 On 06/05/2008, at 5:57 PM, Daniel Rossi wrote:
 
 
 Hi there I have noticed a major performance issue when using PDO SQlite
 with Zend_DB. When I have a certain sqlite function enabled which adds  a
 temporary key to the sqlite database and then reads the temporary key on
 another system the cpu resources of apache are quite high. This in turn 
 has
 made the machine bottle over and cause it to reboot. When i turn the 
 system
 off and send temporary session id's to the other system the cpu load
 reduces right away.
 
 Where could the problem be ? I am pretty stuck on this one ?
 
 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] how can i set list separator in zend_form?

2008-05-07 Thread Matthew Weier O'Phinney
-- Jacky Chen [EMAIL PROTECTED] wrote
(on Wednesday, 07 May 2008, 02:36 PM +0800):
  I want render multiCheckbox or Radio with no br /\n separator in
 Zend_Form,how can i do that? I look for the code at
 Zend_Form_Decorator_ViewHelper,there is no listsep parameter to be passed.

All element attributes are passed as attributes to the view helper. So,
simply set a 'listsep' attribute on your form element:

$element-listsep = '';

or when adding the element to the form:

$form-addElement('radio', 'foo', array(
'listsep' = '',
// ...
));

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] Zend_Mail_Protocol - Warning

2008-05-07 Thread Matthew Weier O'Phinney
-- Thomas Gelf [EMAIL PROTECTED] wrote
(on Wednesday, 07 May 2008, 02:04 PM +0200):
 there is a WARNING not catched by Zend_Mail_Protocol_Abstract:

  Warning: stream_socket_client(): unable to connect to tcp://1.2.3.4:25
  (Connection refused) in /usr/share/php/Zend/Mail/Protocol/Abstract.php
  on line 224

 Attached to this mail there is one possible way to fix this. This is
 annoying if you are (like me) using Zend_Mail_Protocol_Smtp to test
 whether a certain SMTP server is responding or not.

 Kind regards,
 Thomas

 NB: Please let me know if instead of posting to this list directly
 opening an issue would have been the better / preferred option.

It's always good to post to the list first to verify whether or not
something is a reproducible issue; I find a lot of issue reports that I
have to close as 'Not Reproducible' that could have been avoided had
somebody taken the time to verify it first. :-)

Regarding this particular issue, this is a warning generated by the
underlying stream layer, and contains useful debugging information.
However, considering that the next block of logic checks for an error
condition and throws an exception, it makes sense.

The only other thing I'd change, however, is to add a call to
error_get_last() within the if condition so that the original message
can be reported in the exception:

if ($this-_socket === false) {
$error = error_get_last();
// ...
throw new Zend_Mail_Protocol_Exception('Could not open socket: ' . 
$error['message']);
}

Do, please, report this on the tracker.

 diff -urN Zend-1.5.1/Mail/Protocol/Abstract.php 
 Zend-1.5.1_patched/Mail/Protocol/Abstract.php
 --- Zend-1.5.1/Mail/Protocol/Abstract.php 2008-05-07 13:48:02.0 
 +0200
 +++ Zend-1.5.1_patched/Mail/Protocol/Abstract.php 2008-05-07 
 13:46:16.0 +0200
 @@ -221,7 +221,7 @@
  $errorStr = '';
  
  // open connection
 -$this-_socket = stream_socket_client($remote, $errorNum, $errorStr, 
 self::TIMEOUT_CONNECTION);
 +$this-_socket = @stream_socket_client($remote, $errorNum, 
 $errorStr, self::TIMEOUT_CONNECTION);
  
  if ($this-_socket === false) {
  if ($errorNum == 0) {


-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] Bug in Zend_Form_Element_Multi?

2008-05-07 Thread Matthew Weier O'Phinney
-- Xavier Vidal Piera [EMAIL PROTECTED] wrote
(on Wednesday, 07 May 2008, 10:03 AM +0200):
 I'm building a Zend_Form and one of the elements is a select element, which
 needs to be filled with optgroups and values to be rendered like this:
 
 
 select name=list id=list
 
 optgroup label=Jedis
 option value=1 label=ObiObi/option
 
 option value=2 label=YodaYoda/option
 
 /optgroup
 optgroup label=Siths
 option value=3 label=VaderVader/option
 
 option value=4 label=MaulMaul/option
 
 /optgroup
 /select
 
 The passed data array is like this:
 
 $s = new Zend_Form_Element_Select('list');
 
 $data = array(
 'Jedis' = array(1 = 'Obi', 2 = 'Yoda'),
 
 'Siths' = array(3 = 'Vader', 4 = 'Maul')
 );
 
 $s-setMultiOptions($data);
 
 But, there's a problem inside the addMultiOption function as it tries to 
 translate an array and it throws this error:
 
 
  Warning: array_key_exists() [function.array-key-exists]:
 The first argument should be either a string or an integer in
 C:\Documents and Settings\xvidal\Mis
 documentos\projects\test\lib\Zend\Translate\Adapter.php on line 460

This is a known issue that only appears to affect PHP 5.1.4 on Windows;
we are working on a solution, but have not found one yet. You can track
it at:

http://framework.zend.com/issues/browse/ZF-2974

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] Datagrid in Zend Framework

2008-05-07 Thread Joó Ádám
This looks neat – scaffolding and grid was already mentioned, would be
great to have a ZF component for this job. Is there any ongoing
development in this area?


Regards,
Ádám


RE: [fw-general] Datagrid in Zend Framework

2008-05-07 Thread Robert Castley
The way we have done it is to create a Javascript datagrid and we pass JSON
strings from PHP.

The great thing about this is the client already has the JS cached so
drawing grids is really snappy!

- Robert 

-Original Message-
From: Joó Ádám [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2008 17:11
To: Filipe Carvalho
Cc: fw-general@lists.zend.com
Subject: Re: [fw-general] Datagrid in Zend Framework

This looks neat - scaffolding and grid was already mentioned, would be great
to have a ZF component for this job. Is there any ongoing development in
this area?


Regards,
Ádám


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.


Re: [fw-general] Zend_Form global decorators overriding per element decorators when using array of options to construct

2008-05-07 Thread Matthew Weier O'Phinney
-- Jonathan Tullett [EMAIL PROTECTED] wrote
(on Wednesday, 07 May 2008, 06:45 AM -0700):
 
 Hello.
 
 I've been playing with Zend_Form today, specifically with the text
 decorators, however it's not behaving quite how I expect.
 
 I've extended the Zend_Form class, and I create the form using an array of
 options, like so:

snip

 What's happening is that the specific element decorate is being overridden
 due to the setOptions method in Zend/Form.php doing this:
 $this-setElementDecorators($elementDecorators);
 
 after all the elements are set.  This is causing my specific element
 decorators to be overridden.
 
 Does anyone have any ideas on how I can do what I'm wanting while staying
 with this method of form configuration?

Zend_Form::setOptions() delays the setElementDecorators() call to after
all other configuration, so that any elements set using configuration
will then be affected by it. There is no way to override it.

An easier approach is to define an array of default decorators you want
to use as an class property:

public $defaultElementDecorators = array(...);

Then, omit your elementDecorators declaration, and declare your
decorators for each element by referencing this property:

'foo' = array(
'decorators' = $this-defaultElementDecorators
),

For elements where you want custom decorators, you do as you were doing
previously.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/


Re: [fw-general] Zend_Form global decorators overriding per element decorators when using array of options to construct

2008-05-07 Thread Jonathan Tullett


 Zend_Form::setOptions() delays the setElementDecorators() call to after
 all other configuration, so that any elements set using configuration
 will then be affected by it. There is no way to override it.
Right, that's what I suspected.

 An easier approach is to define an array of default decorators you want
 to use as an class property:

public $defaultElementDecorators = array(...);

 Then, omit your elementDecorators declaration, and declare your
 decorators for each element by referencing this property:
'foo' = array(
   'decorators' = $this-defaultElementDecorators
),
I had considered this but I wondered if there was a better way to manage it
without duplicating configuration 
on each element.

If that's the most straight forward way to do it then great, that's how it
shall be done :)

Thanks for getting back to me so quickly.
Jonathan.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-global-decorators-overriding-per-element-decorators-when-using-array-of-options-to-construct-tp17105287p17109668.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Error supression on calls to loadClass across ZF obscuring parse errors

2008-05-07 Thread pakmannen

I second this. I haven't used Zend_Db before but recently started to look
into it, and had this happen to me.

Also, would be great if something was done about the autoloader throwing
warnings when a class isn't found. Very annoying in a developer environment
when you are using more than one autoloader. 

Think these issues will be fixed in time for 1.5.2?

/Jens Ljungblad


JDempster wrote:
 
 Hi All,
 
 I've wasted so much time creating row classes and not finding out about a
 parse errors all because line 119 of Zend_Db_Table_Rowset_Abstract and
 it's
 shut up operator.
 
 See http://framework.zend.com/issues/browse/ZF-2724
 
 My application would just silently die without any errors in my php.log or
 in the output. Very very frustrating.
 
 Can some one explain to me why they are there, why there is such a
 reliance
 on Zend_Loader. Why can't it just try to create the object and have any
 class auto loads deal with it, including user auto loads. Using
 Zend_Loader
 in this way put a reliance on Zend_Loader and with the @ sign break my app
 without me knowing where the problem occurs.
 
 What can be done to solve this? I've tried removing the @ sign and all
 seems
 to work fine. The same problem exists in other classes.
 
 --
 /James
 
 

-- 
View this message in context: 
http://www.nabble.com/Error-supression-on-calls-to-loadClass-across-ZF-obscuring-parse-errors-tp17103401p17109864.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Error supression on calls to loadClass across ZF obscuring parse errors

2008-05-07 Thread James Dempster
I certainly hope that they're fixed in time for 1.5.2 if it's not on the
agenda to be fixed by then, what can I do to help?

On Wed, May 7, 2008 at 6:07 PM, pakmannen [EMAIL PROTECTED] wrote:


 I second this. I haven't used Zend_Db before but recently started to look
 into it, and had this happen to me.

 Also, would be great if something was done about the autoloader throwing
 warnings when a class isn't found. Very annoying in a developer
 environment
 when you are using more than one autoloader.

 Think these issues will be fixed in time for 1.5.2?

 /Jens Ljungblad


 JDempster wrote:
 
  Hi All,
 
  I've wasted so much time creating row classes and not finding out about
 a
  parse errors all because line 119 of Zend_Db_Table_Rowset_Abstract and
  it's
  shut up operator.
 
  See http://framework.zend.com/issues/browse/ZF-2724
 
  My application would just silently die without any errors in my php.log
 or
  in the output. Very very frustrating.
 
  Can some one explain to me why they are there, why there is such a
  reliance
  on Zend_Loader. Why can't it just try to create the object and have any
  class auto loads deal with it, including user auto loads. Using
  Zend_Loader
  in this way put a reliance on Zend_Loader and with the @ sign break my
 app
  without me knowing where the problem occurs.
 
  What can be done to solve this? I've tried removing the @ sign and all
  seems
  to work fine. The same problem exists in other classes.
 
  --
  /James
 
 

 --
 View this message in context:
 http://www.nabble.com/Error-supression-on-calls-to-loadClass-across-ZF-obscuring-parse-errors-tp17103401p17109864.html
 Sent from the Zend Framework mailing list archive at Nabble.com.




Re: [fw-general] Error supression on calls to loadClass across ZF obscuring parse errors

2008-05-07 Thread Darby Felton

Hi James,

The overall problem with Zend_Loader is fairly nuanced and has different 
ramifications for people using it in various situations. This problem is 
definitely on our radar, and we are thinking about a reasonable solution 
that meets the original Zend Framework goal of extreme simplicity 
while enabling reasonable performance expectations.


Basically there are two competing issues:

1) Zend_Loader::loadClass() and loadFile() do not check to see if a file 
is readable before using include_once upon it. This causes a warning to 
be issued when the file does not exist, but the extra time for checking 
whether the file is readable is not required using this approach. This 
is annoying, for example, to people using Zend_Loader with multiple 
autoloaders because of the extra PHP warning noise.


2) Error suppression of the above (i.e., with @) causes any resulting 
error to be hidden. This is annoying, for example, when loading a user 
class that contains a parse error because the error is harder to find 
than if the error had not been suppressed.


In the meantime, there is a modified version of Zend_Loader I made in 
the incubator if you want to try it out. I'd be particularly interested 
in performance benchmarks, if someone would have time to do such a 
thing, but I haven't heard about any such results to date.


Of course, guidance and contributions from community members like you to 
help solve these issues are most appreciated! :)


Best regards,
Darby

James Dempster wrote:

Hi All,

I've wasted so much time creating row classes and not finding out about 
a parse errors all because line 119 of Zend_Db_Table_Rowset_Abstract and 
it's shut up operator.


See http://framework.zend.com/issues/browse/ZF-2724

My application would just silently die without any errors in my php.log 
or in the output. Very very frustrating.


Can some one explain to me why they are there, why there is such a 
reliance on Zend_Loader. Why can't it just try to create the object and 
have any class auto loads deal with it, including user auto loads. Using 
Zend_Loader in this way put a reliance on Zend_Loader and with the @ 
sign break my app without me knowing where the problem occurs.


What can be done to solve this? I've tried removing the @ sign and all 
seems to work fine. The same problem exists in other classes.


--
/James


[fw-general] ZF, Smarty, VDaemon

2008-05-07 Thread Robert Gormley
This may be a simple question, or it may not.

We are using Zend Framework with Smarty as the front end to a DBMS. One of the 
requirements is the dynamic generation of forms (at the back, I do a query of 
the DB server to get table structures and data integrity rules, etc), and in 
the Model in ZF, I dynamically build a form with all the elements as required. 
This form is then assigned into a Smarty variable, and rendered via the usual 
display .tpl method.
We want to use VDaemon (joint server/client side form validation library) - and 
whilst it should work with vanilla smarty, a la 
http://forum.x-code.com/viewtopic.php?t=39, I'm not sure how to do this via 
Smarty, in that I want to be sure that if I put the VDaemon style tags into the 
tpl as described above (by variable substitution {$formsubstance}, is that 
the blob that's returned back to the browser, or am I missing something 
fundamental? One hiccup that comes to mind isn't a Smarty issue per se, but 
relates to (as you can see from the sample code) how that will be handled in a 
View.

I appreciate that this is an esoteric request. It may well be that the advice 
is Go To ZendForm, ZendLayout and if that really is for the best, so be it 
(though Zend Form is far more palatable, as we've already got a substantial, 
and working, investment in Smarty, re Layout).

Robert


Re: [fw-general] Opening Office documents from a controller action

2008-05-07 Thread Stephan Stapel
 It's not the Zend Framework that causes this issue, as far as I know
 it's entirely the browser. 

Yes and no. IE6 obviously sucks in its support of the Content-* header 
variables.

But what's really funny is, that this very example works in that browser:

$file = myfile.pdf;
$f = fopen($file, rb);
$data = fread($f, 99); // sorry for the 99, it's just a very simple 
example
fclose($f);

header(Pragma: );
header(Cache-Control: );
header(Content-type: application/pdf);
header(Content-Disposition: attachment; filename=\.$file.\);
header(Content-length:  . strlen($data));

echo $data;


I'm asking myself why the output of these two examples might be different...

Regards,

Stephan

___
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00



[fw-general] Unique Login and Password, All Applications

2008-05-07 Thread José de Menezes Soares Neto
Hi Friends!

I would like to construct all my applications base on one single account
administration, like GOOGLE and YAHOO... at these sites, you can login into
a service and use other services as well with a single account...

I would like very much to discuss this with you guys!

Suggestions?

Regards,

José


RE: [fw-general] Datagrid in Zend Framework

2008-05-07 Thread Eric Marden
One of our developers created a helper that is model aware and outputs a
table with those features. Its pretty flexible, and generic and are
using it for many different models (i.e. its not tied to something, but
instead ready to work with any of our model object). There is some talk
about cleaning this up and releasing it for free, but its not quite
ready for that yet.
 
 
--
Eric Marden
 




From: Filipe Carvalho [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 11:40 AM
To: fw-general@lists.zend.com
Subject: [fw-general] Datagrid in Zend Framework



Hi all,

I'm looking for something like phpGrid
(http://www.phpgrid.com/). Not so advanced... i will be happy in having
out the box features like:
- Paging
- Sorting columns
- Capability to create links values of some columns

It is not hard to do it, but using model-view-controller
pattern I can't realize how to do something clean and reusable.

Can you give some clues how to do it?

Best Regards,

Filipe Carvalho
   




RE: [fw-general] No pdo_mysql no mysqli, other options?

2008-05-07 Thread Eric Marden
Switch hosts, or write a mysql adaptor. NS may be willing to compile new
extensions in, depending on the plan. If its a windows server (shudder),
you can turn new extensions on in PHP.ini as it ships with binaries for
the extensions already.
 
I try to get a phpinfo() for the production server before I get started.
This way I can customize my development server to only support the
things the target server can. I've been bit like this before.
 
 
--
Eric Marden

http://www.bonniercorp.com/ 




From: Mark Steudel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 11:26 AM
To: fw-general@lists.zend.com
Subject: [fw-general] No pdo_mysql no mysqli, other options?



Hi All,

 

I've just gotten access to a clients NetworkSolutions hosting
account and tried uploading an application to it only to find out that
despite having php 5.2.4 it doesn't have pdo_mysql or mysqli extension
installed. Is there any hope of changing the adapter to something else
without having to rewrite all of my database code?

 

Thanks, MS 

 



RE: [fw-general] Zend_Search_Lucene and Apache Nutch

2008-05-07 Thread Alexander Veremyev
Hi Jani,

 

Could you create JIRA issue for this and attach to it your index? Or
send it to me for testing?

 

With best regards,

   Alexander Veremyev.

 



From: Jani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 4:07 PM
To: fw-general@lists.zend.com
Subject: [fw-general] Zend_Search_Lucene and Apache Nutch

 

I've been trying to figure out whether it's possible to use
Zend_Search_Lucene in combination with Apache Nutch,
which has a crawler and it can parse out a lot of formats like HTML, PDF
etc. so it would be perfect for my case.

The docs say Zend_Search_Lucene supports Lucene index formats 1.9 to
2.0, and according to the change
list for the latest Nutch version (0.9), Nutch uses Lucene 2.0.0, but
for some reason I haven't been able to get ZSL to
open the indexes.

When trying to open() the index, ZSL fails with Fatal error: Uncaught
exception 'Zend_Search_Lucene_Exception' with message 'File
'data/index/_0.cfs' is not readable.'


Anyone got any insight to this matter? Or perhaps a separate crawler
solution to suggest?

No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.9/1418 - Release Date:
06.05.2008 17:17



RE: [fw-general] Flickr

2008-05-07 Thread Eric Marden
You want getExif
http://www.flickr.com/services/api/flickr.photos.getExif.html
 
 
--
Eric Marden
 




From: Josh Team [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 06, 2008 11:00 PM
To: Zend Framework
Subject: [fw-general] Flickr


So, how can you grab the keywords or other meta data of a photo?
When I do $flickr-getImageDetails($imageID) I only get the different
image sizes.

Thanks!




Re: [fw-general] Error supression on calls to loadClass across ZF obscuring parse errors

2008-05-07 Thread James Dempster
Thank you for you detailed reply.

I will certainly be trying this new class and hopefully get back to you
tomorrow.

Thanks
--
/James

On Wed, May 7, 2008 at 7:18 PM, Darby Felton [EMAIL PROTECTED] wrote:

 Hi James,

 The overall problem with Zend_Loader is fairly nuanced and has different
 ramifications for people using it in various situations. This problem is
 definitely on our radar, and we are thinking about a reasonable solution
 that meets the original Zend Framework goal of extreme simplicity while
 enabling reasonable performance expectations.

 Basically there are two competing issues:

 1) Zend_Loader::loadClass() and loadFile() do not check to see if a file
 is readable before using include_once upon it. This causes a warning to be
 issued when the file does not exist, but the extra time for checking whether
 the file is readable is not required using this approach. This is annoying,
 for example, to people using Zend_Loader with multiple autoloaders because
 of the extra PHP warning noise.

 2) Error suppression of the above (i.e., with @) causes any resulting
 error to be hidden. This is annoying, for example, when loading a user class
 that contains a parse error because the error is harder to find than if the
 error had not been suppressed.

 In the meantime, there is a modified version of Zend_Loader I made in the
 incubator if you want to try it out. I'd be particularly interested in
 performance benchmarks, if someone would have time to do such a thing, but I
 haven't heard about any such results to date.

 Of course, guidance and contributions from community members like you to
 help solve these issues are most appreciated! :)

 Best regards,
 Darby


 James Dempster wrote:

  Hi All,
 
  I've wasted so much time creating row classes and not finding out about
  a parse errors all because line 119 of Zend_Db_Table_Rowset_Abstract and
  it's shut up operator.
 
  See http://framework.zend.com/issues/browse/ZF-2724
 
  My application would just silently die without any errors in my php.log
  or in the output. Very very frustrating.
 
  Can some one explain to me why they are there, why there is such a
  reliance on Zend_Loader. Why can't it just try to create the object and have
  any class auto loads deal with it, including user auto loads. Using
  Zend_Loader in this way put a reliance on Zend_Loader and with the @ sign
  break my app without me knowing where the problem occurs.
 
  What can be done to solve this? I've tried removing the @ sign and all
  seems to work fine. The same problem exists in other classes.
 
  --
  /James
 



RE: [fw-general] Should I use Zend_OpenId's URL manipulation methods?

2008-05-07 Thread Eric Marden
Ideally, the Request Object would implement a getAbsoluteUrl() method.
 
 
OR you can use getBaseURL() along with $_SERVER['SERVER_NAME']
 
 
--
Eric Marden
 




From: Vincent [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 05, 2008 5:14 PM
To: Zend Mailing List
Subject: [fw-general] Should I use Zend_OpenId's URL
manipulation methods?


Hi,

I want the absolute URL to the current website, however, the
getBaseUrl() method of the request object returns a relative URL. So,
I've found that Zend_OpenId, among other useful methods, includes the
absoluteUrl() method.

However, of course Zend_OpenId isn't meant as a URL manipulation
class. Thus, my question is: what would be considered best practice in
this case?

Thanks,
-- 
Vincent 



Re: [fw-general] Zend_Search_Lucene and Apache Nutch

2008-05-07 Thread Jani Hartikainen

Permissions are OK - it's a windows box so should have no probs there.


I will look into this again tomorrow and I can create the issue then.




 (this was sent directly to my mailbox I think)

Check the permissions on the index directories/files.


--
Eric Marden


On Wed, 07 May 2008 22:56:09 +0300, Alexander Veremyev  
[EMAIL PROTECTED] wrote:



Hi Jani,


Could you create JIRA issue for this and attach to it your index? Or
send it to me for testing?


With best regards,

   Alexander Veremyev.




From: Jani [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 07, 2008 4:07 PM
To: fw-general@lists.zend.com
Subject: [fw-general] Zend_Search_Lucene and Apache Nutch


I've been trying to figure out whether it's possible to use
Zend_Search_Lucene in combination with Apache Nutch,
which has a crawler and it can parse out a lot of formats like HTML, PDF
etc. so it would be perfect for my case.

The docs say Zend_Search_Lucene supports Lucene index formats 1.9 to
2.0, and according to the change
list for the latest Nutch version (0.9), Nutch uses Lucene 2.0.0, but
for some reason I haven't been able to get ZSL to
open the indexes.

When trying to open() the index, ZSL fails with Fatal error: Uncaught
exception 'Zend_Search_Lucene_Exception' with message 'File
'data/index/_0.cfs' is not readable.'


Anyone got any insight to this matter? Or perhaps a separate crawler
solution to suggest?

No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.9/1418 - Release Date:
06.05.2008 17:17





RE: [fw-general] Datagrid in Zend Framework

2008-05-07 Thread Kevin Hallmark
Filpe,

 

I'm planning to split off the site specific code and release my
TableMaker script this weekend. 

 

I'll be happy to let you know when that is done. I'll try and draft
together a little usage example explaining the different aspects of the
helper. 

 

I'll make an announcement on this list for interested parties. Since
this is my work e-mail, I won't make the announcement on this list until
Monday.

 

Kevin Hallmark
PHP Developer
Bonnier Corporation
460 N Orlando Ave Suite 200
Winter Park, FL 32789
(407) 571-4960
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 



From: Eric Marden 
Sent: Wednesday, May 07, 2008 3:52 PM
To: fw-general@lists.zend.com
Subject: RE: [fw-general] Datagrid in Zend Framework

 

One of our developers created a helper that is model aware and outputs a
table with those features. Its pretty flexible, and generic and are
using it for many different models (i.e. its not tied to something, but
instead ready to work with any of our model object). There is some talk
about cleaning this up and releasing it for free, but its not quite
ready for that yet.

 

 

--

Eric Marden

 

 





From: Filipe Carvalho [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 11:40 AM
To: fw-general@lists.zend.com
Subject: [fw-general] Datagrid in Zend Framework


Hi all,

I'm looking for something like phpGrid
(http://www.phpgrid.com/). Not so advanced... i will be happy in having
out the box features like:
- Paging
- Sorting columns
- Capability to create links values of some columns

It is not hard to do it, but using model-view-controller
pattern I can't realize how to do something clean and reusable.

Can you give some clues how to do it?

Best Regards,

Filipe Carvalho
   



RE: [fw-general] Unique Login and Password, All Applications

2008-05-07 Thread Steven Brown
Hi Jose,

 

I think in order to achieve this you need to run all of your logins through
a single domain, once a login has been confirmed you set a cookie on a
per-domain basis. You could pass around a session identifier and set cookies
as the user goes from one domain to the next. If a user hits a domain
without the session identifier you could pass them through the login domain
(with details on where to send them back to) which will automatically detect
if they are logged in and return the session identifier.

 

You could likely include this login box using an iframe, the iframe could
perform the login (or detect that they are logged in) through your central
domain and redirect the parent window, or set a javascript variable, or call
a javascript function.

 

You can’t achieve this through XHR since you can’t call other domains.

 

Cheers,
Steven

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of José de
Menezes Soares Neto
Sent: Thursday, 8 May 2008 5:45 AM
To: Zend Framework General
Subject: [fw-general] Unique Login and Password, All Applications

 

Hi Friends!

I would like to construct all my applications base on one single account
administration, like GOOGLE and YAHOO... at these sites, you can login into
a service and use other services as well with a single account...

I would like very much to discuss this with you guys!

Suggestions?

Regards,

José



[fw-general] Zend_Log writing to Zend_Platform

2008-05-07 Thread Joshua Ross
So I started a new job that uses Zend Platform pretty heavily and I am a 
relative newb to it.  My boss wants me to log to Zend Platform if 
possible.  It would be great if I could do that from Zend_Log through a 
Zend_Log_Writer of some sort. Is there a Zend_Log_Writer for writing to 
the Zend Platform logs(I think they are actually called events)?


Any help here would be much appreciated.

Thanks,
-Joshua-



Re: [fw-general] ZF, Smarty, VDaemon

2008-05-07 Thread Matthew Ratzloff
Hi Robert,

I'm not sure how this relates to Zend Framework; it seems more appropriate
for the VDaemon forum.  Maybe I'm missing something?

My thoughts: I've never been a fan of Smarty (especially after working
with it regularly...) and Zend_Form is awesome.  Does that help?  ;-)

-Matt

On Wed, May 7, 2008 11:58 am, Robert Gormley wrote:
 This may be a simple question, or it may not.

 We are using Zend Framework with Smarty as the front end to a DBMS. One of
 the requirements is the dynamic generation of forms (at the back, I do a
 query of the DB server to get table structures and data integrity rules,
 etc), and in the Model in ZF, I dynamically build a form with all the
 elements as required. This form is then assigned into a Smarty variable,
 and rendered via the usual display .tpl method.
 We want to use VDaemon (joint server/client side form validation library)
 - and whilst it should work with vanilla smarty, a la
 http://forum.x-code.com/viewtopic.php?t=39, I'm not sure how to do this
 via Smarty, in that I want to be sure that if I put the VDaemon style tags
 into the tpl as described above (by variable substitution
 {$formsubstance}, is that the blob that's returned back to the browser, or
 am I missing something fundamental? One hiccup that comes to mind isn't a
 Smarty issue per se, but relates to (as you can see from the sample code)
 how that will be handled in a View.

 I appreciate that this is an esoteric request. It may well be that the
 advice is Go To ZendForm, ZendLayout and if that really is for the best,
 so be it (though Zend Form is far more palatable, as we've already got a
 substantial, and working, investment in Smarty, re Layout).

 Robert