Re: [fw-general] ZendX_JQuery_Form discussion

2009-12-02 Thread Саша Стаменковић
About point 2, now I see:

)->addElement(
'selectMenu',
'fuel2',
array(
'label' => 'Gorivo:',
'multioptions' => $fuel->fetchAllOptions(),
'JQueryParams' => array('width' => 200)
)

logical :)

Regards,
Saša Stamenković


On Thu, Dec 3, 2009 at 8:15 AM, umpirsky  wrote:

>
> Hi.
>
> I started using ZendX_JQuery_Form, and noted few things:
>
> 1. Replacing ViewHelper with UiWidgetElement produces Zend_Form_Element*
> not
> to render correctly. Then I added ugly patch in
> ZendX_JQuery_Form_Decorator_UiWidgetElement in render method
> (http://pastie.org/725073 line #13).
> I don't see why ZendX_JQuery_Form_Decorator_UiWidgetElement calls
> $elementContent = $view->$helper($name, $value, $jQueryParams, $attribs);
> instead
> $elementContent = $view->$helper($name, $value, $attribs,
> $element->options);
> in this case it can have jQuery options in attribs use it and then just
> unset it - and we have a compatibility with Zend_Form_Element_*. Which is a
> must, since jQuery UI don't have all element replacements(input, checkbox,
> radio...)
>
> 2. Is there a support for factory methods - ZendX_Jquery_Form::addElement()
> ? How do we add elements to ZendX_Jquery_Form?
>
> 3. I use
>
> http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
> and
>
> http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/
> on my site, have already implemented selectmenu (http://pastie.org/725079)
> it would be nice if someone can review.
>
> 4. I have sent my signed CLA a week ago via email, still no response. Maybe
> I can contribute if there is someone from ZendX_JQuery authors to discuss.
>
> Regards,
> Saša Stamenković.
> --
> View this message in context:
> http://n4.nabble.com/ZendX-JQuery-Form-discussion-tp947406p947406.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>


[fw-general] ZendX_JQuery_Form discussion

2009-12-02 Thread umpirsky

Hi.

I started using ZendX_JQuery_Form, and noted few things:

1. Replacing ViewHelper with UiWidgetElement produces Zend_Form_Element* not
to render correctly. Then I added ugly patch in
ZendX_JQuery_Form_Decorator_UiWidgetElement in render method
(http://pastie.org/725073 line #13).
I don't see why ZendX_JQuery_Form_Decorator_UiWidgetElement calls 
$elementContent = $view->$helper($name, $value, $jQueryParams, $attribs); 
instead
$elementContent = $view->$helper($name, $value, $attribs,
$element->options);
in this case it can have jQuery options in attribs use it and then just
unset it - and we have a compatibility with Zend_Form_Element_*. Which is a
must, since jQuery UI don't have all element replacements(input, checkbox,
radio...)

2. Is there a support for factory methods - ZendX_Jquery_Form::addElement()
? How do we add elements to ZendX_Jquery_Form?

3. I use
http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
and 
http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/
on my site, have already implemented selectmenu (http://pastie.org/725079)
it would be nice if someone can review.

4. I have sent my signed CLA a week ago via email, still no response. Maybe
I can contribute if there is someone from ZendX_JQuery authors to discuss.

Regards,
Saša Stamenković.
-- 
View this message in context: 
http://n4.nabble.com/ZendX-JQuery-Form-discussion-tp947406p947406.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Flash file not displaying in Firefox

2009-12-02 Thread shivik

Ok. I got the answer to this.

I had defined the doctype to XHTML_STRICT in my layout. That is what was
causing the problem. I removed it and it works fine now.

Thanks and Regards
ShiVik


shivik wrote:
> 
> The HTML source generated by this htmlFlash() looks like this...
> 
> 
> 
> 
> 
> 
> From a normal embedding of flash file in html, this is missing the "embed"
> tag. How should I add that using the htmlFlash helper?
> 
> Thanks and Regards
> ShiVik
> 
> 
> shivik wrote:
>> 
>> Just an update - still haven't figured out why this isn't working
>> 
>> Seeing the Page Info on Firefox I am able to see the swf file but, it
>> appears broken. Although I am able to save it.
>> 
>> Thanks and Regards
>> ShiVik
>> 
>> 
>> shivik wrote:
>>> 
>>> Hello all
>>> 
>>> I was just trying to embed a flash file in a zend view template, but it
>>> does not display the flash file in Firefox, even though, upon viewing
>>> the source the object tag is there. In IE, Google chrome and safari -
>>> the file is being displayed.
>>> 
>>> Here's what I did -
>>> 
>>> htmlFlash( 'flash/main.swf', array('width' => '100%',
>>> 'height' => '100%' ) ); ?>
>>> 
>>> My flash file is there in webroot/flash/main.swf
>>> 
>>> Am I missing something here?
>>> 
>>> Thanks and Regards
>>> ShiVik
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Flash-file-not-displaying-in-Firefox-tp932938p947353.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Return value from controller action

2009-12-02 Thread Diego Potapczuk
I didn´t understand it very well, but here are some tips that maybe help
you.

Dont´t build Forms inside controllers, make a separated class extending
Zend_Form to define it, then use it in the controllers. If you need to
construct it with some data, you can make a method in the Form class to do
it.

Example to ilustrate:

Form


> class Blog_Form_Post extends Zend_Form {
> public function init()
> {
> $this->setMethod('post');
>
> $id = $this->createElement('hidden','idPost');
> $this->addelement($id);
>
> $texto = $this->createElement('textarea','text');
> $texto->setLabel('Text:')
>   ->setAttrib('size',50);
> $this->addelement($texto);
>
> $salvar = $this->createElement('submit','salvar');
> $salvar->setLabel("Salvar")
>->setIgnore(true);
> $this->addelement($salvar);
> }
>
> public function setIdPost($id)
> {
> $this->getElement('idPost')->setValue($id);
> }
> }
>

Controler

public function editFormAction()
> {
> $post = $this->getRequest()->getPost();
> $form = new Blog_Form_Post();
> $form->setIdPostValue($post['idPost']);
>
> $this->view->form = $form;
> }
>


Now you can use it anywhere, even outside Blog module



::: Diego Potapczuk

»» Analista de sistemas
»» Tel: (71) 3287-8343 / (71) 9144-3062
»» http://www.diegoliveira.com.br


On Wed, Dec 2, 2009 at 7:08 PM, Jurian Sluiman  wrote:

> Hi all,
> Is it possible to fetch the return value from a certain function inside an
> action controller?
>
> This is the use case: I have ad admin module and a specific controller.
> This
> controller builds a form to edit some data. The data might come from
> another
> modules, so I call the admin-controller from that module.
> I want to have something like this (pseudo code):
>
> admin-module/controller-action:
>
>> $form = new Zend_Form;
>
> $subform = someMagicFunction('blog', 'admin', 'getForm');
>
> $form->addSubform($subform);
>
>
> Is this possible to achieve? Currently I fetch the results with a custom
> dispatcher, but that's imho an ugly hack...
>
> Regards, Jurian
>


Re: [fw-general] "observe" controller action

2009-12-02 Thread Cameron
I've done a similar thing by using an Events and Subscribe system, my
controller abstract has a number of event broadcasts throughout, and it's
very simple to build a subscriber that latches on to whatever it needs to in
order to satisfy the business rules. I based mine upon some code I found
through the googles, I've just now quickly tried to find it again with no
success, I suppose though I could be convinced to package up what I've done
and post it somewhere.

On Wed, Dec 2, 2009 at 8:41 PM, Diego Potapczuk  wrote:

> Exactly.
>
>
> ::: Diego Potapczuk
>
> »» Analista de sistemas
> »» Tel: (71) 3287-8343 / (71) 9144-3062
> »» http://www.diegoliveira.com.br
>
>
>
> On Wed, Dec 2, 2009 at 9:22 AM, Vincent de Lau  wrote:
>
>> Consume basically means 'one object using another object'.
>>
>> Basically what it boils down to, is that you should move the code from the
>> controller to an object in the Model layer (a Service is suggested). Both
>> controllers can than consume/use this service to get their work done.
>>
>> Controllers should be thin and use Models to do the work. I can suggest
>> reading http://www.survivethedeepend.com/ for more information on the
>> subject.
>>
>> Vincent de Lau
>>  vinc...@delau.nl
>>
>> > -Original Message-
>> > From: tonystamp [mailto:tonyst...@hotmail.co.uk]
>> > Sent: Wednesday, December 02, 2009 12:34 PM
>> > To: fw-general@lists.zend.com
>> > Subject: Re: [fw-general] "observe" controller action
>> >
>> >
>> > Thanks for the reply, but could you elaborate a bit more- what do you
>> > mean by consume?
>>
>>
>


[fw-general] Bug in Zend_Rest_Client_Result?

2009-12-02 Thread Joe Czhlobatnik


When using Zend_Rest to hit Google's geomapping service, I'm getting isError() 
== true all the time, regardless of the server's response. Here's some sample 
code:

$key = 'my secret API key';$address = '1600 Pennsylvania Ave, Washington, DC 
20500';$rest = new Zend_Rest_Client('http://maps.google.com/maps/geo');$result 
= $rest->output('xml')->key($key)->q($address)->get();if ($result->isError()) { 
   Zend_Debug::dump($result->Response->Status);
Zend_Debug::dump($result->Response->Placemark->Point->coordinates);}
And here's the output:
object(SimpleXMLElement)#11 (2) {  ["code"] => string(3) "200"  ["request"] => 
string(7) "geocode"}
object(SimpleXMLElement)#11 (1) {  [0] => string(24) "-77.0363658,38.8976118,0"}
So, it's succeeding and giving me valid coordinates, but isError() always 
triggers. Looking at the code for Zend_Rest_Client_Result, it appears that it's 
specifically looking for the word "success" in the status branch. Clearly, 
Google is not providing this, so the check fails. I'm not familiar enough with 
other REST services to know if this "success" string is something that they 
should always be providing. I.e., is this a bug in Zend_Rest_Client_Result, or 
will I simply have to extend it to deal with this custom case?
Here is the full output of the result FWIW: http://www.pastie.org/724364
  
_
Get gifts for them and cashback for you. Try Bing now.
http://www.bing.com/shopping/search?q=xbox+games&scope=cashback&form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_Shopping_Giftsforthem_cashback_1x1

[fw-general] Return value from controller action

2009-12-02 Thread Jurian Sluiman
Hi all,
Is it possible to fetch the return value from a certain function inside an
action controller?

This is the use case: I have ad admin module and a specific controller.
This
controller builds a form to edit some data. The data might come from
another
modules, so I call the admin-controller from that module.
I want to have something like this (pseudo code):

admin-module/controller-action:

> $form = new Zend_Form;

$subform = someMagicFunction('blog', 'admin', 'getForm');

$form->addSubform($subform);


Is this possible to achieve? Currently I fetch the results with a custom
dispatcher, but that's imho an ugly hack...

Regards, Jurian


Re: [fw-general] Module Boostraps and parent resources

2009-12-02 Thread Matthijs van den Bos

Yes, If I remember correctly, you can do:

$this->getApplication()->bootstrap('db');
$db = $this->getApplication()->getResource('db');

On 13 okt 2009, at 16:34, Philip G wrote:


I'm going to do my best to explain this.

So, we have the ability to create independent bootstraps for each  
module, as well as having a parent bootstrap within the application  
directory.


I'm having an issue accessing resources from the parent within the  
module based bootstraps.


For example, I have a resource 'db' defined within the parent.  
However, none of the module bootstraps can see it. The DB  
connections are the same: I don't want to have to repeat the db  
connections several times (that's the point of inheritance, no?).


In my application.xml I have the following lines:
 

password="prod"

dbname="prod" port="" />


.

 





Within my Admin_Bootstrap, I have the following two lines:
$this->bootstrap( 'db' );
$db = $this->getResource('db');

The error I'm getting is:  'Resource matching "db" not found'
What I expected was to get the base global resource, 'db' from the  
parent.


Is there a way to allow Admin_Bootstrap to see the parent db  
resource, without having to repeat the db connection several times?


---
Philip
g...@gpcentre.net
http://www.gpcentre.net/




Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread Tim Fountain
2009/12/2 M@ 

>
> I will have to work with the admin of this particular system to check out
> the caching.  In the meantime, I've followed the Zend optimization
> instructions to remove all the require_once lines.  That seems to have given
> a dramatic boost in speed - enough to keep it form timing out, yet it's
> still too slow.  Hopefully the caching will be the answer :)
>

If the application uses a database, check the indexes. I've seen issues like
this before caused by the data from the original server being exported
without any of the indexes.

-- 
Tim Fountain
http://tfountain.co.uk/


Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread M@

Thanks everyone for the responses...

I will have to work with the admin of this particular system to check out
the caching.  In the meantime, I've followed the Zend optimization
instructions to remove all the require_once lines.  That seems to have given
a dramatic boost in speed - enough to keep it form timing out, yet it's
still too slow.  Hopefully the caching will be the answer :)

