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
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
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
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
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
/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
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
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
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
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
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
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
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
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
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,
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
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 =
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
');
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
% sure though.
HTH
drm / Gerard
Did you ever find out what was going on?
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
to share your opinion, I am all ears.
drm / Gerard
debugging.
drm / Gerard
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
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
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
);
$(#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
Саша Стаменковић 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
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
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,
. 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
ajitk15 wrote:
$groups = new Zend_Form_Element_Select('group');
$groups -setLabel('Groups:')
-setAttrib('multiple','multiple')
Hi, you should use Zend_Form_Element_Multiselect for
regex yourself in the Zend code.
drm / Gerard
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
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
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
)) {
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
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
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
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
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 .*
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
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
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)
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
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
47 matches
Mail list logo