zend-framework

ZF - Authenticate and submit remote form

How to authenticate to remote site via HTTP and then submit one more form, accessible only for authenticated user? What I'm trying to achieve: Login to Mantis bug tracker: http://www.mantisbt.org/demo/login_page.php Submit new issue: http://www.mantisbt.org/mantis/bug_report_page.php Logout: http://www.mantisbt.org/mantis/logout_page....

User-based dynamic permissions with Zend_ACL

Is it possible to assign users individual permissions based on dynamic elements in a Zend Framework application? I have tables like so: clients (id, name, contact_name, contact_number, logo, active) modules (id, client_id, module_id, active) permissions (id, user_id, client_id, module_id) users (id, username, password, email, realname)...

Zend Framework 1.10: Cookies aren't stored

Hi, I'm trying to with Cookies and Zend Framework 1.10. This is my code: $zendCookie = new Zend_Http_Cookie('foo', 'bar', 'localhost', time() + 60 * 60 * 24 * 30); $client = new Zend_Http_Client(); $client->setCookie($zendCookie); But the cookies aren't stored. I checked it with Firecookie Firefox's extension. What's wrong? Thank yo...

How to populate zend form select element?

Hello I have been searching for it from last couple of hours and have read every matching result google can give me but still can't get it to work. I am creating a zend form select element through: this->addElement('select','my_select', array( 'label' => 'Currency', 'value' => 'blue', 'multiOptions' => array( 'red' => 'Rouge'...

Paginating findManyToManyRowset result

Hi, I have two database tables (lets call them A and B) with many-to-many bridge table (AB). I have written Zend_Db_Table models for all three tables. I have an A_Row object I extracted from the database using for example Zend_Db_Row::find method. Now I need get print a table of all rows, which are in relationship with this row. The pr...

No translation for the language 'en_US' available, why ?

Here is my config.ini resources.locale.default = "en" resources.translate.adapter = "gettext" resources.translate.data = APPLICATION_PATH "/../languages/" resources.translate.option.scan = "directory" resources.translate.registry_key = "Zend_Translate" resources.translate.disableNotices = true resources.translate.default = en And my l...

php function class_exists causes crash in production environment

I'm using the Zend Framework, version 1.10.7 for my application error_reporting(E_ALL); $application->bootstrap(); echo 'ha'; var_dump(class_exists('Default_Model_FeedReader_Csv_HappyHome')); echo 'hoi'; The output the this piece of code is only "ha". Error reporting is on, but there are no errors. The script simp...

MySQL remove space before order by clause

Hi all. I have a table full of "title" that I want to order by title. Problem is a lot of them have a empty space before the title. I am thinking of writting a php script to fix it all (super easy) but I was curious how could I do: SELECT * FROM products ORDER BY title But at the same time trimming the title so it doesnt order on the ...

PHP Sessions to handle Multiple Servers

All, I have a PHP5 web application written with Zend Framework and MVC. This application is installed on 2 servers with the same setup. Server X has php5/MySql/Apache and Server Y also have the same. We don't have a common DB server between both the servers. My application works when accessed individually via https on Server X and Serv...

How to write a custom row class (extends Zend_Db_Table_Row) for a Db_Table class in Zend Framework

I have separate db_table classes for books, book_sections and users (system end users). in book table has columns for book_title, section_id(book_section) , data_entered_user_id(who entered book info). go to this url to see the image(I'm not allow to post images bacause I'm new to stackoverflow) img685.imageshack.us/img685/9978/7093228...

Errors persisting Doctrine 2 entity once user is logged in with Zend_Auth

i am having problems persisting a Doctrine 2 entity (Post) when the User is logged in with Zend_Auth. i am quite sure its the login as the code runs, when the user is logged out, and fails once the user is logged in. and it seems that the identity returned from the Zend_Auth::authenticate() plays a role in affecting the error message. ...

Benefits/Examples of using a Service Layer in MVC patterns

Hi, We're contemplating implementing a service layer (as described by Martin Fowler) within our current development as a way to process common processes within our system. What are peoples thoughts on a service layer? What examples of process' have people implemented service layers for? What are the benfits/drawbacks etc? We currently...

Why should I use Doctrine over Zend_Db ?

I use Zend_Db in some project, I discover Doctrine there is a while but never actually used it. What are the advantage of Doctrine over Zend_Db ? What are the benefits to use Doctrine ? By the way, is it easy to use Doctrine with Zend Framework 1.10.7? Integration and use with the other component ? As it doesn't seem to exist a Doctrin...

Why do Zend Framework Action Controllers have a Suffix?

Hello Stackoverflow, I am quite a new Zend Framework user but I am not new to PHP or Programming. I have been going through the code to try and get to grips with how everything slots together. One of the parts I have been looking at is how classes are Autoloaded in the system. I can see that: Zend_Application_Bootstrap references Zend...

Zend Translate inside action helper

How to pass Zend Translate to Action helper? Thanks. ...

Zend PDO error - how can I debug it?

I have a weird problem using Zend Framework and Mysql. I generated a query: SELECT events.idUser, szForename, szLastname, readers.szName, idZoneFrom, events.dtTime FROM events, users, readers WHERE events.idUser = users.idUser AND events.idReader = readers.idReader AND dtTime >= '2010:02:15 0:00:00' AND dtTime < '2010:02:16 0:00:00' ORD...

How can i find a parent id in Zend Framework?

I have a site with next structure. We have car's brands. If we click on link with brand, list with models of this model should be open. The url like this: http://example/brand/4. All good. But i don't know, how find a brand id. I need this, because i should know, where the models must be open (under what brand). I am using Router. Can ...

How to handle collection with the Domain Model ?

Hi, I implemented the domain model from the book Zend Framework: Survive the deep end but nowhere they mentions how to handle collections of objects. I mean, how to find multiple rows ? Similar to fetchAll() ? Any advises, best practices to work with such things ? ...

Zend Franework Layout and Modules

I have a some modules and 1 layout. How can i do this thing?: For each module content of the site should be individual. ...

Debugging PHP/Zend Framework web apps

i am using Zend Framework. some techniques i use currently Zend_Debug::dump() (+die()) Zend_Log: to firebug/firephp i particularly like the log to firebug, but when logging large objects, eg. doctrine 2 models (with many associated objects etc), i find that it slows down and crashes alot. what alternatives are out there? i curre...