[fw-general] Zend_Bittorrent in laboratory
I have put the Zend_Bittorrent component I am working on in the laboratory: http://framework.zend.com/svn/laboratory/library/Zend/ Feel free to play around with it and tell me what you think. I can add the the unit tests if someone wants to see them as well. The proposal is located at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Bittorrent+-+Christer+Edvartsen -- mvh Christer Edvartsen
Re: [fw-general] list data api
-- digitalus_media [EMAIL PROTECTED] wrote (on Wednesday, 05 December 2007, 12:22 PM -0800): i am starting to work on a list api that is modeled after the .net one. it is a super simple class that enables you to create list objects that contain any number of items / nested lists that can be any type of data. the data is managed as stdClasses. the class has a method, toString which serializes the data object. you can pass this string to the constructor, and it will wake the object up. has anyone else done any work on anything similar or have any input? You may want to check out ArrayObject in the SPL; other than the __toString() implementation (which you could add by extending ArrayObject), it has everything you mention already. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Zend_Form
-- Mark Maynereid [EMAIL PROTECTED] wrote (on Wednesday, 05 December 2007, 07:47 PM -0800): I seem to have a found a couple is simple bugs in revision 155. Zend_Form_Element_Select and Zend_Form_Element_Radio don't parse due to '.php' in the class declarations. Oops! *notes to self: always check search and replace results carefully. Fixed in svn now. On a more tricky issue I'm a little stuck dealing with form input where the field is optional. I note your test.php contains addValidator(new Zend_Validate_NotEmpty()) which is clear enough, but how might I validate a Zend_Form_Element when the input is to be considered optional for it? Ah -- missed that one. I've noted it as a required improvement; I'll let you know when this is possible in the laboratory code. You ask later in the email why the proposal isn't using Zend_Filter_Input. The primary reason is because I want the validators and filters attached to the individual elements; Zend_Filter_Input assumes you are going to validate multiple elements at once. By having the validators/filters per-element, we can utilize the same element in multiple forms. The downside, of course, is that there are some items such as marking elements as required/optional that have been achieved already in Zend_Filter_Input. I'll be looking closesly at that class as I finish up the prototype to make sure things are done in a compatible way. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] pdf manual
Hi there, could anyone publish the german manual as pdf , please? I tried several hours to create it by myself but it wont works. :-( Thanks a lot. Chris vanne wrote: And another update... http://www.nabble.com/file/p12906689/zf-1.0.2.pdf zf-1.0.2.pdf Marcelo Araujo wrote: Hello, Is there a pdf manual for the zend framework available at the official website? Regards, --Marcelo -- View this message in context: http://www.nabble.com/pdf-manual-tf3569487s16154.html#a14192159 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Using Zend_Config / Changing a module behaviour
We do it differently, and better in my opinion. In your bootstrap: 1) Figure out which type of env 2) Load appropriate config 3) Set the config object in the registry In your controller super class be sure to set a protected member $_config, which you can get from the registry during construction. Now $this-_config is always available in your controllers. You can do the same for your model super class too. We do stuff with ini files and sections, we also merge several configs because the app is layered in a specific way for our stuff, and we even allow loading custom configs so developers can setup whatever type of config they want on their own local machines, but that's the basics. BTW, we used to use SetEnv in apache but quickly figured out that it doesn't help you when you're doing cli php. We run cronjobs written in php for lots of different stuff and crons need a dev env too. So, we figured out we could actually use php.ini to set the env, which will allow us to know the env using php as an apache module OR cli. First set a directive in your php.ini, like: app_environment = dev Then in your bootstrap you can access this with: get_cfg_var('app_environment') - Tony On 12/2/2007 11:33 AM, robert mena wrote: Hi, I've adopted ZF as the framework that I am rewriting my modules. One of the things I'd like to do is have a better way of changing / defining some of my modules' behaviour. I am considering using Zend_Config (not sure if .ini o .xml) and have development, stagging and production config files. When the bootstrap is called I find out which enviroment I am using and in my __construct I load the appropriate config file. Basically I have 3 questions: a) should I use Zend_Config or is there any better way? b) which format should I use? ini or xml? The parameters can be numbers, strings or mixed arrays c) If I use Zend_Config I am planning something like the snippet below. Any advice on using it or a smarter way? .../blog/application/models,views,controllers .../blog/application/config/devel.xml, stagging.xml production.xml index.php ... if(some tests do define the environment as devel) Zend_Registry::set('ENVIRONMENT','devel') elseif(some tests do define the environment as stagging) Zend_Registry::set('ENVIRONMENT','staggingl') else Zend_Registry::set('ENVIRONMENT','production') blog/IndexController.php class Blog_IndexController { function indexAction() { ... throw an Exception if the environment is not defined... $blog = new Blog(...,Zend_Registry::get('ENVIRONMENT'); } } Blog.php class Blog { function __construct(...,$environment) { $config = new Zend_Config(/path_to_module/config/.$environment..xml) ; } } Thanks.
Re: [fw-general] Zend_Session::start() and remember me
Hi Laurent, IIRC, Zend_Session::rememberMe() uses session_set_cookie_params(). Thus, it must be called before the session is started to work properly. This is documented here: http://framework.zend.com/manual/en/zend.session.global_session_management.html#zend.session.global_session_management.rememberme Sorry for the long URL. :) Best regards, Darby Laurent Melmoux wrote: Hi all, Until now I had call Zend_Session::start() at the beginning of bootstrap file, so far so good. But now, I would like to add a remember me option on my login form, so if the authentification succeed and the remember me have been checked I call Zend_Session::rememberMe()... But it won’t work because the session is already started! What do you consider as best practice to deal with this use case? Where Zend_Session::start() should be called ? Regards
[fw-general] Should Zend_View_Helper_Url use rawurlencode()?
Ignore the fact that the ZF url is basically a bunch of parameters and say we were dealing with a real folder. In such a case example.com/A+Real+Folder is not the same as example.comA%20Real%20Folder, in fact, the first one gives me a 404 but I bet it works on some hosts. If I remember correctly, urlencode() is meant to encode stuff for POST or GET, whereas rawurlencode() generates a normal url path. But since the URL's in ZF are a bunch of parameters and don't link to real files then is using urlencode() wrong or not? There used to be an explanation of the differences on php.net but it's gone now. I guess some digging through specs is needed but I don't know where to start. -- View this message in context: http://www.nabble.com/Should-Zend_View_Helper_Url-use-rawurlencode%28%29--tf4956211s16154.html#a14192829 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Session::start() and remember me
Laurent Melmoux wrote: Hi Darby, I found this quote of Ralph in the archive : a. You start a session.. b. Do stuff.. c. Go to login page, complete and click remember me.. d. Now, your controller/script detects the posted rememberme, and then issues a Zend_Session_Core::rememberMe(); Note that c+d is a different request than the request for a+b. d1. what happens now is the client is sent a cookie named REMEMBERME=true, e. The next page visit that Zend_Session is started on will see the REMEMBERME cookie, then change the SESSION COOKIE to a persistent cookie (for as long as the remember me secionds value). The REMEMBERME cookie is then destroyed as its served its purpose. f. Now you have a session cookie that will end at a specific time in the future, not when the browser closes. I’m going to use this technique to solve my problem Yes, Ralph's explanation is fine and correct and does not conflict with the crux of my last message - that rememberMe() must be called before the session is started. But I'm wondering why it haven’t been implemented this way? Well, I guess that Zend_Session ::rememberMe() is not specific to authentification. What do you think of a Zend_Auth::setRememberMe() to place in your Auth Controller and a Zend_Auth::rememberMe() in the bootstrap that well check for a specific cookie then proxy to Zend_Session ::rememberMe() ? Darby Felton a écrit : Hi Laurent, IIRC, Zend_Session::rememberMe() uses session_set_cookie_params(). Thus, it must be called before the session is started to work properly. This is documented here: http://framework.zend.com/manual/en/zend.session.global_session_management.html#zend.session.global_session_management.rememberme Sorry for the long URL. :) Best regards, Darby Laurent Melmoux wrote: Hi all, Until now I had call Zend_Session::start() at the beginning of bootstrap file, so far so good. But now, I would like to add a remember me option on my login form, so if the authentification succeed and the remember me have been checked I call Zend_Session::rememberMe()... But it won’t work because the session is already started! What do you consider as best practice to deal with this use case? Where Zend_Session::start() should be called ? Regards
Re: [fw-general] Zend_Form
Thanks for that Matthew. Although it looks like it's still at rev 155 just now. Regards, Mark Matthew Weier O'Phinney-3 wrote: -- Mark Maynereid [EMAIL PROTECTED] wrote (on Wednesday, 05 December 2007, 07:47 PM -0800): I seem to have a found a couple is simple bugs in revision 155. Zend_Form_Element_Select and Zend_Form_Element_Radio don't parse due to '.php' in the class declarations. Oops! *notes to self: always check search and replace results carefully. Fixed in svn now. On a more tricky issue I'm a little stuck dealing with form input where the field is optional. I note your test.php contains addValidator(new Zend_Validate_NotEmpty()) which is clear enough, but how might I validate a Zend_Form_Element when the input is to be considered optional for it? Ah -- missed that one. I've noted it as a required improvement; I'll let you know when this is possible in the laboratory code. You ask later in the email why the proposal isn't using Zend_Filter_Input. The primary reason is because I want the validators and filters attached to the individual elements; Zend_Filter_Input assumes you are going to validate multiple elements at once. By having the validators/filters per-element, we can utilize the same element in multiple forms. The downside, of course, is that there are some items such as marking elements as required/optional that have been achieved already in Zend_Filter_Input. I'll be looking closesly at that class as I finish up the prototype to make sure things are done in a compatible way. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ -- View this message in context: http://www.nabble.com/Zend_Form-tf4719410s16154.html#a14194505 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Session::start() and remember me
Darby Felton a écrit : d1. what happens now is the client is sent a cookie named REMEMBERME=true, e. The next page visit that Zend_Session is started on will see the REMEMBERME cookie, then change the SESSION COOKIE to a persistent cookie (for as long as the remember me secionds value). The REMEMBERME cookie is then destroyed as its served its purpose. f. Now you have a session cookie that will end at a specific time in the future, not when the browser closes. I’m going to use this technique to solve my problem Yes, Ralph's explanation is fine and correct and does not conflict with the crux of my last message - that rememberMe() must be called before the session is started. Yes I totally agree with that. I think I don’t explain myself very well :). My original question was, how can I keep Zend_Session::start() at the beginning of my bootstrap and at the same time have my Auth Controller works with the remember me fiture. So now I have an answer, by using Ralph technique, I can set a cookie in the AuthController to notifies my bootstrap, to call Zend_Session::remeberMe()in my next page load. Actually, I got mixed up with the session remember me and the authentification remember me. It is 2 things even though the authentification remember me is tight couple with the session.( may be Zend_Session::setDuration() would be less confusing ? ) But I'm wondering why it haven’t been implemented this way? Well, I guess that Zend_Session ::rememberMe() is not specific to authentification. What do you think of a Zend_Auth::setRememberMe() to place in your Auth Controller and a Zend_Auth::rememberMe() in the bootstrap that well check for a specific cookie then proxy to Zend_Session ::rememberMe() ? Darby Felton a écrit : Hi Laurent, IIRC, Zend_Session::rememberMe() uses session_set_cookie_params(). Thus, it must be called before the session is started to work properly. This is documented here: http://framework.zend.com/manual/en/zend.session.global_session_management.html#zend.session.global_session_management.rememberme Sorry for the long URL. :) Best regards, Darby Laurent Melmoux wrote: Hi all, Until now I had call Zend_Session::start() at the beginning of bootstrap file, so far so good. But now, I would like to add a remember me option on my login form, so if the authentification succeed and the remember me have been checked I call Zend_Session::rememberMe()... But it won’t work because the session is already started! What do you consider as best practice to deal with this use case? Where Zend_Session::start() should be called ? Regards -- Laurent Melmoux - [EMAIL PROTECTED] Annecy - France Tél : 09 50 74 38 01 Portable : 06 71 09 52 26
Re: [fw-general] Zend_Form
-- Mark Maynereid [EMAIL PROTECTED] wrote (on Thursday, 06 December 2007, 07:34 AM -0800): Thanks for that Matthew. Although it looks like it's still at rev 155 just now. My bad -- I committed to the original working repository I had, instead of the one in the laboratory. oops! Committed now, along with a few other minor sundries. Matthew Weier O'Phinney-3 wrote: -- Mark Maynereid [EMAIL PROTECTED] wrote (on Wednesday, 05 December 2007, 07:47 PM -0800): I seem to have a found a couple is simple bugs in revision 155. Zend_Form_Element_Select and Zend_Form_Element_Radio don't parse due to '.php' in the class declarations. Oops! *notes to self: always check search and replace results carefully. Fixed in svn now. On a more tricky issue I'm a little stuck dealing with form input where the field is optional. I note your test.php contains addValidator(new Zend_Validate_NotEmpty()) which is clear enough, but how might I validate a Zend_Form_Element when the input is to be considered optional for it? Ah -- missed that one. I've noted it as a required improvement; I'll let you know when this is possible in the laboratory code. You ask later in the email why the proposal isn't using Zend_Filter_Input. The primary reason is because I want the validators and filters attached to the individual elements; Zend_Filter_Input assumes you are going to validate multiple elements at once. By having the validators/filters per-element, we can utilize the same element in multiple forms. The downside, of course, is that there are some items such as marking elements as required/optional that have been achieved already in Zend_Filter_Input. I'll be looking closesly at that class as I finish up the prototype to make sure things are done in a compatible way. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
[fw-general] Subfolders in controller folders
Hello, I have a question about controller folder depth. Lets say i have module admin and the folder structure would be something like this: admin -controllers --IndexController.php (class Admin_IndexController extends Zend_Controller_Action) -models -views By that structure i would have URL like http://www.exmpl.com/admin/index/index Admin being module name, index being controller and index (2) being action. But i wish to keep my files a bit more organized, in more folders, structure like : admin -controllers --news ---IndexController.php (??? class Admin_News_IndexController extends Zend_Controller_Action ???) -views -models So this structure's url would be http://www.exmpl.com/admin/news/index/index All fine if it would work, but looks like it doesn't allow subfolders of a module. It takes admin as module, news as controller file (not what i wanted) , and index as action. I'd like to keep Admin as module but NEWS to be just a part of invoking path - i hoped that would be achived by defintion class Admin_News_IndexController extends Zend_Controller_Action Am I missing something? Have to write my own router? Anyone with solution or anyone who can confirm this is not possible - that i got lost, please reply Ty -- View this message in context: http://www.nabble.com/Subfolders-in-controller-folders-tf4957417s16154.html#a14196977 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Bittorrent in laboratory
Hi Christer, Looks interesting. Note that it would be Zend_BitTorrent, with a capital T. You might also try to split up the Zend_BitTorrent_Torrent::buildFromPath() method into a couple other methods, because it's pretty long at the moment. -Matt On Thu, December 6, 2007 1:21 am, Christer Edvartsen wrote: I have put the Zend_Bittorrent component I am working on in the laboratory: http://framework.zend.com/svn/laboratory/library/Zend/ Feel free to play around with it and tell me what you think. I can add the the unit tests if someone wants to see them as well. The proposal is located at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Bittorrent+-+Christer+Edvartsen -- mvh Christer Edvartsen
Re: [fw-general] Zend_Bittorrent in laboratory
Hi Matt, Would you mind posting a comment to the proposal with these suggestions? I plan to review the proposal shortly and post my suggestions there, too. Thanks! Best regards, Darby Matthew Ratzloff wrote: Hi Christer, Looks interesting. Note that it would be Zend_BitTorrent, with a capital T. You might also try to split up the Zend_BitTorrent_Torrent::buildFromPath() method into a couple other methods, because it's pretty long at the moment. -Matt On Thu, December 6, 2007 1:21 am, Christer Edvartsen wrote: I have put the Zend_Bittorrent component I am working on in the laboratory: http://framework.zend.com/svn/laboratory/library/Zend/ Feel free to play around with it and tell me what you think. I can add the the unit tests if someone wants to see them as well. The proposal is located at: http://framework.zend.com/wiki/display/ZFPROP/Zend_Bittorrent+-+Christer+Edvartsen -- mvh Christer Edvartsen
[fw-general] Bug in Zend_Config_Xml?
Hi, I am trying to use Zend_Config_Xml but a code like this $config = new Zend_Config_Xml('config/config.xml', 'devel'); I should be able to do this, right? $config-emailList-subject[0]-email But in my test I can only access the last value (in this example the [EMAIL PROTECTED]). If I use simple_xml I can access with no problem. ?xml version=1.0 encoding= UTF-8? configdata production /production staging /staging devel emailList subject item Tech/item email [EMAIL PROTECTED]/email /subject subject item Billing/item email [EMAIL PROTECTED]/email /subject /emailList /devel /configdata
RE: [fw-general] Zend_Session::start() and remember me
Actually I found I could call Zend_Session::rememberMe() after Zend_Session::start() and it works. I call Zend_Session::start() in my bootstrap and Zend_Session::rememberMe() in my login action. I expected it to not work after reading the manual however it seems to work fine. -Original Message- From: Laurent Melmoux [mailto:[EMAIL PROTECTED] Sent: Friday, 7 December 2007 1:34 AM To: Darby Felton Cc: Zend Framework General Subject: Re: [fw-general] Zend_Session::start() and remember me Darby Felton a écrit : d1. what happens now is the client is sent a cookie named REMEMBERME=true, e. The next page visit that Zend_Session is started on will see the REMEMBERME cookie, then change the SESSION COOKIE to a persistent cookie (for as long as the remember me secionds value). The REMEMBERME cookie is then destroyed as its served its purpose. f. Now you have a session cookie that will end at a specific time in the future, not when the browser closes. Im going to use this technique to solve my problem Yes, Ralph's explanation is fine and correct and does not conflict with the crux of my last message - that rememberMe() must be called before the session is started. Yes I totally agree with that. I think I dont explain myself very well :). My original question was, how can I keep Zend_Session::start() at the beginning of my bootstrap and at the same time have my Auth Controller works with the remember me fiture. So now I have an answer, by using Ralph technique, I can set a cookie in the AuthController to notifies my bootstrap, to call Zend_Session::remeberMe()in my next page load. Actually, I got mixed up with the session remember me and the authentification remember me. It is 2 things even though the authentification remember me is tight couple with the session.( may be Zend_Session::setDuration() would be less confusing ? ) But I'm wondering why it havent been implemented this way? Well, I guess that Zend_Session ::rememberMe() is not specific to authentification. What do you think of a Zend_Auth::setRememberMe() to place in your Auth Controller and a Zend_Auth::rememberMe() in the bootstrap that well check for a specific cookie then proxy to Zend_Session ::rememberMe() ? Darby Felton a écrit : Hi Laurent, IIRC, Zend_Session::rememberMe() uses session_set_cookie_params(). Thus, it must be called before the session is started to work properly. This is documented here: http://framework.zend.com/manual/en/zend.session.global_session_management.h tml#zend.session.global_session_management.rememberme Sorry for the long URL. :) Best regards, Darby Laurent Melmoux wrote: Hi all, Until now I had call Zend_Session::start() at the beginning of bootstrap file, so far so good. But now, I would like to add a remember me option on my login form, so if the authentification succeed and the remember me have been checked I call Zend_Session::rememberMe()... But it wont work because the session is already started! What do you consider as best practice to deal with this use case? Where Zend_Session::start() should be called ? Regards -- Laurent Melmoux - [EMAIL PROTECTED] Annecy - France Tél : 09 50 74 38 01 Portable : 06 71 09 52 26
[fw-general] : exception 'Zend_Feed_Builder_Exception' with message 'title key of source property is missing'
Hi, I'm trying to import an array as a feed and get the following error: 'Zend_Feed_Builder_Exception' with message 'title key of source property is missing' in …/Zend/Feed/Builder.php:368 Here is the code: //Feed Array $feedArray = array( 'title' = 'Test Feed', 'link' = 'test.com', //'lastUpdate' = (0 == $posts-count() ? date('c', strtotime()) : date('c')), 'charset' = 'utf-8', 'description' = 'First test feed', 'author' = 'Jesse', 'email' = '[EMAIL PROTECTED]', 'copyright' = 'University, all rights reserved', 'generator' = 'Zend Framework Zend_Feed', 'language' = 'en', 'entries' = array( 'title' = 'Item One', 'link' = 'test.com', 'description' = 'this is a test feed', 'lastUpdate' = strtotime($post-updated), 'content' = 'Hello, this is the content', ) ); // create feed document $feed = Zend_Feed::importArray($feedArray, 'rss'); $feed-send(); Here are the lines around 368 in …/Zend/Feed/Builder.php: if (isset($row['source'])) { $mandatories = array('title', 'url'); foreach ($mandatories as $mandatory) { if (!isset($row['source'][$mandatory])) { throw new Zend_Feed_Builder_Exception($mandatory key of source property is missing); } } $entry-setSource($row['source']['title'], $row['source']['url']); } Now I've tried it with and without the 'source' array in the 'entries' array. I've even tried cutting and pasting what is in the manual: http://framework.zend.com/manual/en/zend.feed.importing.html All produce exactly the same error. I'm using 1.03 libraries. Whats going on?!? Thanks, Jess -- View this message in context: http://www.nabble.com/%3A-exception-%27Zend_Feed_Builder_Exception%27-with-message-%27title-key-of-source-property-is-missing%27-tf4959963s16154.html#a14205926 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Form
Hi Matthew, I have hit a usage issue on Zend_Form_Element_Select in rev 156. Let's say someone requests a POST method that sends data from a select element. Zend_View_Helper_Select used by Zend_Form appears to return numeric array indices in the XHTML rather than the actual enumerated values that I would want to store. As things stand, I need to identify where this occurs and translate the data before attempting $form-isvalid(). Is that how is should be, or should Zend_Form become intelligent enough to do this translation? Some code below based on your test.php attempts to illustrate it. Secondly, I am a little lost as to how to set the selected attribute on a select element from Zend_Form. Regards, Mark ?php $include_path = array( '.', dirname(dirname(__FILE__)) . '/library', '/usr/local/lib/ZendFramework/library', get_include_path() ); set_include_path(implode(PATH_SEPARATOR, $include_path)); error_reporting(E_ALL | E_STRICT); ini_set('display_errors', true); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); class TestForm extends Zend_Form_Abstract { public $selectOptions = array('a', 'b', 'c'); public function __construct() { $mySelect = new Zend_Form_Element_Select('my_select'); $mySelect-setLabel('My select'); $mySelect-setOptions($this-selectOptions); $this-addElement($mySelect) -addElement(new Zend_Form_Element_Submit('save')); } } $view = new Zend_View(); $view-addHelperPath(dirname(dirname(__FILE__)) . '/library/Zend/View/Helper', 'Zend_View_Helper'); $form = new TestForm(); $form-setView($view); echo Form:\n, $form-render(), \n\n; // Let's say the user chose 'c' which is array index 2 $form-populate(array( 'my_select' = 2, )); if ($form-getElement('my_select') instanceof Zend_Form_Element_Select) { $realValue = $form-selectOptions[$form-getElement('my_select')-getValue()]; } echo You selected $realValue; Matthew Weier O'Phinney-3 wrote: -- Mark Maynereid [EMAIL PROTECTED] wrote (on Friday, 30 November 2007, 07:35 AM -0800): It's in the laboratory: http://framework.zend.com/svn/laboratory/Zend_Form You can checkout from there using SVN, or simply browse the code. -- View this message in context: http://www.nabble.com/Zend_Form-tf4719410s16154.html#a14205925 Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Wiki is dead
Lovely greeting when I go to see data in the wiki: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /wiki/display/ZFDEV/Home. Reason: Error reading from remote server
Re: [fw-general] Zend_Form
For brevity I shall give the reference to an example, the approach in given libraries of processing Forms very much отличаеться from all offered(suggested) in current the moment. http://dklab.ru/lib/HTML_MetaForm/demo.zip p/s Excuse for my English if the example will be interested by me I can To consult, in Russian. Matthew Weier O'Phinney-3 wrote: -- Roman1975 [EMAIL PROTECTED] wrote (on Saturday, 01 December 2007, 06:10 AM -0800): I do not like that in these examples is the fact that we are committing to the library to check the values of these fields, as a hidden, select, and more so, because they can not substitute for why hackers would make auto testing such fields? or if you want to disable this auto testing. I'm really not sure I understand what you're getting at. Could you be more explicit and give some examples, please? * What do you mean by committing to the library to check the values of these fields? All proposed examples use Zend_Validate, which allows you to attach as many or as few validators to a field as you'd like, and to utilize your own custom validators. * What do you mean by they can not substitute for why hackers would make auto testing such fields? Are you assuming validation would be client-side? Because all of these solutions are *server-side* -- unless you allow which validators are selected based on user input, this won't be an issue... unless you also have problems with hackers getting local access to your files. Please explain your thoughts. Roman1975 wrote: Please tell who knows, how affairs with Zend_Form are, Whether his(its) development is planned? -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ -- View this message in context: http://www.nabble.com/Zend_Form-tf4719410s16154.html#a14206845 Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Wiki is dead
It's working now. That was an unplanned outage due to a backup that seems to have consumed all the memory, but I will be taking the server down for upgrades of both JIRA and Confluence in the next few days. I'll send a mail to the list giving everyone a few hours' notice. It shouldn't take more than an hour or so. ,Wil -Original Message- From: Elisamuel Resto [mailto:[EMAIL PROTECTED] Sent: Thursday, December 06, 2007 6:09 PM To: fw-general@lists.zend.com Subject: [fw-general] Wiki is dead Lovely greeting when I go to see data in the wiki: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /wiki/display/ZFDEV/Home. Reason: Error reading from remote server
Re: [fw-general] Zend_Session::start() and remember me
Are you sure it is working? Zend_Session::rememberMe() is calling Zend_Session::rememberUntil() which is calling the php function session_set_cookie_params () (http://php.net/session_set_cookie_params) . This function configures the cookie use by the session. As Darby said it should be called before session_start() to work. Finally here is how I solve this issue: *In my AuthController, after a successful authentification :* // Set a cookie to notify the bootstrap how long the session cookie should last $duration = $this-_form-rememberme ? 1209600 : 0; setcookie(Zend_Auth_RememberMe, $duration, time()+6000, '/'); *In my bootstrap:* // Session include 'Zend/Session.php'; if(isset($_COOKIE[Zend_Auth_RememberMe])){ Zend_Session::rememberUntil($_COOKIE[Zend_Auth_RememberMe]); unset($_COOKIE[Zend_Auth_RememberMe]); } Zend_Session::start(); Regards, -- Laurent Melmoux - [EMAIL PROTECTED] Annecy - France Steven Brown a écrit : Actually I found I could call Zend_Session::rememberMe() after Zend_Session::start() and it works. I call Zend_Session::start() in my bootstrap and Zend_Session::rememberMe() in my login action. I expected it to not work after reading the manual however it seems to work fine. -Original Message- From: Laurent Melmoux [mailto:[EMAIL PROTECTED] Sent: Friday, 7 December 2007 1:34 AM To: Darby Felton Cc: Zend Framework General Subject: Re: [fw-general] Zend_Session::start() and remember me Darby Felton a écrit : d1. what happens now is the client is sent a cookie named REMEMBERME=true, e. The next page visit that Zend_Session is started on will see the REMEMBERME cookie, then change the SESSION COOKIE to a persistent cookie (for as long as the remember me secionds value). The REMEMBERME cookie is then destroyed as its served its purpose. f. Now you have a session cookie that will end at a specific time in the future, not when the browser closes. I’m going to use this technique to solve my problem Yes, Ralph's explanation is fine and correct and does not conflict with the crux of my last message - that rememberMe() must be called before the session is started. Yes I totally agree with that. I think I don’t explain myself very well :). My original question was, how can I keep Zend_Session::start() at the beginning of my bootstrap and at the same time have my Auth Controller works with the remember me fiture. So now I have an answer, by using Ralph technique, I can set a cookie in the AuthController to notifies my bootstrap, to call Zend_Session::remeberMe()in my next page load. Actually, I got mixed up with the session remember me and the authentification remember me. It is 2 things even though the authentification remember me is tight couple with the session.( may be Zend_Session::setDuration() would be less confusing ? ) But I'm wondering why it haven’t been implemented this way? Well, I guess that Zend_Session ::rememberMe() is not specific to authentification. What do you think of a Zend_Auth::setRememberMe() to place in your Auth Controller and a Zend_Auth::rememberMe() in the bootstrap that well check for a specific cookie then proxy to Zend_Session ::rememberMe() ? Darby Felton a écrit : Hi Laurent, IIRC, Zend_Session::rememberMe() uses session_set_cookie_params(). Thus, it must be called before the session is started to work properly. This is documented here: http://framework.zend.com/manual/en/zend.session.global_session_management.h tml#zend.session.global_session_management.rememberme Sorry for the long URL. :) Best regards, Darby Laurent Melmoux wrote: Hi all, Until now I had call Zend_Session::start() at the beginning of bootstrap file, so far so good. But now, I would like to add a remember me option on my login form, so if the authentification succeed and the remember me have been checked I call Zend_Session::rememberMe()... But it won’t work because the session is already started! What do you consider as best practice to deal with this use case? Where Zend_Session::start() should be called ? Regards