zend-framework

PHP Fatal error: require_once(): Failed opening required 'Zend/Gdata/Extension.php'

For some strange reason I cannot figure out right now, NoEmbed.php fails with a fatal error when trying to include a file. include path is set correctly, I've verified that like below (right before the require_once directive in NoEmbed.php): $s = ini_get('include_path'); $a = explode(':',$s); foreach($a AS $path) { echo $path; i...

Zend Framework Select Objects And UNION()

I'm pretty sure this is not possible in Zend Framework (I have searched the Web, the documentation and issue tracker) but I just want to make sure so I'm asking here. $select = $this->select(); $select->union($select1, $select2); That doesn't work of course. To explain what I need. I need to use UNION() to merge 2 tables in a SELECT q...

Zend_Form Display Groups Problem

Here is a short snippet from my class extending Zend_Form: $this->addElements(array( $inputField1, $inputField2, $inputField3, $submitButton )); $this->addDisplayGroup(array('inputField1', 'inputField2', 'inputField3', 'submitButton')...

Any VCARD generator class for Zend framework?

Hi guys I need a class to generate vcards - something that I can use with the Zend Framework - nothing too flashy. Thanks again... ...

Access custom error messages for InArray validator when using Zend_Form_Element_Select

Hello, I'm using Zend Framework 1.62 (becuase we are deploying the finished product to a Red Hat instance, which doesn't have a hgih enough PHP version to support > ZF1.62). When creating a Form using Zend Form, I add a select element, add some multi options. I use the Zend Form as an in-object validation layer, passing an objects val...

How to use modules with Zend_Application?

Hi I'm creating new application using zend framework with several modules. Can you please advice me, how to set Zend_Application config file, which includes modules usage? I was trying to search in ZF manual but there's not relevant information. thanks ...

What is the best way, inside a controller, to know if the request is a XMLHTTP one or not (ZF)

I have different logic in an action depends if the request is an AJAX one or not. (For AJAX logins, I do not need to redirect after successful login, which is not the case in normal login, for example). What is the best way, beside checking the headers for X-Requested-With: XMLHttpRequest Is there a flag or something? ...

Zend_Form and dojo FilteringSelect failing to populate

Hi, I am really struggling with the FilteringSelect component in this particular form. Now I have used this component before however for some reason this one just won't populate. I am using the Zend_Form and the form code for the filteringselect looks like this. $universities = new Zend_Dojo_Form_Element_FilteringSelect('university...

Get table alias from Zend_Db_Table_Select

Hello. I'm working on an Active Record pattern (similar to RoR/Cake) for my Zend Framework library. My question is this: How do I figure out whether a select object is using an alias for a table or not? $select->from(array("c" => "categories")); vs. $select->from("categories"); and I pass this to a "fetch" function which adds addi...

Zend_Db_Table - Associative Array Instead Of Object

The following line: $select = $table->select(); $select->where('approved = 1'); $result = $table->fetchRow($select); Returns an object. What I would like is to get an associative array instead. I know that Zend_Db has fetchAssoc() method for that but is something similar also in the Zend_Db_Table (I tried fetchAssoc() but it doesn't ...

Zend Framework how to set headers

Hi guys, I have a question, how can I do something like this: header("Content-Disposition: inline; filename=result.pdf"); header("Content-type: application/x-pdf"); With Zend Framework, I have tried: $this->getResponse() ->setHeader('Content-Disposition:inline', ' filename=result.pdf') ->setHeader('Content-type', 'applic...

Trying to outpt vcard for download using zend framework - something wrong

Hi guys, I've added a download vcard option in my social networking system - however when I try to get it to download the vcard for some reason the vcard is downloaded as a raw file i.e. I need to rename it to be a vcf file in order to open as a vcard. I'm using the following code to send headers but for some reason its not working as it...

Match whole field in Lucene

I'm currently indexing a database with lucene. I was thinking of storing the table id in the index, but I can't find a way to retrieve the documents by that field. I guess some pseudo-code will further clarify the question: document.add("_id", 7, Field.Index.UN_TOKENIZED, Field.Store.YES); // How can I query the document with _id=7 // w...

Zend Framework PDF problems

It's me again guys, I have a small problem: // Create new PDF $pdf = new Zend_Pdf(); // Add new page to the document $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); $pdf->pages[] = $page; // Set font $page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 20); // Draw text $page->drawText('Hello...

Force SSL/HTTPS with Zend Framework and mod_rewrite

I have a Zend Framework application that I want to force into HTTPS using mod_rewrite. I am pretty lost when it comes to mod_rewrite. Here is my current .htaccess file in the root of my application. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-s RewriteCond %{...

Zend Framework PDF multiline problems

I have a problem, with Zend_PDF multiline, my problem is that I can't write the entire text to my pdf.My text looks like this: http://pastebin.com/f6413f664 But when I open my .pdf file, the text looks like this: http://screencast.com/t/1CBjvRodeZQd And here is my code: public function pdfAction() { $this->_helper->layout->disab...

[Zend Framework] Redirecting user back to originally desired URL after login

Example: User is not logged in User has items in their shopping cart User goes to /checkout User is redirected to the /login page User logs in successfully and should be redirected back to the /checkout page How does the login action know to redirect the user to checkout in this case? I want this to work in many different situation...

What is the best method to output the correct HTML from my PHP loop

Hi guys, I have a problem, I have a HTML problem, I don't know if i'm using the best method, so here is my problem: Everthing is ok:http://screencast.com/t/uJmffaxE If i have more space, here are starting the problems: http://screencast.com/t/1z1GRhOLK Here is my code: <div id="wrap-categories" class="clearfix"> <?php if($this->categori...

Zend Framework $this->baseUrl() always returns the current page :( why

Hi guys - check out this website www.fltdata.com. For some reason the home link no matter what page you go on instead of pointing to the home page it points to the current page. It works fine on my localhost but online its behaving like this. The href value of the home link is just : $this->baseUrl() Whats wrong here.. === EDIT=== Wel...

Using Zend_filter_input standalone

Hi, Is it possible to use Zend_Filter_Input as a generic input filter? I want to use it to filter all form fields (strip tags etc but no validation). All the examples seem to include a $validators array and pre-suppose that I will know the names of the fields on the way in. Because of the nature of the project, timescales etc, it is no...