Thanks again,
M@


On Wed, Dec 2, 2009 at 12:59 PM, dmitrybelyakov [via Zend Framework
Community] 

> wrote:

> Hi,
>
> This indeed should be somehow related to the cache of your application as
> Rob previously stated. You should check what php cache extension was used
> and make sure its available.
> If file cache was used you should check the directories with your caches.
> You should enable both read/execute permissions otherwise being able to only
> read may result in cache silently failing that  makes every request hit the
> database.
>
> Good luck,
> Dmitry.
>
>
> --
>  View message @
> http://n4.nabble.com/Sudden-performance-drop-server-settings-tp932785p933234.html
> To unsubscribe from Sudden performance drop - server settings?, click here< 
> (link removed) =>.
>
>
>


-- 
"You can never run a hill too hard.  You will give up long before you hurt
the hill..." -Anon

-- 
View this message in context: 
http://n4.nabble.com/Sudden-performance-drop-server-settings-tp932785p933240.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread dmitrybelyakov

Hi,

This indeed should be somehow related to the cache of your application as
Rob previously stated. You should check what php cache extension was used
and make sure its available. 
If file cache was used you should check the directories with your caches.
You should enable both read/execute permissions otherwise being able to only
read may result in cache silently failing that  makes every request hit the
database.

Good luck,
Dmitry.

