zend-framework

Zend Framework Zend_auth sessions getting mixed up

I've two subdomains. Each subdomain has its own authenticated users database. I'm using $auth = Zend_Auth::getInstance(); if($auth->hasIdentity()){ } to check user login credentials. It works prefectly for each individual subdomain. But when I log into one subdomain and try to access 'restricted' page in another subdomain without log...

How to change ldap password using zend

I am working with zend framework, PHP , Ldap on Ubuntu. I am authenticating users from ldap using zend library. Now I want to change user's ldap passwords using zend. Any Idea? This is the method that I am using to get zend authentication adapter. It is working perfectly and users are authenticated using this adapter. public function g...

Help With Zend_Db_Stmt

I have a little problem with the Zend_Db_Stmt. This works: $sql = " SELECT * FROM bugs"; $stmt = $this->_getDb()->query($sql); return $stmt->fetchAll(); But I am trying to make sure the PDO gets used to query the database so I tried this: $sql = "SELECT * FROM bugs"; $stmt = new Zend_Db_Statement_Pdo($this...

Zend Framework: How to unescape backslashes and quotes

Hi, I'm using Zend Framework and it is escaping single quotes, double quotes and backslashes. This is done even before I save the text to the database so I guess it is done by the Zend_Form object. Are those the only characters it escapes? Does Zend have a function to undo this escaping or a way to turn off this escaping? The text is c...

Integratiing Zend Framework and Geeklog

Hey, We have a geeklog managed site running at http://bhaa.ie We recently setup a zend application on a subdomain that manages this page http://bhaa.ie/members/public/index.php/event/list We're hoping to better integrate the two domain, so that we can call this url http://bhaa.ie/event/list and have zend handle the request, while ...

Zend_Navigation

I want to give more than one links using by Zend_Navigation for example echo $this->navigation()->topmenu(); echo $this->navigation()->menu(); echo $this->navigation()->footermenu(); like this, but I can't give more than one links. When I use like following code just works this one echo $this->navigation()->menu(); I use like...

Do Not Escape setAttrib() Method (Zend_Form)

I would like to add an attribute to some form elements in the action controller, I can do it like this: $form->element_name->setAttrib('description', '<a href="/controller/action">Anchor</a>'); However in the above example the second argument gets escaped. I would like to have it unescaped. How can I do that? ...

double click kills session in Zend Framework

When I do a double-click on any image in the site (Zend Framework), I'm losing the session. Looks like ZF renames the session on the first click, and the second click reaches an old name of the session. But maybe you have some other ideas? The symptom is that every mouse double click on an images - kills session. Thanks in advance. ...

Running a Zend_Application from the command line?

Is there a blessed way to run a Zend_Application from the command line? That is, I want to run a shell script that invokes a Zend_Application, loads its configuration, and then calls a specific controller action OR run an arbitrary command line script with access to the applications configurations, models, etc. I can think of a few w...

Zend_Db_Table Cascade DELETE And UPDATE

I'm trying to achieve a cascading UPDATE and DELETE effect in a MyISAM database (similar effect as you can create in InnoDB tables with foreign keys). Two example tables: albums photos (has an album_id column that is a "foreign key" to the albums table) Now when I delete a row in the albums table I would like Zend_Db_Table to automat...

Zend_Log in application.ini

Hi, is there any example how to setup an instance of zend log from application.ini? I have only found an example for logging to an file, but i want to log into an SQLITE database table? Zend Log resource ...

Login/Logout links in database driven navigation?

I have a database driven navigation mainly composed of two tables: menus and a menu_items, this works out fine for purely "static" links but now I need to have a dynamic link ( login/logout ). My menu_items table is just composed of links to pages manually added in the admin. So now I need to adjust the table and model possibly such tha...

Zend Navigation misbehaving...

I wanna give more than one links by using Zend_Navigation in the one page... for example like this, echo $this->navigation()->topmenu(); echo $this->navigation()->menu(); echo $this->navigation()->footermenu(); but I couldnt do that ... When I use like following code just works this one echo $this->navigation()->menu(); ...

zend framework zend_db: what does it provide to escape sql parameters

what does zend framework provides in order to escape user input into a query string ? ...

Get first UTF-8 char from string and save in DB

I have a problem with inserting a letter that is not an A-Z char. For example: $fullTag = 'świat'; A 'letter' should contains ś $data = array( 'full_tag' => $fullTag, 'count' => 1, 'letter' => $fullTag[0], ); But when I execute $table->insert($data);, it inserts me as letter an empty string. If I set instead of ...

A non-prepared query using MySQLi and Zend_DB

Due to a bug in my servers PDO version, I have switched to using MySQLi. However, this presents another problem, as the Zend_DB MySQLi adaptor doesn't have an exec function. (The Zend PDO adaptor did), which means I can't execute a sql script. (Containing a load of DROP TABLE and CREATE TABLE queries). So where I could just do: $sqlQue...

How can I use Zend Paginator and Zend Amazon together?

Is there a straightforward (easy) way to use Zend Framework's Paginator with the Zend Framework Amazon service? It looks like the recordset returned by the Amazon service is not what the Paginator needs. ...

Custom rendering of Zend_Navigation

I am using a navigation XML file in conjunction with my Zend Framework MVC app. A top level menu is rendered at the top of my layout. The code to produce it looks like this: $this->navigation()->menu()->renderMenu(null,array('maxDepth' => 0)); This will automatically render an unordered list of links that I have styled into my top...

How I can combine multiple elements to one validator?

How I can combine multiple form elements to one validator? I have address information which consists of Street address ZIP code Post office If I add validator to each of them as streetValidator, zipCodeValidator, postOfficeValidator I end up with problem: There can be foostreet in somewhere (validation ok), 10101 somewhere (validatio...

Zend_Date::toString() outputs the wrong year. Bug in my code, or Zend_Date?

I'm using Zend_Date to set and get the year, but it is not being set as the correct year. I set the year as 2010, and it returns the year as 2009. What am I doing wrong? Is there a bug in Zend_Date? $date = new Zend_Date('2010-01-03', 'YYYY-MM-dd'); echo $date->toString('MMMM d, YYYY'); //outputs January 3, 2009 The year must be being...