Re: [fw-general] encoding problem in ajax request

2010-02-04 Thread drm
i...@antoniocaccese.it wrote: In a controller i use ajaxContext for some actions. In these actions i need to apply utf8_decode for all text fields in POST otherwise the accented characters become like è à ì ù à in the DB. You should fix this on the JS side. The ajax post is apparently

Re: [fw-general] Getting JSON POST data from Zend?

2010-02-04 Thread drm
Hi Adam, How to easily get post data in php/zf if it's json instead of 'normal' query string? There are two possible solutions. Either you let the server transform the json data using Zend_Json, reading it from the raw post body using the http request's getRawBody() method. I am not sure

Re: [fw-general] IE6 crashes on Zend_Dojo

2010-02-04 Thread drm
Ralf Eggert wrote: I have no idea if this problem also occurs on a native IE6 installation. In the target audience for this special website the IE6 is still used by more than 30% of the users so the IE6 still needs to be supported. I'd also suggest using a virtual machine with a native Windows

Re: [fw-general] zend frameworks with ubuntu 9.10

2010-02-04 Thread drm
Hi, sathya.zend wrote: Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/share/php5:/usr/share/pear:/usr/share/php/libzend-framework-php/zend') in /var/www/works/zend/social/testbox/library/Zend/Application.php on line 80

Re: [fw-general] Re: Zend_Session setId

2010-02-03 Thread drm
Hi, Саша Стаменковић wrote: i need to set exact session ID in order to regenerate specific session. Ah, I see. In that case you'll probably need a redirect. Why do you need this, though? If your session id's aren't really random, it might be easier to hijack them Gerard

Re: [fw-general] Re: Zend_Session setId

2010-02-02 Thread drm
/session-regenerate-id example #1 So I agree with Pádraic that it should in fact work, even after the session has been started. Are you sure you are using the correct logic for this? drm / Gerard

Re: [fw-general] Re: Zend_Session setId

2010-02-02 Thread drm
Hi, Саша Стаменковић wrote: I only know that: Zend_Session::setId('13123'); fails with Zend_Session_Exception: The session has already been started. The session id must be set first. if session is already started. Well, I think we had established already that that makes perfect sense

Re: [fw-general] Overriding Zend_Form::isValid()

