zend-framework

Zend_Form Decorations Issue with Description and Errors

Hi all. I've spend all the day trying to set the Zend_Form decorators for the following format: <dt> <label for="square_meters">The label</label> </dt> <dd> <input type="text" name="square_meters" id="square_meters" /> <div class="description-div">m2</div> </dd> I got it. Currently this is working with the following array: $des...

Zend Framework - Extend Module Controller

I have the following directory structure: modules/ api/ controllers/ ApiController.php InventoryController.php OtherController.php The init() method is common amongst multiple Controllers so I want to refactor that into a parent Controller class such as: class Api_ApiController extends Zend_Controller_Action {...

certain Smarty tags don't work in OpenX templates

I am on a team that is developing an OpenX plugin, and I am responsible for the UI. I noticed that if I use certain Smarty tags in my template, the app doesn't work and I see an error message, similar to this: Plugin by name 'Html_select_date' was not found in the registry; used paths: default_views_helpers_: /openx/www/admin/plugins...

Best way to structure AJAX for a Zend Framework application

Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible. I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logisti...

Zend Lucene search relevancy

What are the best practices to configure Zend Lucene to make the search results more relevant? i have the following fields and document type productname (Text) description (Text) category (Keyword) Please give some sample codes. ...

Are Symphony and CakePHP too slow to be usable?

Until now, I have always said that CakePHP is too bloated and slow. I don't really know that, I just saw "some" benchmarks. What I really want to know, is that if those two frameworks (Symfony and CakePHP) are too slow to be usable in a way that the user will get frustrated. I already know that those frameworks are slower than other alte...

"SQLSTATE[23000]: Integrity constraint violation" in Doctrine

Hi, i do get an Integrity constraint violation for Doctrine though i really can't see why. Schema.yml User: columns: id: type: integer primary: true autoincrement: true username: type: varchar(64) notnull: true email: type: varchar(128) notnull: true password: type: var...

How to test if table was updated in Zend Framework?

When user opens a form to modify a record, but instead of changing information, he just clicks the Update button. Which causes the update() function to return 0. However, I consider this case a valid update task. How would I test it, so I can assign a success message? Is update() returns -1 when SQL query failed or also 0? Method: Zend...

How to get resource in controller action?

How to get resource in controller action? Resource db was initialized in application.ini. class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { // I want db resource here } } ...

Zend_Session / Zend_Auth randomly throws Error Message ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)

Hello! I'm currently working on a new Application using (among other things) Zend_Auth but, for whatever reason, this Error Message is showing up at any location totally randomly (or so it seams) Zend_Session::start() - /home/hannes/workspace/develop/library/Zend/Session.php(Line:480): Error #8 session_start() [function.session-start]:...

Zend Table Relationship Modeling with Composite Key

I have a table with a composite primary key using four columns. mysql> describe leaguesummary; +------------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------------+------------------+------+-----+---------+---...

File upload with jqgrid in PHP

I am trying to implement file upload with jqgrid (in a Zend Framework project). jqgrid allows you to create an input field of type "file" but does not enable ENCTYPE=“multipart/form-data”. The creator recommends using another plugin to handle file uploads, specifically Ajax File Upload. He says to initialize it using the onInitializeFo...

Zend_Soap_Client doesn't work with proxy

I'm accessing a SOAP web service like : $client = new Zend_Soap_Client($wsdl_url, array('proxy_host'=>"virtual-browser.25u.com" , 'proxy_port'=>80)); Since my shared server blocks port 8888, I'm using this proxy server. But Zend Soap Client tries to directly connect it. Exception information: Message: SOAP-ERROR: Parsing WSDL: Coul...

Where does authentication and loader go in Zend Framework?

Hi guys, Still trying to learn the basics of MVC. I'm making use of Zend_Loader for Google Calendar feed. What file would this information go in? The .phtml view? // load library Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); Ze...

Dataflow in Controllers & Layouts in Zend Framework

I use a basic setup which uses a layout.phtml for the HTML Layout and view scripts for the content part. I want to control some variables in the layout in my controllers, i.e. the title of my site. How can I access my layout to output variables from within the controller? Thanks for your feedback! ...

Using Zend_Db and multiple tables

I have a normalized database that stores locations of files on the internet. A file may have multiple locations spread across different sites. I am storing the urls in two parts (Site.UrlStart, FileLocation.UrlEnd). The UrlEnd is the part unique to that file (for the site). Simplified Db structure: I am using Zend_Db as my ORM (If it...

How do I move Zend Framework From Development to Production?

I'm just wondering if anyone else has had problems moving the Zend Framework from development to production. I changed my docroot to the public folder, updated my library path, but it's still not working out for me. The IndexController is working just fine, but my ServiceController is giving me an internal server error. ServiceCont...

How can I get started with PHPUnit, where my class construct requires a preconfigured db connection?

I have a class that uses a lot of database internally, so I built the constructor with a $db handle that I am supposed to pass to it. I am just getting started with PHPUnit, and I am not sure how I should go ahead and pass the database handle through setup. // Test code public function setUp(/*do I pass a database handle through here,...

change available checkboxes after select[html] changed - Zend Framework

Hi, Could you please help me rosolve my troubling matter. I used Zend_Form to create what I needed. However as I have relations many to many i decided to present multiple choices via checkboxes. Unfortunately range of these checkboxes depends on select field available in form. I would like to change visible/availabe checkboxes dependi...

Zend Framework multiple databases

I'm currently using only one database with Zend Framework, but now I have to add ONE MORE. I'm using this code right now: public static function setupDatabase() { $config = self::$registry->configuration; $db = Zend_Db::factory($config->db->adapter, $config->db->toArray()); $db->query("SET NAMES 'utf8'"); self::$reg...