zend-framework

Zend Db Float Problem

Hello, I have a MySQL table structured: float(10,2) For example I insert a row. $value = array('price' => '13539.51'); $db->insert($value); When I check this row with phpmyadmin, everything is fine. But when I read this row with Zend Db, price value like this "13539.509765625". How can i fix this problem. $select = $db->select(); $...

Where create cookie that holds only user id in Zend MVC project?

Hi, I am working with Zend MVC project. MY mission: add cookie that will have only user unique id. Problem:I don't know where create a cookie. Options to place create a cookie, that I thing about: bootstrap.php init()/run() index.php (not make sense) In Controllers My project structure: application/bootstrap.php public/index.ph...

Zend framework, URL view helper and the layout

Hello, I've been using Zend framework some time now, but I'm facing a problem I can't solve myself. I'm using Zend_Layout, Zend_View and the URL view helper to create hyperlinks. To create some SEO-friendly URL's, I use the following code in my layout.phtml: <?php echo $this->url( array( 'module' => 'default', 'controller' => 'contact'...

php setcookie vs Zend_Http_Cookie

Hi, Why this code not working, and how can I make it works like setcookie('cookie_name','cookie_value'); The code that not create cookie: $cookie=new Zend_Http_Cookie('cookie_name','cookie_value','.google.com'); Or what difference between: setcookie('cookie_name','cookie_value'); vs $cookie=new Zend_Http_Cookie('cookie_name','...

Picking up ZF2, is it worth it now?

Hi, I've been a web developer for the past 8 years (although I'd only consider the second half of that time as real experience) In the past year I've done a couple of Zend Framework based business applications and I've been able to get comfortable with it. Now I have been offered a position for leading a start-up on the technical side,...

What's the most efficient way to sort through emails with zend_mail?

I'm sorting through emails looking for specific instances of strings and it is taking too long. I would like to get the time down to half a second per email, and it's currently taking about 2-2.5 seconds per email. I'm worried I'm doing something really dumb that's slowing this down - probably with mysql or zend_email. What this cod...

Zend Framework route chaining in application.ini

I am setting language depending on the domain name (en for en.example.com, tr for tr.example.com): resources.router.routes.plain.type = "Zend_Controller_Router_Route" resources.router.routes.plain.route = "/:module/:controller/:action" resources.router.routes.plain.defaults.language= "en" resources.router.routes.plain.defaults.module = ...

Zend Mail - Email is not sent

Hi, I have a problem sending a registration email via zend_mail. The mail is transmitted only to mails that have a @gmail.com. $email = "[email protected]"; $mail = new Zend_Mail (); $mail->setBodyText ( 'some text' ); $mail->setBodyHtml ( 'some text' ); $mail->setFrom ( '[email protected]', 'GeldOnkel.net' ); $mail->addTo ( $email, $em...

Hudson failing build w/o revealing cause

Every build has failed as of Tuesday. I'm not exactly sure what happened. The Phing targets (clean/prepare) are being executed properly. Additionally, the unit tests are passing with flying colors, with only a warning for duplicate code (not a reason for a fail). I tried removing the phpDoc target to see if that was causing the error...

Managing complex ACLs in Zend Framework

Hello, The manual shows how to configure ResourceAutoloader to use Acls directory to store ACLs. Where can I see some usage cases of such a complex ACLs, so these /acls directories in each module would be really useful? How to manage inheritance and separation of Access Control Lists in each module? How many ACLs do you have for an a...

Where do I put view scripts needed by view helpers (using Zend_View and the default directory layout)?

I've got a relatively complicated portion of my application, which is an editor for access control lists. I need to reuse it in a few places, and I'd like it to be loadable all ajax-y and such. Because I need to use it often, I'd like to make it into a Zend_View_Helper. That's simple -- just put $view->setHelperPath(APPLICATION_PATH . '...

Zend Framework - How to place a text right to the text box?

How to place a text right to the text box in Zend Framework? I am using Zend_Form component in my project. I want to display a small text right side of text box. For example I want to display an example phone Number to the right side of the phone number text box field. How can I do this? Please help me!!!! ...

Zend Architecture optimal use in website

Hello Guys, I have a site that needs a user side and a admin side. I can create two index files(dispatch) one for each. like site/index.php and site/admin/index.php. Both side will use same zend library and models. All other things like (controller,view,layout etc...) will be separate. This will be like application/controllers and app...

Flow for: fill form, make paypal payment, create account

I've implemented a paypal transaction before but this one has a twist that I'm not quite sure what's the best way to handle it. The basic idea is I want to create an account for the user when he provides some details and makes a payment via PayPal. Until BOTH the user details are filled out correctly AND the payment is made correctly, ...

Zend Framwork Database Insert Issue

Hi, I'm starting out using the Zend Framework and have created a suitable model which saves data back to a database table. The issue I am having is that the sql statement is trying to insert '?' as the value for each column in the database. I have created the following save function which passes an array of data to the DBtable adapter...

how to initalize my ldap connection like a doctrine connection in the bootstrap.php file in zend-framework

i want to use my ldap server as a DB. then i will create persistence classes in the models directory that will extend to Zend_Ldap so that i won't have to write all the CRUD operations but how can i initialize the ldap connection in the bootstrap.php file for e.g. a database connection using doctrine can be initialized like this, i want ...

Integrating a php blog in a website

Hi, I have a project website and wanted to add a blog to the website. But I do not want it do be a external blog, it should be within the site. I do not want to develope the blog on myself but suggested to use some kind of blog module written in php. I use zend framework for my project site. Can you provice some links or ideas? Is it...

How to create a script for the command line in PHP with Zend Framework?

I need to create a script that will run on the command line using PHP and I want to take advantage of the ZF and the models (classes) I have written using it. How do I do this as elegantly as possible? ...

Zend Framework: Populating DB data to a Zend Form dropdown element

Hi I have the following form: <?php class Application_Form_RegistrationForm extends Zend_Form{ public function init(){ $country = $this->createElement('select', 'country'); $country->setLabel('country: ') ->setRequired(true); $email = $this->createElement('text', 'email_address'); ...

How to confirm a OpenId authorization

Im using Janrains OpenId-Enabled libs to handle OpenID authentication as a consumer. Authorization works fine so far. The problem is: I couldn´t find out how I can confirm if a user allready authorized me without beginning the whole process ($consumer->beginn(), $consumer->complete()) anew (thus redirecting the user or using a popup). ...