-- 
View this message in context: 
http://n4.nabble.com/Sudden-performance-drop-server-settings-tp932785p933234.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] custom validation error messages in ZF >= 1.8

2009-12-02 Thread Ryan Lange
It appears I was using an older version of ZF (1.9.1, specifically). This
issue was apparently fixed in v1.9.3 (<
http://framework.zend.com/issues/browse/ZF-7034>). Silly me.


On Tue, Dec 1, 2009 at 11:14 AM, Ryan Lange  wrote:

> It looks like Zend_Filter_Input, for some reason, automatically runs a
> NotEmpty validator on every field. The message you're seeing is
> Zend_Filter_Input's NOT_EMPTY_MESSAGE.
>
> Setting the ALLOW_EMPTY meta command will get rid of it, but, of course,
> won't run your own NotEmpty validator.
>
> I haven't figured out a way to override this, though. And customizing
> NOT_EMPTY_MESSAGE is out of the question, because I want per-field messages
> (that don't reference the field name).
>
> Does anyone have a solution?
>
>
>
> On Thu, Aug 20, 2009 at 10:59 AM, David Mintz wrote:
>
>> I could use some help figuring out how to override the default validation
>> error messages with my own. Consider this snippet, based on the example in
>> the docs:
>>
>>
>> $validators = array(
>> 'month' => array(
>> 'NotEmpty',
>> 'Digits',
>> 'messages' => array(
>> 0 =>'my custom message: this is empty',
>> 1=>'my custom message: this ain\'t digits!'),
>> )
>> );
>> $input = new Zend_Filter_Input(null,$validators,
>> array(
>> 'month'=>''
>> )
>> );
>> if ($input->isValid()) {
>> echo "input is valid\n" ;
>> } else {
>> print_r($input->getMessages());
>> }
>>
>>
>> Output when I run this in 1.7.8:
>>
>> Array
>> (
>> [month] => Array
>> (
>> [isEmpty] => my custom message: this is empty yo
>> [stringEmpty] => '' is an empty string
>> )
>>
>> )
>>
>> Output when I run this in 1.9.0: (undesired):
>>
>>
>> Array
>> (
>> [month] => Array
>> (
>> [isEmpty] => You must give a non-empty value for field 'month'
>> )
>>
>> )
>>
>> I am having this problem with several Zend validation classes, not just
>> Zend_Validate_NotEmpty. Any help is much appreciated.
>>
>> --
>> David Mintz
>> http://davidmintz.org/
>>
>> The subtle source is clear and bright
>> The tributary streams flow through the darkness
>>
>
>


Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread Rob Allen

On 2 Dec 2009, at 05:04, M@ wrote:

> The sysadmin for this new box swears it's setup identically to the old one -
> yet I can find no other reasons for the problems.  Are there specific
> PHP/Zend settings at the apache/php level that can totally hose PHP/Zend
> performance?  I know this is very vague - but I'm grasping at straws... I'm
> looking for any known 'gotchas' for Zend on a new apache/php server.
> 



Check whether a byte code cache module is installed for the PHP engine. 
Personally, I'd recommend installing apc. 


Regards,

Rob...


-- 
Rob Allen
Zend Framework Tutorial: http://akrabat.com/zft
Author of Zend Framework in Action: http://www.zendframeworkinaction.com



Re: [fw-general] "observe" controller action

2009-12-02 Thread Diego Potapczuk
Exactly.


::: Diego Potapczuk

»» Analista de sistemas
»» Tel: (71) 3287-8343 / (71) 9144-3062
»» http://www.diegoliveira.com.br


On Wed, Dec 2, 2009 at 9:22 AM, Vincent de Lau  wrote:

> Consume basically means 'one object using another object'.
>
> Basically what it boils down to, is that you should move the code from the
> controller to an object in the Model layer (a Service is suggested). Both
> controllers can than consume/use this service to get their work done.
>
> Controllers should be thin and use Models to do the work. I can suggest
> reading http://www.survivethedeepend.com/ for more information on the
> subject.
>
> Vincent de Lau
>  vinc...@delau.nl
>
> > -Original Message-
> > From: tonystamp [mailto:tonyst...@hotmail.co.uk]
> > Sent: Wednesday, December 02, 2009 12:34 PM
> > To: fw-general@lists.zend.com
> > Subject: Re: [fw-general] "observe" controller action
> >
> >
> > Thanks for the reply, but could you elaborate a bit more- what do you
> > mean by consume?
>
>


RE: [fw-general] "observe" controller action

2009-12-02 Thread Vincent de Lau
Consume basically means 'one object using another object'.

Basically what it boils down to, is that you should move the code from the
controller to an object in the Model layer (a Service is suggested). Both
controllers can than consume/use this service to get their work done.

Controllers should be thin and use Models to do the work. I can suggest
reading http://www.survivethedeepend.com/ for more information on the
subject.

Vincent de Lau
 vinc...@delau.nl

> -Original Message-
> From: tonystamp [mailto:tonyst...@hotmail.co.uk]
> Sent: Wednesday, December 02, 2009 12:34 PM
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] "observe" controller action
> 
> 
> Thanks for the reply, but could you elaborate a bit more- what do you
> mean by consume?



Re: [fw-general] "observe" controller action

2009-12-02 Thread tonystamp

Thanks for the reply, but could you elaborate a bit more- what do you mean by
consume?

Diego Potapczuk wrote:
> 
> You could consume the subscription Service that notify the subscribers in
> the newsController::approveAction.
> 
> 
> 
> ::: Diego Potapczuk
> 
> 
> On Tue, Dec 1, 2009 at 8:31 PM, tonystamp  wrote:
> 
>>
>> I have an action in the administration section of a site, where an
>> article
>> is
>> basically approved and is published to the site
>> (newsController::approveAction). I also have a list of email subscribers,
>> and was wondering if there is any way of observing the
>> newsController::approveAction so that
>> subscriptionController::notifySubscribersAction would be called, to email
>> all the subscribers of the new article.
>>
>> To be clear, i would prefer to keep a loose coupling between the
>> controllers
>> ie i'm looking for a cleaner way than calling
>> subscriptionController::notifySubscribersAction from within
>> newsController::approveAction.
>> --
>> View this message in context:
>> http://n4.nabble.com/observe-controller-action-tp932627p932627.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/observe-controller-action-tp932627p932993.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Flash file not displaying in Firefox

2009-12-02 Thread shivik

Just an update - still haven't figured out why this isn't working

Seeing the Page Info on Firefox I am able to see the swf file but, it
appears broken. Although I am able to save it.

Thanks and Regards
ShiVik


shivik wrote:
> 
> Hello all
> 
> I was just trying to embed a flash file in a zend view template, but it
> does not display the flash file in Firefox, even though, upon viewing the
> source the object tag is there. In IE, Google chrome and safari - the file
> is being displayed.
> 
> Here's what I did -
> 
> htmlFlash( 'flash/main.swf', array('width' => '100%',
> 'height' => '100%' ) ); ?>
> 
> My flash file is there in webroot/flash/main.swf
> 
> Am I missing something here?
> 
> Thanks and Regards
> ShiVik
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Flash-file-not-displaying-in-Firefox-tp932938p932942.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Flash file not displaying in Firefox

2009-12-02 Thread shivik

The HTML source generated by this htmlFlash() looks like this...






>From a normal embedding of flash file in html, this is missing the "embed"
tag. How should I add that using the htmlFlash helper?

Thanks and Regards
ShiVik


shivik wrote:
> 
> Just an update - still haven't figured out why this isn't working
> 
> Seeing the Page Info on Firefox I am able to see the swf file but, it
> appears broken. Although I am able to save it.
> 
> Thanks and Regards
> ShiVik
> 
> 
> shivik wrote:
>> 
>> Hello all
>> 
>> I was just trying to embed a flash file in a zend view template, but it
>> does not display the flash file in Firefox, even though, upon viewing the
>> source the object tag is there. In IE, Google chrome and safari - the
>> file is being displayed.
>> 
>> Here's what I did -
>> 
>> htmlFlash( 'flash/main.swf', array('width' => '100%',
>> 'height' => '100%' ) ); ?>
>> 
>> My flash file is there in webroot/flash/main.swf
>> 
>> Am I missing something here?
>> 
>> Thanks and Regards
>> ShiVik
>> 
>> 
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Flash-file-not-displaying-in-Firefox-tp932938p932944.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread Dan Field


On 2 Dec 2009, at 08:44, Dan Field wrote:



On 2 Dec 2009, at 05:04, M@ wrote:


I've checked the following
-The hardware is newer and faster
-The connection to the db is great, and manual testing from the  
server shows

no issues with large amounts of connections/queries.
-The new server is not under heavy load.

The sysadmin for this new box swears it's setup identically to the  
old one -

yet I can find no other reasons for the problems.  Are there specific
PHP/Zend settings at the apache/php level that can totally hose PHP/ 
Zend
performance?  I know this is very vague - but I'm grasping at  
straws... I'm

looking for any known 'gotchas' for Zend on a new apache/php server.


It's probably nothing to do with ZF and more to do with the fine  
tuning in your php.ini file. I'd be looking at the resource limits  
section:


;;;
; Resource Limits ;
;;;

max_execution_time = 30 ; Maximum execution time of each script,  
in seconds
max_input_time = 60 ; Maximum amount of time each script may  
spend parsing request data

max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 128M  ; Maximum amount of memory a script may  
consume (128MB)


and turn on all error reporting so you know a bit more about what is  
causing timeouts.


error_reporting = E_ALL & ~E_NOTICE

Are you tailing web server logs. These will give you more info to  
work from?



Oh, and you'll want to enable these too for debugging purposes:

log_errors = On

and maybe this one if you prefer to see the errors in the browser  
rather than in log files

display_errors = On

This could be useful too

report_memleaks = On


--
Dan FieldFfôn/Tel. +44 1970 632 582
Peiriannydd Meddalwedd  Senior Software Engineer
Llyfrgell Genedlaethol Cymru   National Library of Wales






Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread scs
- You can also use firefox firebug plugin (net console/tab) to check
the connection delays/profiles.
- We had some issues related to the network in the past. You can also
check your network map(traceroute?).
- There might be an accelerator software installed on the old server
but not on the new one.
- Don't forget to turn on display_startup_errors/display_errors
parameters in your application.ini file.

scs


On Wed, Dec 2, 2009 at 10:44 AM, Dan Field  wrote:
>
> On 2 Dec 2009, at 05:04, M@ wrote:
>
> I've checked the following
> -The hardware is newer and faster
> -The connection to the db is great, and manual testing from the server shows
> no issues with large amounts of connections/queries.
> -The new server is not under heavy load.
>
> The sysadmin for this new box swears it's setup identically to the old one -
> yet I can find no other reasons for the problems.  Are there specific
> PHP/Zend settings at the apache/php level that can totally hose PHP/Zend
> performance?  I know this is very vague - but I'm grasping at straws... I'm
> looking for any known 'gotchas' for Zend on a new apache/php server.
>
> It's probably nothing to do with ZF and more to do with the fine tuning in
> your php.ini file. I'd be looking at the resource limits section:
> ;;;
> ; Resource Limits ;
> ;;;
> max_execution_time = 30     ; Maximum execution time of each script, in
> seconds
> max_input_time = 60     ; Maximum amount of time each script may spend
> parsing request data
> max_input_nesting_level = 64 ; Maximum input variable nesting level
> memory_limit = 128M      ; Maximum amount of memory a script may consume
> (128MB)
> and turn on all error reporting so you know a bit more about what is causing
> timeouts.
> error_reporting = E_ALL & ~E_NOTICE
> Are you tailing web server logs. These will give you more info to work from?
>
>
> --
> Dan Field                    Ffôn/Tel. +44 1970 632 582
> Peiriannydd Meddalwedd                          Senior Software Engineer
> Llyfrgell Genedlaethol Cymru                   National Library of Wales
>
>
>
>


Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread Dan Field


On 2 Dec 2009, at 05:04, M@ wrote:


I've checked the following
-The hardware is newer and faster
-The connection to the db is great, and manual testing from the  
server shows

no issues with large amounts of connections/queries.
-The new server is not under heavy load.

The sysadmin for this new box swears it's setup identically to the  
old one -

yet I can find no other reasons for the problems.  Are there specific
PHP/Zend settings at the apache/php level that can totally hose PHP/ 
Zend
performance?  I know this is very vague - but I'm grasping at  
straws... I'm

looking for any known 'gotchas' for Zend on a new apache/php server.


It's probably nothing to do with ZF and more to do with the fine  
tuning in your php.ini file. I'd be looking at the resource limits  
section:


;;;
; Resource Limits ;
;;;

max_execution_time = 30 ; Maximum execution time of each script,  
in seconds
max_input_time = 60 ; Maximum amount of time each script may spend  
parsing request data

max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 128M  ; Maximum amount of memory a script may  
consume (128MB)


and turn on all error reporting so you know a bit more about what is  
causing timeouts.


error_reporting = E_ALL & ~E_NOTICE

Are you tailing web server logs. These will give you more info to work  
from?




--
Dan FieldFfôn/Tel. +44 1970 632 582
Peiriannydd Meddalwedd  Senior Software Engineer
Llyfrgell Genedlaethol Cymru   National Library of Wales






RE: [fw-general] Problem in displaying favicon in Zend

2009-12-02 Thread shivik

Oh yes. That works. I tried rel="icon". That works as well. Though why this
is happening, seems a bit out of scope here. :-)

