zend-framework

Calling a function using zend framework

I am currently using zend framework and working with jquery and php. Trying to implement an autocheck username availability. For the following code, I need to call my user_availability.php which is in my controller folder. I did /controllers/user_availability, ../user_availability but it doesnt call that page. Can anyone help? $.post...

Using a dash (-) instead of a plus (+) in Zend Framework URLs

by default it seems my ZF is separating multiple parameter words with plus signs. eg. /product/test+product+name I would like to use -> /product/test-product-name Here is the line from routes.ini routes.product.route = "product/:productName"<br /> routes.product.defaults.controller = product<br /> routes.product.defaults.action ...

Zend Framework handle exceptions gracefully in production environment

My application handles errors happily in development, both errors and exceptions. When I switch to production the application just returns a blank page as the config is set to not display errors. Is there a standard method in ZF for sending visitors to a nicely formatted 'Page not found' using a layout from the application so that they a...

If-then-else mod_rewrite for Zend Framework and SSL in .htaccess

I'm trying to automatically redirect for any url that has "checkout" in it to https. Otherwise, if the url is https but doesn't have "checkout", I want to redirect to "http:". Only urls with "checkout" can have https. I need an if-then-else structure. The syntax below doesn't work ... redirects to index.php if there is https in the u...

Zend Framework - How do make a hierarchy without it being a module?

Here is my specific issue. I want to make an api level which then under that you can select which method you will use. For example: test.com/api/rest test.com/api/xmlprc Currently I have api mapping to a module directory. I then setup a route to make it a rest route. test.com/api is a rest route, but I would rather have it be test.com...

Should http be used for https login subsequent pages?

I've seen many threads on SO and they suggest that password can't be securely transferred without SSL. So suppose I've https login page but Should I switch back to http after user has been authenticated over https (assuming no sensitive information is sent over after login)? Because it might load page a bit faster? Would it create ext...

PartialLoop with Zend_Paginator Object Issue

Is it possible to use the findParentRow() method from within a Zend_Paginator Object? I'm trying some code that works fine on an object returned by fetchAll from a DB resultset and works fine. With the Zend_Paginator object it doesnt work though. In my controller i have: public function downloadedAction() { $images = new Model_Appl...

How to remove params from URL after form is submitted ?

When I use the following link in my browser, a record is populated in the form on this page to edit. http://vcred.dev/#personal/myacademicdetail?record_id=15 When I click 'SAVE' button, record is successfully updated in database and form with updated values is still in front of me. It is OK for me. But I have only one problem after fo...

Basic Oriented Object Modelization in PHP5

Hi, I use zend framework and I would like to have your advice to modelize my classes. I have 3 classes Patrimony.php Project.php and Version.php. Version extends Project extends Patrmimony. In other hand I have a folder structure like this /data/patrimonies/projects/versions/ I don't know if I have to use a Design Pattern or something ...

Module-specific database config in Zend Framework

I want one of my Zend Framework modules to use a different database from the others. The Manual suggests you can prefix the resources in application.ini with the module name to achieve this but I can't get it to work. The relevant bits of my application.ini are: resources.modules[] = "" resources.db.adapter = "PDO_MYSQL" resources.db...

Null or 0 values in dijit.form.datetextbox

I'm using a standard output of Zend_Dojo_Element_DateTextbox AKA dijit.form.datetextbox... I want to use NULL or 0 values, but it always defaults to 11/30/1899... is there a simple option to enable this?? ...

Problem with Zend Framework and UTF-8 characters (æøå)

Hope here are some with more knowledge about Zend Framework than me, I've been trying to search for the answer but I'm not able to fin anything anywhere. Problem: When adding the content of a Zend_Form to the database with the use of Zend_Db the characters æ ø å is replaced by øæå System WampServer 2.0i Apache 2.2.11 MySQL 5.1....

Zend Framework - adding a custom field to the session handler?

hey all I'm using the Zend_Session_SaveHandler_DbTable Session handler and I was curious if anyone knows how to best add a custom field to the table that it stores the session data in? for example I'd like to be able to log the username of the person in the sessions table. Anyone know if that's possible with the Zend_Session_SaveHandle...

Zend Studio: How do you add a new action to an existing controller via the IDE?

If you simply add the code it doesn't do the automatic action wireup in the .zfproject.xml file. Does the IDE support a way to add additional Actions to an existing controller without manually using the command line tool? Adding the following information: I was actually looking for a built in way to update the zfproject.xml without usi...

Form Level Validation in Zend Framework

I am using the Zend MVC framework along with an ORM layer generated with Propel, and I'm trying to figure out the best way to catch exceptions from a Propel object's save() function, and throw them to the Zend Form as errors. Not all of the exceptions that come out of the Propel object have a way to identify which field caused the error...

Zend Form Edit and Zend_Validate_Db_NoRecordExists

I am slowly building up my Zend skills by building some utility websites for my own use. I have been using Zend Forms and Form validation and so far have been happy that I have been understanding the Zend way of doing things. However I am a bit confused with how to use Zend_Validate_Db_NoRecordExists() in the context of an edit form an...

PHP Zend Framework - How to Get Request URI Fragment from Request Object?

Hi, Say e.g. i have a URI http://127.0.0.1/somecontroller/someaction#12345 that takes me to the someAction() action of the someController controller. From there, i am able to retrieve the Request object via $this->getRequest(). i am also able to retrieve various information regarding the URI from the Request object. But, how can i ret...

Zend Db Select ? Substitution in join* condition.

It doesn't look like there's any parameter substitution in Zend_Db_Select's on clause. It's highly annoying that I can't just do something like: $select->joinLeft('st_line_item','st_line_item.order_id = st_order.id and st_line_item.status = ?') So what's the idiomatic alternative that works within the fluent interface? I could do som...

Zend Framework: catch custom soap exceptions

how do I catch my custom soap fault ProductoInexistente when requesting a soap web service operation? my code is the following, but it's not working: $_WSDL_URI = 'http://joaquinlrobles.redirectme.net:8080/Pelopincho/PelopinchoService?WSDL'; $ws = new Zend_Soap_Client($_WSDL_URI, array('soap_version' => SOAP_1_1)); try { $resultado = $...

Zend Framework: What are the differences between init() and preDispatch() functions in controller objects?

I think the order of execution is init(), preDispatch() and then action() is called. Should I initialize my variables, which are common among all actions, in init() or preDispatch()? I've seen people using both functions for initialization. Probably as the name suggests it should be done in init() but then what kind of stuff would go i...