2010-01-22 Thread drm
Hi, bparise wrote: But, this doesn't work. Zend_Form::isErrors() doesn't dynamically loop through elements to get errors (which means the form doesn't get notification of us adding an error the 'email' element). Plus, if you call parent::isValid($data) after we set the email error, they are

Re: [fw-general] query tracker in Zend_Db for some tables

2010-01-22 Thread drm
Hi Guillaume, Guillaume ORIOL wrote: I would like to implement a query tracker in Zend_Db for some tables. The idea is to store in db an history of all SQL queries that were executed on these tables. First of all, never use a timestamp as a primary key. You can't be sure a timestamp is

Re: [fw-general] Re: Autoload on Linux

2010-01-15 Thread drm
Hi Diego, Because the linux is file case sensitive, the folder all have to begin with uppercase, don´t know why is that, because zend folders like forms and models does not need this rule, and even can be in plural form. So IMHO this is a bug. This is probably a difference in implementation

Re: [fw-general] Doctrine Counter Behavior

2010-01-13 Thread drm
Record pattern isn't really a good practice for separating business model logic and persistence logic. These two are intertwined in such a pattern, and it would (imho) actually overcomplicate things trying to separate these more than absolutely necessary. HTH drm / Gerard

Re: [fw-general] sharing zend framework inside the main domain from the subdoamin

2009-12-10 Thread drm
Hi, prado wrote: But the web hosting company's production server (plesk) also creates the folders with all that standard public_html folder and others once I create a sub-domain. Now I don't want that to happen, I want the sub-domain to exist but without its physical folders. I will be asking

Re: [fw-general] sharing zend framework inside the main domain from the subdoamin

2009-12-09 Thread drm
Hi Pradosh prado wrote: subdomain installation? Do i need to do some bootstrapping on the subdomain? Can this be achieved through a module that sits on the subdomain and that can be connected to the zf on the main domain? What do you mean by connected? I'm assuming you mean example.org by

Re: [fw-general] Discontinuing Zend Entity in favour of Doctrine integration

2009-11-25 Thread drm
source (LGPL) and whatever company would be behind it wouldn't make any difference? Also, check your facts, because what you say isn't even true. drm / Gerard

Re: [fw-general] Discontinuing Zend Entity in favour of Doctrine integration

2009-11-25 Thread drm
Hi, Arié Bénichou wrote: Please Gerard, don't tell me what i'm supposed to do. You don't get the point here, the question is : why did'nt you use Xyster ORM? Indeed I don't get the point. And I think that is because your reasoning is flawed. You are basically saying we should use Xyster,

Re: [fw-general] Apache returning 404 instead of errorHandler page

2009-11-21 Thread drm
Hi, It might have some to do with ErrorDocument directives on your webserver. I have seen instances of Apache catching PHP sending a HTTP/1.1 404 response code, so assuming you want to display the ErrorDocument in stead of the response body. Try disabling this directive. HTH, drm / Gerard

Re: [fw-general] Issues with $this-headScript()

2009-11-17 Thread drm
Hi Ian, How much hacking is need do you think to make the latest release work with 5.1.6.? I suppose it depends on what packages I am using, bit desperate at this client refuses to upgrade. Would it help you if you'd patch the code to use an array in stead of the iterator? $container =

Re: [fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-15 Thread drm
Hi Ralf, thanks, that pointed me in the right direction. Works like expected. You're welcome of course :-) Now I still have the little problem, that I want to grey out the label around the disabled radio button. From the code I guess its impossible to add a special css class for these

Re: [fw-general] Zend_Form: possible to disable some multi options in radio button

2009-11-14 Thread drm
'); By looking at Zend_View_Helper_FormRadio, it seems that you can pass an array of disabled values to the disabled option. HTH. drm / Gerard

Re: [fw-general] Zend_Controller_Router_Route_Hostname - getParams('id') not working

2009-11-10 Thread drm
% sure though. HTH drm / Gerard

Re: [fw-general] Incredible memory usage on public server, normal on dev server

2009-11-10 Thread drm
Did you ever find out what was going on?

Re: [fw-general] zend lucene

2009-11-10 Thread drm
ctx2002 wrote: i try use zend lucene as my site search engine, then i have found this article, http://dadabase.de/weblog/archives/2009/07/22/recommendation-dont-use-zend-php-lucene. can any one say something about that article? There is one thing in general you should know about these kinds of

[fw-general] Doctrine backend scaffolding in Zend Framework

2009-11-09 Thread drm
to share your opinion, I am all ears. drm / Gerard

Re: [fw-general] Premature end of script headers

2009-11-04 Thread drm
debugging. drm / Gerard

Re: [fw-general] Discontinuing Zend Entity in favour of Doctrine integration

2009-10-30 Thread drm
it, I am very happy with this, because Yet Another ORM isn't really what we needed, imho :-) I would like to help, but I'm not sure how. drm / Gerard

Re: [fw-general] Discontinuing Zend Entity in favour of Doctrine integration

2009-10-30 Thread drm
Hi Keith, I agree that the data mapper is a good way to do Models etc but I think the basic mapper shown in the quickstart does lead people into trouble. If a newcomer follows the quickstart they soon find out that modeling relations is very hard and they need an ORM...If we had Doctrine 2

Re: [fw-general] Problems using Zend_Dom

2009-10-29 Thread drm
purposes just for this reason. Use gettype() / get_class() in stead, and introspect the returned object based on it's type, or use var_export / var_dump to debug. This might not be the case though, just be aware of the possibility :-) drm / Gerard

Re: [fw-general] How can I to print Json formated response?

2009-10-29 Thread drm
); $(#diesel).append(response.diesel); }); } You need to set the format in your jQuery post to json. See the jquery api docs for more info. http://docs.jquery.com/Ajax/jQuery.post drm / Gerard

Re: [fw-general] css class to option tags

2009-10-29 Thread drm
Саша Стаменковић wrote: class Umpirsky_View_Helper_FormSelectCustom extends Zend_View_Helper_FormSelect { Hi Saša, Good solution, which I would have suggested if same classes for all the options wouldn't suffice. Little suggestion: name your class Umpirsky_View_Helper_FormSelect and add

Re: [fw-general] How to display errors when an ajax request fail?

2009-10-28 Thread drm
Juan Felipe Alvarez Saldarriaga wrote: I'm using the default ErrorController from Zend_Tool, so, when an error is thrown setHttpResponseCode sets an error 500, how can I catch the exception message on javascript? how can I set the exception message into the response object? there's not

Re: [fw-general] css class to option tags

2009-10-28 Thread drm
Anders Gunnarsson wrote: I'm creating a select box, and adding the options using addMultiOptions. How can I set CSS Class to the option-tags? select option class=myClass value=11/option option class=myClass value=22/option option class=myClass value=33/option /select Afaik, you can't,

Re: [fw-general] Zend_Date error in conversion from timestamp

2009-10-27 Thread drm
. Since the output matches the documentation, I'd say it is expected behaviour :-) You'd probably want to use 'y' (lowercased) in stead of uppercased to get the output you wish for. Also, be aware that 'm' is not the same as 'M' (meaning minutes and months respectively) HTH drm / Gerard

Re: [fw-general] Multiselect selected values

2009-10-27 Thread drm
ajitk15 wrote: $groups = new Zend_Form_Element_Select('group'); $groups -setLabel('Groups:') -setAttrib('multiple','multiple') Hi, you should use Zend_Form_Element_Multiselect for

Re: [fw-general] What is the point of Zend_Form::filterName()?

2009-10-22 Thread drm
regex yourself in the Zend code. drm / Gerard

Re: [fw-general] Turn PHP errors/warnings/notices into exceptions

2009-09-29 Thread drm
and handle it. You would of course want to eliminate every possibility your error handler itself is faulty. drm / Gerard Саша Стаменковић wrote: Thx. But I can't see how this can help :P Regards, Saša Stamenković On Thu, Sep 24, 2009 at 3:00 PM, Vincent de Lau vinc...@delau.nl mailto:vinc

Re: [fw-general] Turn PHP errors/warnings/notices into exceptions

2009-09-24 Thread drm
the exceptions myself, so I can easily implement 401 / 403 / 404 / 500 response codes based on the type of exception, no matter if it is thrown within the dispatch loop. drm / Gerard Саша Стаменковић wrote: I'm trying to do this with set_error_handler(), my will is to trigger Error controller

Re: [fw-general] Problem with key/value pair in URL routes

2009-08-27 Thread drm
I think IIS might somehow normalize double slashes to single ones, even before ZF gets a touch at it. You might try reading out PATH_INFO from $_SERVER to see if that is actually the case. If so, you might need to figure out how to get IIS not to touch it. It is a wild guess, though. Henry

Re: [fw-general] Action names

2009-07-15 Thread drm
)) { throw new RequestedThing_ServiceDeniedException(); } getModel()-doAction() } } You can of course still keep your acl naming based on methods, but this way it keeps the ACL clear from the controllers, and therefore much easier to test. drm / Gerard