Thanks and Regards
ShiVik


Razorblade wrote:
> 
> 
> Hi, 
> try use 'shortcut icon' instead of 'favicon' as rel attribute.
> 
> 
> Sergio Rinaudo
> 
> 
> 
> 
> 
> 
>> Date: Wed, 2 Dec 2009 00:08:18 -0800
>> From: vikramvmalhotra1...@gmail.com
>> To: fw-general@lists.zend.com
>> Subject: Re: [fw-general] Problem in displaying favicon in Zend
>> 
>> 
>> Placing the favicon.ico file in my webroot displays the favicon in Google
>> chrome, but in firefox and safari it still doesn't display. That's just
>> the
>> default behavior I guess. Chrome looks for a favicon in website root,
>> firefox & safari don't.
>> 
>> What could be going wrong?
>> 
>> Thanks and Regards
>> ShiVik
>> 
>> 
>> 
>> shivik wrote:
>> > 
>> > Hello all
>> > 
>> > I cannot get to display the favicon on my zend application. I put the
>> > favicon in my webroot/images folder and used the headLink() helper to
>> > define the favicon in my Bootstrap file. But I just cannot get it to
>> > display.
>> > 
>> > here is what I did...
>> >  
>> >   protected function _initView()
>> >   {
>> > // Initialize view
>> > $view = new Zend_View();
>> >  
>> > $view->headLink()->headLink( array( 'rel' => 'favicon',
>> > 'href' => $view->baseUrl( 'images/favicon.ico' ),
>> > 'type' => 'image/x-icon' ));
>> > 
>> > // Add it to the ViewRenderer
>> > $viewRenderer =
>> >
>> > Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
>> > $viewRenderer->setView($view);
>> >  
>> > // Return it, so that it can be stored by the bootstrap
>> > return $view;
>> > }
>> > 
>> > 
>> > Thanks and Regards
>> > ShiVik
>> > 
>> 
>> -- 
>> View this message in context:
>> http://n4.nabble.com/Problem-in-displaying-favicon-in-Zend-tp932853p932858.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
> 
> _
> I tuoi amici sempre a portata di clic, sul nuovo Web Messenger
> http://www.windowslive.it/foto.aspx
> 

