Re: [fw-general] Memcache Approach

2010-12-10 Thread Sudheer Satyanarayana
On 12/11/2010 03:41 AM, Daniel Latter wrote: Hi All, Just wondered if anyone had any thoughts on the following: We have a ZF app where we use memcache to cache our model classes. The issue I have is that we cant store the db conn on the object so we have to make a static call to grab a db conn

Re: [fw-general] best practice: getting a Zend_Mail instance on demand

2010-08-03 Thread Sudheer Satyanarayana
but I think there's the disadvantage that your Zend_Mail resource would get instantiated at bootstrap time whether you need it or not -- true? -- and not every controller/action in my app needs to send email. Right. Finally, I suppose you could set the email configuration data in its own se

Re: [fw-general] Validating numeric input

2010-05-31 Thread Sudheer Satyanarayana
On 05/31/2010 04:58 PM, Aleksey Zapparov wrote: Hello, To test if string is integer or float, you should use Zend_Validate_Int (1). Alternatively you can use Zend_Validate_Callback (2) with is_numeric (3) function, so it will be something like this: $validator = new Zend_Validate_Callback('is_n

[fw-general] Validating numeric input

2010-05-31 Thread Sudheer Satyanarayana
Hello, I want to make sure the user has input numeric value in a text form field. The value can be an integer or float, but it has to be numeric. I tried using Zend_Validate_Float and Zend_Validate_Digits, but they don't seem to suit my needs. For example, Zend_Validate_Float returns false f

Re: [fw-general] Use Zend_Queue for sending mails

2010-05-17 Thread Sudheer Satyanarayana
On 05/14/2010 11:36 AM, Ralf Eggert wrote: Hi, I want to use Zend_Queue to send bulk mails (newsletters). These newsletters are individualized. I think I have two general options how to handle this: a) Create all Zend_Mail objects and send them serialized to the Zend_Queue. When the queue i

Re: [fw-general] HOW TO USE Zend_Controller_Plugin_Abstract with application.ini

2010-03-11 Thread Sudheer Satyanarayana
On 03/11/2010 07:24 PM, Matthew Weier O'Phinney wrote: -- rtskoo wrote (on Wednesday, 10 March 2010, 07:13 PM -0800): I use zf 1.10 . I have make a custom contronller plugin now ,which extends from Zend_Controller_Plugin_Abstract. But where to put my custom contronller plugin? I have added

Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Sudheer Satyanarayana
On Monday 30 November 2009 02:40 AM, Jigal sanders wrote: Well, my first problem is that it gets to my webroot but when I click on a link, it doesn't follow my controller and action. I rather get an error: The requested URL /authentication/login was not found on this server. the whole struct

Re: [fw-general] ZF - Where to begin?

2009-11-25 Thread Sudheer Satyanarayana
So, as an experienced PHP programmer but someone who's looking wanting to get the whole picture on how to best start utilizing ZF, where does one begin? Like Daniel pointed Surviving The Deep End is a good book. The book is more a 'best practices' tutorial for the Zend Framework user. Being

Re: [fw-general] Zend_View_Helper_Url not returning correct URL when Zend_Rest_Route is used

2009-10-06 Thread Sudheer Satyanarayana
There are two things going wrong: you need to specify the route, and, specifically, the default route, when using the url() view helper. $url = $this->url(array( 'module' =>'default', 'controller' =>'user', 'action' =>'login' ), 'default', true);

[fw-general] Zend_View_Helper_Url not returning correct URL when Zend_Rest_Route is used

