zend-framework

Refactoring a Zend_Auth implementation

I am working on an existing project that has two areas that can be logged into. An admin section and the front end. Currently the admin section has a login action and the front end has its own login action. Admin logs in using a database table specifically for admin accounts, the front end is logged in using a different table all toget...

Advice on Zend or CI for project

I have a new site that I am currently in the process of mapping out. The best way to put it would be that it will be A LOT like youtube. I need openid support, and video upload support. There is no official openid library for CI and the only one it has seems outdated / could become outdated. However Codeigniter is fast <- pretty much...

Zend random salt generation for element_hash

I'm using the following hash with a salt that says 'unique'. I'm not sure if 'unique' is a literal string or an internal zend keyword for Zend to actually generate a unique salt? If it's just a random string I think it's better to change that, so does zend have a random string generation function that could be used to salt this sort of...

Why is my unit test failing via Hudson/Phing, but succeeding via Phing on the command line?

General Info: PHP 5.3.3 PHPUnit 3.4 Zend Framework 1.10.8 Phing build target <target name="test"> <echo msg="PHPUnit..." /> <phpunit codecoverage="false" haltonfailure="true" haltonerror="true" printsummary="true" bootstrap="${testdir}/application/bootstrap.php"> <batchtest> <fileset dir="${testdir}"> <include name=...

Any disadvantage to using Zend for a very small website

I'm using Zend and want to know if there's any disadvantages to using it for a small website. The website is maybe 4 pages: a couple of forms and a couple of static pages. Will Zend still speed up development for such a small website? or the opposite? Does the whole bootstrapping flow and MVC structure and routing overburden performa...

PHPUnit error with AddDirectoryToFilter

Hello Everyone, I am again trying to work on a TDD (Test Driven Design) way. So I installed my PHPUnit again to work with my ZendFramework application. After running my testSuite I get this following error message: (...) test: [exec] PHP Notice: Please no longer include "PHPUnit/Framework.php". in /usr/share/php/PHPUnit/Framewor...

Dsiplaying Hebrew strings using the ZendFramework

I am doing the ZF quickStart (my first steps in PHP) and i want to read and display Hebrew strings in my web view. how do i change the charset in my db adapter? Here is my current application.ini db setting: resources.db.adapter = "PDO_MYSQL" resources.db.params.host = localhost resources.db.params.username = xxxx resources.db.params....

Zend Mail - how to read without emails being marked as opened

I'm using zend mail extended with zend_mail_storage_imap and I built an application that looks for keywords in user's emails. The problem is that it opens up each email and keeps it marked as read. Is there a way to check the body of emails and not mark each mail checked as read? Here's current working code. It's part of an ajax qu...

Zend_Pdf manipulating PDF Form Fields

I currently have a project there are a number of forms that are processed and stored in the DB. Upon successful completion an admin is notified by email with the contents of that form submission. The problem is for one of these forms i need it to look exactly like the mail order version which I have in PDF format. So I have two basic ...

phpUnit & Ant unrecognized option --log-xml

Hello, I am trying to automate my testing procedure using Ant. This is my error: test: PHPUnit 3.5.0 by Sebastian Bergmann. unrecognized option --log-xml /var/www/nrka2/build/build.xml:30: exec returned: 1 BUILD FAILED (total time: 1 second) And this is my build.xml <?xml version="1.0" encoding="UTF-8"?> <project name="eventManager...

Errors in PHPUnit itself

PHP Notice: Please no longer include "PHPUnit/Framework.php". in /usr/share/php/PHPUnit/Framework.php on line 50 Fatal error: Class 'PHPUnit_Runner_StandardTestSuiteLoader' not found in /usr/share/php/PHPUnit/TextUI/TestRunner.php on line 434 PHP Fatal error: Class 'PHPUnit_Runner_StandardTestSuiteLoader' not found in /usr/share/p...

How to throw 404 exceptions in Zend Framework

I'm trying to use the Zend_Controller_Plugin_ErrorHandler to handle my error 404 cases. According to the doc, the plugin has constants that one can use to match Exception types and handle them accordingly. e.g. switch ($errors->type) { case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE: case Zend_Controller_Pl...

Zend Framework: How to generate javascript only once?

I am creating a custom zend form element that will require some javascript. I can add the javascript I need like this: /** * Renders the javascript to the view. */ protected function _generateJavaScript() { $this->view->headScript()->captureStart(); ?> $(document).ready(function(){ alert('hello'); }); ...

How to use Zend Framework in Windows Server?

I'd like to use Zend framework in my server, but it's Windows and I don't know what to do with the Rewrite Engine. In Linux I could use .htaccess but I notice that this doesn't work in Windows-based servers. What do I do? ...

Using Zend_Config INI or XML with dynamic data

I have such an array for rendering TableGear: array( "database" => array( 'username' => $this->config->resources->db->params->username, 'password' => $this->config->resources->db->params->password, 'name' => $this->config->resources->db->params->dbname, 'table' ...

Zend_OpenId with Codeignter

I am using the OpenId library from Zend with CodeIgniter and everything is working just fine except for the verify function. $status = ""; if (isset($_POST['openid_action']) && $_POST['openid_action'] == "login" && !empty($_POST['openid_identifier'])) { $consumer = new Zend_OpenId_Consumer(); if (!$consumer->login($_POS...

Errors when testing with PHPUnit 3.5

Hello, After installing phpUnit 3.5 i am trying to run my tests this way: phpunit AllTests.php But I am getting the following errors: PHP Fatal error: Class 'PHPUnit_TextUI_TestRunner' not found in /usr/share/php/PHPUnit/TextUI/Command.php on line 140 Fatal error: Class 'PHPUnit_TextUI_TestRunner' not found in /usr/share/php/PHPUni...

Where should the business logic be placed when using Doctrine 2 and Zend Framework

Hi all, I've a question related to Doctrine 2 and Zend Framework. If you use Zend Framework without Doctrine by default you place business logic in the models. But as Doctrine 2 does have Entities where should the business logic be placed? I first had created models where the entity manager did calls to the Entities. But when I wanted...

How to avoid printing empty field in LiveDocx?

Hi. Is it possible to avoid empty lines in LiveDocx? For example I have the following fields: name mobilenumber email If mobilenumber is empty can I output the document like the following? name email ...

Integrating Facebook Connect Login/Registration with Zend Framework Application

Hi guys, I have a social networking website built upon the zend framework. My application also has extensively used htaccess's urlrewriting feature. The thing is that I want to incorporate facebook connect so users can login using their facebook logins as well. I'm stuck just on the part of how do I set it up. Like I know you have to cr...