-- 
View this message in context: 
http://n4.nabble.com/Problem-in-displaying-favicon-in-Zend-tp932853p932866.html
Sent from the Zend Framework mailing list archive at Nabble.com.


RE: [fw-general] Problem in displaying favicon in Zend

2009-12-02 Thread Sergio Rinaudo

Hi, 
try use 'shortcut icon' instead of 'favicon' as rel attribute.


Sergio Rinaudo






> Date: Wed, 2 Dec 2009 00:08:18 -0800
> From: vikramvmalhotra1...@gmail.com
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] Problem in displaying favicon in Zend
> 
> 
> Placing the favicon.ico file in my webroot displays the favicon in Google
> chrome, but in firefox and safari it still doesn't display. That's just the
> default behavior I guess. Chrome looks for a favicon in website root,
> firefox & safari don't.
> 
> What could be going wrong?
> 
> Thanks and Regards
> ShiVik
> 
> 
> 
> shivik wrote:
> > 
> > Hello all
> > 
> > I cannot get to display the favicon on my zend application. I put the
> > favicon in my webroot/images folder and used the headLink() helper to
> > define the favicon in my Bootstrap file. But I just cannot get it to
> > display.
> > 
> > here is what I did...
> >  
> >   protected function _initView()
> >   {
> > // Initialize view
> > $view = new Zend_View();
> >  
> > $view->headLink()->headLink( array( 'rel' => 'favicon',
> > 'href' => $view->baseUrl( 'images/favicon.ico' ),
> > 'type' => 'image/x-icon' ));
> > 
> > // Add it to the ViewRenderer
> > $viewRenderer =
> >
> > Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
> > $viewRenderer->setView($view);
> >  
> > // Return it, so that it can be stored by the bootstrap
> > return $view;
> > }
> > 
> > 
> > Thanks and Regards
> > ShiVik
> > 
> 
> -- 
> View this message in context: 
> http://n4.nabble.com/Problem-in-displaying-favicon-in-Zend-tp932853p932858.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
  
