zend-framework

Zend_Db : Retaining \n (newline) characters for output

I am building an application based on the Zend Framework, and my issue is that whenever I grab data from the database (from inside the respective model class) using the fetchAll() method, despite the fact that \n characters are stored in the database for the string I'm trying to fetch, when I output the variable to the view script, there...

Zend_Form_SubForm flattening array notation with getValues()

I am working with a series of forms that have subforms embedded into them and I am trying to work out if I can make getValues return the values without the array notation on the subform. ie: $form = new Zend_Form(); $subForm = new Zend_Form_SubForm(); $form->addSubForm( $subForm, 'contact' ); $form->addElement(new Zend_Form_Element_Te...

ErrorDocument that points to the ZF controller

Hello, I have Zend Framework based application and I need to create combo .js files. So, folders tree is: /myuser/apps/zfapp_write /myuser/apps/zfapp_write/combos /myuser/apps/zfapp "zfapp_write/combos" folder contain .htaccess file with content like ErrorDocument 404 /myuser/apps/zfapp/combos/get-combo Thats why if I'll open lin...

ErrorDocument doesn't set REDIRECT_QUERY_STRING server variable

Hi, When I tried to open not existing page .htaccess redirects me to ZF controller, but $_SERVER['REDIRECT_QUERY_STRING'] variable not setted. Any ideas? ...

Apache crash - PHP

UPDATED INFO: OS Windows 7 32bit Apache 2.2.15 PHP 5.2.13 This is really weird. When I got to this URI in my application: /view/course/teid/1/cid/-1/pos/30 Apache crashes. When I go to a very similar URI - like this one: /view/course/teid/1/cid/-1/pos/29 Everything works fine. This is from error log: [Thu Aug 05 11:22:14 201...

Bug in Zend_Date (back in time)

I have a very strange problem, Zend_Date is converting my timestamp to a year earlier. In my action: // Timestamp $intTime = 1293922800; // Zend_Date object $objZendDate = new Zend_Date($intTime); // Get date echo date('Y-m-d',$intTime).'<br>'; echo $objZendDate->get('YYYY-MM-dd'); This outputs: 2011-01-02 2010-01-02 Can anyone t...

Zend Tool & application.xml

Hi. I use NetBeans & Zend Tool (ZT). Then i create new project, ZT create a config file application.ini, but i need a xml version. I create a xml version of application.ini and update .zfproject.xml <?xml version="1.0"?> <projectProfile type="default" version="1.10"> <projectDirectory> <projectProfileFile filesystemName=".zfprojec...

images in Zend Framework layout

I am a bit lost here, solution could be lurking under my nose but I couldn't get, thought of you guys if any one can help. Here is the problem: I have Zend Framework standard file layout: Project -application -controllers -views -layouts -scripts -layouts.phtml -library -public -images ...

Zend_Form_Element_Image is needed here?

How can I make image preview and image-loader (to replace existing image) into the form via only one Zend element. Zend Framework have any solution? Zend_Form_Element_Image can be helpfull for that, or I need write my self Zend Element? ...

Zend Framework - Router Rewrite with Regex

Hi, I have been trying to shortern this route: http://abc.localhost/user/view/index/id/1 to this: http://abc.localhost/user/1 with the following portion of code in my bootstrap but I keep getting an error stating that the 'Reversed route is not specified', any ideas why? $route = new Zend_Controller_Router_Route_Regex( 'user/(\d+...

how to disable http_auth on a single zend controller

Hey All, Project which I am currently working is developed using ZF and dojo. For our Development and Production server we have basic user authentication which is handled using apache's virtual host config file (by having users and password files). When we type the server URL, it will pop-up the authentication window. It is working wel...

Zend Framework: How to remove the DtDd Decorator on a Zend_Form_Element_File?

I've tried every thing I can think of and I can't figure out how to display only the ViewHelper decorator on a Zend_Form_Element_File. $UserPhoto = new Zend_Form_Element_File('UserPhoto'); $UserPhoto->setDestination(TMP_DIR); $UserPhoto->addValidator('Count', false, 1); $UserPhoto->addValidator('Size', false, 10240000); // 10 mb max $th...

Zend PHPUnit not initializing layout

I am new to testing and trying to set it up in a Zend Framework application. The app is only available to logged in users. The login page uses a different layout than the rest of the app LoginController.php contains: public function init() { $this->_helper->layout()->setLayout('loginlayout'); parent::init(); } However, sett...

Zend_Amf & addDirectory() vs setClass()

Is anyone else having problems with Zend_Amf's addDirectory()? It is supposed to autoload service classes and doesn't seem to. Though it works with setClass just fine. See snippet below. Ive seen olders posts on ZF 1.8 that had a bug like this. Is it possible that this bug still exists or am I missing something? I'm starting up the se...

Pass and restore a session id in zend framework

Hi, First, yes i know this is a big security NONO. But the scenario is this; In the checkout of a webshop i use a payment-gateway, which can proxy my checkout form through their SSL. (following url's is just the theory, other urls apply for the application) The way it works, website redirects user to their https://gateway.org/secure-...

Zend Framework: How Do I 'auto' generate a SQL query correctly

I want to generate the following SQL: SELECT `rc`.*, `c`.`name` FROM `RunConfigurations` AS `rc` INNER JOIN `Clients` AS `c` ON rc.client_id = c.id WHERE (rc.client_id = ?) ORDER BY `rc`.`config_name` ASC However I am getting: SELECT `rc`.*, `c`.* FROM `RunConfigurations` AS `rc` INNER JOIN `Clients` AS `c` ON rc.client_id = c.id WHE...

Class method calling other class method without include/require ?

I have no clue how to phrase this question in a search engine. I'm a bit confuse how classes use other class's methods without include/require. I've seen this in PHP a couple of time now. Coming from C++ background, I had to include everything in order to use it, so it's a bit confusing. But ok here we go: Say i have improve_db_connec...

How to run a command line script through a normal Zend Framework application

I am working on a ZF application that needs to run a command line script and then parse the results into something meaningful and return to the user. I know there are various PHP functions, like exec and system, but I was wondering if there is anything built into Zend Framework that does command line scripting easily. Even if there isn...

Zend Framework: preDispatch ACL plugin causes requests to non existent page to Access Denied instead of 404

i have setup a preDispatch plugin for my ACL. i have used the controller as resource, action as privilege. when i try to goto a non existent page, i get to the access denied page instead of 404, i think because the resource and privilege are queried and since they are not found, it goes to the access denied page... how can i fix this? ...

Zend Framework: Zend_Navigation menu links rendering bug?

i am having this scenario where when i goto a url like /posts/add, my menu items will all render posts/add. when i goto /posts its all right my nav config ...