2009-10-06 Thread Sudheer Satyanarayana
Hi, In my bootstrap I am adding the Zend_Rest_Route [code] protected function _initRestRoute() { if (PHP_SAPI == 'cli') { return; } $this->bootstrap('frontController'); $frontController = Zend_Controller_Front::getInstance(); $restRoute =

Re: [fw-general] Zend_Rest_Controller - how to pass params in the URI for POST requests

2009-10-05 Thread Sudheer Satyanarayana
POST /webservice/lead not: POST /webservice/lead/apikey/myapikey In other words, apikey/myapikey does not do anything to identify the resource so should not be part of your URI. If your clients must use an API key, then you could have them send it as an HTTP Header. Thanks for the quick

[fw-general] Zend_Rest_Controller - how to pass params in the URI for POST requests

2009-10-05 Thread Sudheer Satyanarayana
Hi, In my application, I have a module - 'webservice' to handle all REST requests. In my front controller I check if the request has a valid API key in the request URI parameters. If a valid key is not found access is denied. Example URI with API key : example.com/webservice/lead/apikey/mya

Re: [fw-general] How to set either Zend_Form_Element_Text required?

2009-09-29 Thread Sudheer Satyanarayana
On Wednesday 30 September 2009 10:18 AM, Leon_L wrote: Hi, I'm new to Zend Framework, I have a question is that if I have two Zend_Form_Element_Text in a form, and I want make either of them to be filled by the user. For example, phone number and mobile number. People only need enter one of them

Re: [fw-general] bootstrap application from CLI

2009-09-28 Thread Sudheer Satyanarayana
On Monday 28 September 2009 08:42 PM, Pádraic Brady wrote: I'm actually curious about this myself - how are people differentiating their application.ini settings between a web environment and console environment? Another inherited settings section? A separate config file? Paddy I had to move

Re: [fw-general] bootstrap application from CLI

2009-09-28 Thread Sudheer Satyanarayana
The problem is, Zend_Application instantiates the front controller which in turn registers the FlashMessenger action helper. This throws the Zend_Session exception. Sorted it out. In my application.ini config file, I had defined a layout resource. This was bootrapping the view resource whi

Re: [fw-general] bootstrap application from CLI

2009-09-28 Thread Sudheer Satyanarayana
On Monday 28 September 2009 05:58 PM, keith Pope wrote: 2009/9/28 Sudheer Satyanarayana: Hi, I am trying to boostrap the application from CLI. $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/applicatio

[fw-general] bootstrap application from CLI

2009-09-28 Thread Sudheer Satyanarayana
Hi, I am trying to boostrap the application from CLI. $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $application->bootstrap(array('autoload', 'config', 'database')); The problem is, Zend_Application instant

Re: [fw-general] Object oriented programming with Zend

2009-09-26 Thread Sudheer Satyanarayana
On Saturday 26 September 2009 06:57 PM, PHPScriptor wrote: Hello there, I worked for different companies and saw different ways of programming websites. Now everybody is talking about OO programming. But my question is: why? Let me give you an example one of the ways I saw it done: a class mem

Re: [fw-general] How to bootstrap application in testing environment

2009-09-22 Thread Sudheer Satyanarayana
Again, this is a wild stab in the dark, but I have: Zend_Session::$_unitTestEnabled = true; in my TestHelper.php (run at the start of testing), which magically fixes a lot of sessions related test problems. That fixed the problem. Thanks. -- With warm regards, Sudheer. S Business: http://

Re: [fw-general] How to bootstrap application in testing environment

2009-09-19 Thread Sudheer Satyanarayana
On Friday 18 September 2009 07:09 PM, Sudheer Satyanarayana wrote: Hi, I followed the tutorial at zendcasts.com ( http://tinyurl.com/n4hee2 ) to setup testing environment for my ZF enabled application. Everything went fine with regards to the tutorial. But the tutorial recommends including

Re: [fw-general] Split controller actions into multiple classes

2009-09-18 Thread Sudheer Satyanarayana
On Friday 18 September 2009 07:10 PM, Ryan Chan wrote: Hello, I have a controller that contains too many line of codes, which made the controller too large. So I want to split each action into eactly one class files. Is it recommended? If not, what are the recommended way to make the controlle

[fw-general] How to bootstrap application in testing environment

2009-09-18 Thread Sudheer Satyanarayana
Hi, I followed the tutorial at zendcasts.com ( http://tinyurl.com/n4hee2 ) to setup testing environment for my ZF enabled application. Everything went fine with regards to the tutorial. But the tutorial recommends including a test class that extends Zend_Test_PHPUnit_ControllerTestCase in th

Re: [fw-general] Clarification needed about "Zend" and its products

2009-09-12 Thread Sudheer Satyanarayana
On Saturday 12 September 2009 08:25 PM, ataulkarim wrote: I must admit in the beginning i'm somewhat new to Frameworks, but for reasons to move to enterprise development and faster project execution im prone to get into the Frameworks Arena. Now, i have to make a choice between certain frameworks

Re: [fw-general] Usage of ZFW / PHP in yuor country

2009-09-12 Thread Sudheer Satyanarayana
On Saturday 12 September 2009 04:12 PM, howard chen wrote: Hello, I am from Taiwan. In Taiwan, PHP is still not a main stream commerical programming language for web, people still prefer .NET or Java for web site development. (Althought most taiwan people prefer PHP opensource app such as wordp

Re: [fw-general] Unable to translate strings retrieved from DB

2009-08-19 Thread Sudheer Satyanarayana
Thomas Weidner wrote: Simply make a var_dump() of $string, and $manualString and compare them to see where the differences are. A missing whitespace, additional point or any other different char could be the problem. You hit the nail on the head, Thomas. Thank you very much. I thought I was

[fw-general] Unable to translate strings retrieved from DB

2009-08-19 Thread Sudheer Satyanarayana
Hi, I am trying to set up a translation layer to an existing application. Here is my sample PHP script: [phpscript] $translate = new Zend_Translate('gettext', APPLICATION_PATH . '/languages/en/menu.mo', 'en'); $translate->setLocale('en'); mysql_connect($MySQL_Host, $MySQL_User, $MySQL_Passw);

[fw-general] Re: [fw-mvc] - Where to put common DB calls

2009-08-11 Thread Sudheer Satyanarayana
Vibhor Singh wrote: Hi, Can someone plz tell me whether there is any provision in ZF where I can put my common DB related functionalities, something like how action helpers is to controllers? All suggestions are welcome. Can you elaborate? The answer depends on the type of functio

Re: [fw-general] Matthew's pastebin app

2009-08-10 Thread Sudheer Satyanarayana
Christoph Dorn wrote: Matthew, Are you planning to update your pastebin app to incorporate all the latest 1.9 features? Christoph I would love to hear yes from Matthew! -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: htt

Re: [fw-general] Put each action in a separate PHP file?

2009-08-08 Thread Sudheer Satyanarayana
Ryan Chan wrote: Hello, As a ZFW learner, I tried the quick start: http://framework.zend.com/docs/quickstart/create-a-form My problem is when the controller contains many action - it make the file too large to edit. So I want to split each action into a separate PHP file, is it possible? Tha

Re: [fw-general] Zend Framework 1.9.0 Released!

2009-07-31 Thread Sudheer Satyanarayana
Matthew Weier O'Phinney wrote: The Zend Framework team announces the immediate availability of version 1.9.0! http://framework.zend.com/download/latest Kudos and thanks go out to the huge number of community contributors who helped make this release possible. This release has been almost en

Re: [fw-general] Unable to autoload module's models

2009-07-27 Thread Sudheer Satyanarayana
Have you got resources.modules = "" in your application.ini (or equivalent)? This causes the modules resource to be instantiated, which is responsible for calling the bootstrappers for all modules. Thanks. I was missing this. After I added [code] resources.modules = APPLICATION_PATH "/modu

Re: [fw-general] Unable to autoload module's models

2009-07-27 Thread Sudheer Satyanarayana
iamjim wrote: Here is what works for me in my module (Auth), to autoload files in the module subdirectories form, service, and models. class Auth_Bootstrap extends Zend_Application_Module_Bootstrap { protected function _initAuthAutoload() { $autoloader = new Zend_Application_Mod

[fw-general] Unable to autoload module's models

2009-07-25 Thread Sudheer Satyanarayana
Hi, I have the following directory structure application ---Bootstrap.php ---modules --admin --default -controllers -models --- Account.php (with class Model_Account) -views --job Bootstrap.php( with class Job_Bootstrap extends Zend_Applicatio

Re: [fw-general] ZF1.8.4 and Dojo filteringselect

2009-07-25 Thread Sudheer Satyanarayana
Holon35 wrote: Since V1.8.4 off ZF all my dojo dialog are down. With ZF1.8.3 /1001sportifsv2/public/general/default/index/listecommunautesrechvideo is called automatically and the value corresponding to 10 is selected. With 1.8.4 nothing is selected and 'populate' dont work at all. I'm very de

Re: [fw-general] Problem about running the quick start sample.

2009-06-22 Thread Sudheer Satyanarayana
Niu Kun wrote: Dear all, I'm new to Zend Framework. First of all, I followed the quick start sample. But I change the database to mysql. And I change the pdo configuration. But when I browse to http://localhost/guestbook, I always get a 404 error. So I downloaded the sample code from the zend

Re: [fw-general] Get request from view

2009-06-16 Thread Sudheer Satyanarayana
umpirsky wrote: Hi. Is there some easy way to get request parameters from view script (object)? I like smarty $smarty.post, is there sth like $view->getParam() in zend framework? You can get the request parameters from the request object. This might help to grab the request object: http://

Re: [fw-general] Reusing a partial across modules

2009-05-20 Thread Sudheer Satyanarayana
keith Pope wrote: 2009/5/20 Sudheer Satyanarayana : Hello all, I am trying to reuse a partial in all my modules. I have the partial placed at modules/default/views/scripts/search.phtml In the view script modules/admin/views/scripts/branch/index.phtml I have the following code

[fw-general] Reusing a partial across modules

2009-05-20 Thread Sudheer Satyanarayana
Hello all, I am trying to reuse a partial in all my modules. I have the partial placed at modules/default/views/scripts/search.phtml In the view script modules/admin/views/scripts/branch/index.phtml I have the following code: paginationControl($this->paginator, 'Sliding', 'search.phtml', ar

Re: [fw-general] howto find a method

2009-05-18 Thread Sudheer Satyanarayana
Mike Wright wrote: Hi all, Is there any glossary or index that allows finding a method and/or its associated class? Sure would make life easier, especially for those not already immersed in the framework :D http://framework.zend.com/docs/api Is that what you are looking for? -- With w

Re: [fw-general] Four oh four issue

2009-05-14 Thread Sudheer Satyanarayana
I have posted this to the issue queue. Vote for it - http://framework.zend.com/issues/browse/ZF-6650 -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net

[fw-general] Four oh four issue

2009-05-13 Thread Sudheer Satyanarayana
Hi, I have set up the the error controller with error_handler to act as 404 handler as per the instructions in the online reference manual. The 404 handler works but for one situation. If there is a ':' in the URI I don't get the exxception of type Zend_Controller_Plugin_ErrorHandler::EXCEPTI

[fw-general] Refresh meta tag with Zend_Http_Client

2009-05-07 Thread Sudheer Satyanarayana
Hi list, Is Zend_Http_Client capable of refreshing meta tag? If so, how do I achieve it? -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net

Re: [fw-general] Survey: Development environment for PHP/ZFW

2009-05-02 Thread Sudheer Satyanarayana
howard chen wrote: Please feel free to answer: 1. What OS you are using during development? Windows? Mac? Linux? Linux. Currently Fedora 10. 2. Do you edit source code on localhost or remote? i.e. is your testing environment reside on localhost or remote? Local 3. What tool or IDE you

Re: [fw-general] how to know which controller and action is being called

2009-04-27 Thread Sudheer Satyanarayana
Vadim Gabriel wrote: Hey, That will not give him the ability to access the request object in his view script. Unless he would like to get the front controllers instance directly inside the view script file. True. I have never encountered a situation where I had to access the request object

Re: [fw-general] how to know which controller and action is being called

2009-04-26 Thread Sudheer Satyanarayana
prado wrote: BTW Vince How can i use this below straight from the view without putting in a variable from the controller? cheers Access the request object. And then you can read the controller name: $request->getControllerName(); This link might help - http://techchorus.net/how-access-req

Re: [fw-general] Zend_Db_Table How best to associate an object with a db table?

2009-04-26 Thread Sudheer Satyanarayana
J DeBord wrote: This may be partially a general oop question, but I hope someone can give me some advice. If you want to build a User object, what is the best way to store it's attributes? Would a user object extend a Zend_Db_Table? Would you code a User class and have it interact with a User

Re: [fw-general] Zend Framework team reorganization

2009-04-14 Thread Sudheer Satyanarayana
Matthew Weier O'Phinney wrote: Greetings! The Zend Framework team has undergone some internal reorganization recently which will have some bearing on the project. First, the team now reports to Zeev Suraski, Zend's CTO. Please welcome him to the lists! Wow. Welcome Zeev. Additionally, Wil

Re: [fw-general] Zend Framework Dojo Form Example with everything working?

2009-03-25 Thread Sudheer Satyanarayana
Garey Smiley wrote: Sudheer Satyanarayana wrote: Garey Smiley wrote: I can't seem to find a fully working Zend_Dojo_Form example that actually works and includes bootstrap, controller and view that work with the example Zend_Dojo_Form class. I've tried many of them from th

Re: [fw-general] Zend Framework Dojo Form Example with everything working?

2009-03-24 Thread Sudheer Satyanarayana
Garey Smiley wrote: I can't seem to find a fully working Zend_Dojo_Form example that actually works and includes bootstrap, controller and view that work with the example Zend_Dojo_Form class. I've tried many of them from the web, but all of them seem to be missing certain vital information to a

Re: [fw-general] security/Zend Session

2009-03-09 Thread Sudheer Satyanarayana
411161 wrote: If I have some code that checks to see if a user is logged in and I want to do this for every page where is the best place to do this? I use modules and just want to do it for a particular module, does that change things? Front controller plugin. -- With warm regards, Sudhee

Re: [fw-general] Zend Db how to update rows like "price=price+formValue['price'] "

2009-03-09 Thread Sudheer Satyanarayana
Mantasgl wrote: Hi I have a form in which I write a price and i want that prices of my products could be increased by that form value. A simple query would look like "UPDATE product SET price = price + $formvalue['price']" This works in phpmyadmin. So how could I write such a query with zend