_
I tuoi amici sempre a portata di clic, sul nuovo Web Messenger
http://www.windowslive.it/foto.aspx

Re: [fw-general] Problem in displaying favicon in Zend

2009-12-02 Thread shivik

Placing the favicon.ico file in my webroot displays the favicon in Google
chrome, but in firefox and safari it still doesn't display. That's just the
default behavior I guess. Chrome looks for a favicon in website root,
firefox & safari don't.

What could be going wrong?

Thanks and Regards
ShiVik



shivik wrote:
> 
> Hello all
> 
> I cannot get to display the favicon on my zend application. I put the
> favicon in my webroot/images folder and used the headLink() helper to
> define the favicon in my Bootstrap file. But I just cannot get it to
> display.
> 
> here is what I did...
>  
>   protected function _initView()
>   {
> // Initialize view
> $view = new Zend_View();
>  
> $view->headLink()->headLink( array( 'rel' => 'favicon',
> 'href' => $view->baseUrl( 'images/favicon.ico' ),
> 'type' => 'image/x-icon' ));
> 
> // Add it to the ViewRenderer
> $viewRenderer =
>
> Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
> $viewRenderer->setView($view);
>  
> // Return it, so that it can be stored by the bootstrap
> return $view;
> }
> 
> 
> Thanks and Regards
> ShiVik
> 

-- 
View this message in context: 
http://n4.nabble.com/Problem-in-displaying-favicon-in-Zend-tp932853p932858.html
Sent from the Zend Framework mailing list archive at Nabble.com.