Re: [fw-general] Url helper ignores setParams() - why?

2009-07-15 Thread drm
hussdl wrote: The reasoning behind all this is that I have a search form that uses GET instead of POST to prevent browser warnings about expired post data. So in order to preserve the search criteria when sorting or changing the page I have to convert GET params to ZF params as the url helper

Re: [fw-general] Zend_Db and very strange problem with executing bulk insert query

2009-06-28 Thread drm
You should use prepared statements the way they are supposed to be used. Just prepare a single INSERT statement and execute it against different sets of values. I'd bet a fair amount of money that that wouldn't hit your performance as bad as you might think. Gerard [resent, I didn't reply to

Re: [fw-general] Re: Re[fw-general] gistration Form outside controllers

2009-06-26 Thread drm
As Mark is inherently suggesting (I think), you should keep your javascript logic as decoupled from your back end as you can. Try and make the problems simple chunks you can figure out: - Can I render a form in a header? - Can I post this form and validate it? - Can I let the right model do

Re: [fw-general] Controller not being found

2009-06-26 Thread drm
Hi Rod, You most probably do have MultiViews enabled, but not mod_rewrite. MultiViews lets files without their extension handle response (e.g. index = index.php). Try making simple test cases in your .htaccess to figure out if mod_rewrite actually works, e.g.: RewriteRule .*

Re: [fw-general] Coping with Old-style GET vars.

2009-06-26 Thread drm
Hi, You might want to look for the QSA (Query-string append) parameter to RewriteRule in mod_rewrite. Refer to the apache docs for this. Gerard Matt Pearson wrote: Hi everyone, I have a problem with GET forms submitting to controllers within the framework. I have a GET form in a page

Re: [fw-general] Multiple submit buttons each with their own action

2009-06-23 Thread drm
Watch out with javascript solutions, since it might give you trouble with submits by pressing the Return key to submit a form. Gerard Ramon de la Fuente wrote: Also, if you have different actions depending on the button that submits the request, you could use Javascript to alter the action

Re: [fw-general] Multiple submit buttons each with their own action

2009-06-23 Thread drm
That kite only flies if the submit button is actually focused. If a text field is focused, otoh. go figure. Ramon de la Fuente wrote: Actually.. submitting by Return key or Space fires the onClick event on the submit buttons. (go figure)

Re: [fw-general] Zend_Form_Element_MultiCheckbox

2009-06-20 Thread drm
Hi Rob, Did you try rendering the element out of context to see if it works on its own? drm / Gerard Brooks, Rob A wrote: I’m pretty confused about this element … My form code: $career = new Zend_Form_Element_MultiCheckbox('career_name'); $career-setLabel('Careers'); $career

Re: [fw-general] Template theme for MVC in Zend Framework

2009-06-20 Thread drm
something you would implement yourself since it's probably different how anyone uses it. If you're looking for ready-made solutions you might want to create your own and reuse your views whenever possible. drm / Gerard