Re: [fw-general] Zend Framework performance for real application?
Hi, Does anyone know a Canadian-based web hosting service with APC enabled?
Re: [fw-general] Zend_Layout - images and css not loading
Not a solution to the problem, but rather a note, you should be using baseUrl(). Like: $this-view-headLink()-appendStylesheet($this-getRequest()-getBaseUrl() . '/css/lib.css'); And if you are adding it in the view, then I've found this helper BaseURL() by Geoffrey Tran to be very useful: http://www.spotsec.com/blog/archive/2007/12/14/zend-framework-baseurl-view-helper/ I use it like this (in the view): $this-headLink()-appendStylesheet($this-baseUrl('/css/lib.css')); Cheers, - Amr On Feb 1, 2008 10:39 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Peter Atkins [EMAIL PROTECTED] wrote (on Friday, 01 February 2008, 12:17 PM -0800): I apologize that was my typo html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleHome/title link href=/css/lib.css media=screen rel=stylesheet type=text/css //head body img src=images/order.gif div id=header!-- base/header -- brbr/div . I wish that was it... I do see the following two errors: HP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (css)'... PHP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (images)' Okay, this sounds like one of two things: * Either the css and image files are not under your public directory, OR * You've got a bad rewrite rule, and *all* files are getting routed to the front controller instead of omitting static content What does your rewrite rule look like? Is it the one from the documentation: RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php On Feb 1, 2008, at 11:50 AM, Matthew Weier O'Phinney wrote: -- Peter Atkins [EMAIL PROTECTED] wrote (on Friday, 01 February 2008, 11:34 AM -0800): This is my first post to the list, and also my first project with ZF. I'm trying to implement Zend_Layout with all the MVC elements outside of the public doc root. This also includes the new layout templates (I also tried with templates in pub tree). This issue I'm having is that the css and/or images are not displaying. I have an image call in the base.phtml template and I'm trying to load the css from the indexController using ... $this-view-headLink()-appendStylesheet('/css/lib.css'); It produces the proper code: link href=css/lib.css media=screen rel=stylesheet type=text/css / Wait -- where did the leading '/' go? That could very well be the issue, as without the leading slash, the browser is going to look in the path, which could likely contain a /controller/action/ string... leading to a 404 for the file. appendStylesheet() shouldn't be trimming this off, nor should headLink() be removing it when rendering itself. You're sure you're adding it with the leading slash? They are located in the pub tree see below: File locations /application/controller/* /application/models/* /application/views/* /application/views/layouts /application/views/layouts/basic /application/views/layouts/basic/basic.phtml // basic layout template Base file content: html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / ?= $this-headTitle() ? ?= $this-headLink() ? ?//= $this-headScript() ? ?//= $this-headStyle() ? /head body // not displaying img src=/images/logo.gif div id=header?= $this-render('header.phtml') ?/div div id=nav?= $this-placeholder('nav') ?/div div id=content?= $this-layout()-content ?/div div id=content?= $this-render('footer.phtml') ?/div /body /html /public_html/images/logo.gif /public_html/css/lib.css /public_html/index.php // bootloader Any thoughts would be great, I'm sure I'm missing something simple. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
[fw-general] Zend_Loader and Zend_Filter_Input issues
Hi Darby The revisions you've made to Zend_Loader have thrown up some other side-effects - and looking closely into the Zend_Filter_Input module perhaps that's been a good thing! When I updated my ZF library to trunk, I started getting lots of E_WARNINGs refering to missing Zend_Filter_NotEmpty and Zend_Filter_Between. Strange, I thought, they're only validators, not filters. Try as I could I couldn't shake these warnings (I leave my dev box as 'chatty' as possible to even throw notices to see if everything is OK). When I looked closer into the Zend_Filter_Input class, I found that there's a method called '_getFilterOrValidator($interface, $classBaseName)'. It iterates through all the namespaces to find a matching class - which probably worked noiselessly before, but now, of course, Zend_Loader throws all these warnings for non-existent classes. Is there a reason for this performance hog - Zend_Filter_Input I mean? Is there any likelihood that a filter and a validator will share the same namespace? Are there any developers out there that would be adversely affected by a slight refactoring for this - adding namespaces for either a Validator or Filter so that the loader can be slightly more efficient? I'll pop an issue in on JIRA but wanted to raise it here first to gauge a reaction and see who's the caretaker of this component at present? Cheers -- Simon Mundy | Director | PEPTOLAB 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000 Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124 http://www.peptolab.com
Re: [fw-general] Zend_Layout - images and css not loading
On 01/02/2008, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- Peter Atkins [EMAIL PROTECTED] wrote (on Friday, 01 February 2008, 12:17 PM -0800): I apologize that was my typo html head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleHome/title link href=/css/lib.css media=screen rel=stylesheet type=text/css //head body img src=images/order.gif div id=header!-- base/header -- brbr/div . I wish that was it... I do see the following two errors: HP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (css)'... PHP Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (images)' Okay, this sounds like one of two things: * Either the css and image files are not under your public directory, OR * You've got a bad rewrite rule, and *all* files are getting routed to the front controller instead of omitting static content What does your rewrite rule look like? Is it the one from the documentation: RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php Also, what happens when you visit the file linked to in the source of your generated HTML page? Best, -- Vincent
Re: [fw-general] Slow performance with ZF 1.5.0PR on a live server
Hi all. Darby's code to manage exception is a good deal, unfortunatly it seems to show performance issues. What do you think of that new Zend_Loader code, working with php's track_error param ? : ?php //.. /** * Try finding for the plain filename in the include_path. */ if(ini_get('track_errors') == 0){ ini_set('track_errors',1); } if ($once) { @include_once $filename; } else { @include $filename; } /** * If searching in directories, reset include_path */ if ($incPath) { set_include_path($incPath); } if (isset($php_errormsg)){ throw new Zend_Loader_Exception($php_errormsg); } return true; // .. ? cheers Julien.Pauli 2008/2/1, Darby Felton [EMAIL PROTECTED]: Ralf Eggert wrote: As to your performance problems, I suspect that you could be having trouble with Zend_Loader. Please see the following JIRA issue if you also suspect the same could be true: http://framework.zend.com/issues/browse/ZF-2463 But could this problem really result in a quadruplication of the run time for almost all pages? I rather thought that amendments to other components like Zend_Db or Zend_Controller might have caused the performance decrease. I probably should not guess any further. :) I'll recommend to use profiling to determine the cause(s) of your performance degradation. :) I just happened to be aware (having made the changes myself) of a not-so-fast Zend_Loader implementation pursuant to: http://framework.zend.com/issues/browse/ZF-2463 This implementation made it into 1.5.0 PR before I could change it, but the latest SVN version of it does not have the error handling functions about which I was concerned. Instead, errors in included files will simply be handled in the normal PHP way. :) Finally, I would recommend that Zend_Loader be eschewed, in favor of using require_once, whenever possible. If there are any framework components using Zend_Loader, where require_once would work nicely instead, please let us know about it. This is not so easy to accomplish since my whole application relies on Zend_Loader. All classes I use should be loaded by Zend_Loader and I don't really get the point of a Zend_Loader class if it is not recommended to use it Okay, so in this case, it's not reasonably possible for you not to use Zend_Loader. That's fine. I was really more concerned about the version that came with 1.5.0 PR than the version from 1.0.3 or the version that will be in 1.5.0 RC1. Best regards, Darby
[fw-general] Re: [fw-mvc] Proposal for a user agent component
Christer, I'm actually in the process of finishing up just such a component for my job. (Can't share it, unfortunately--it contains some proprietary knowledge.) Some thoughts: - Call it Zend_Device. - Identifying specific mobile devices is more important than identifying specific standard browsers. - Rely on multiple data sources, not just one. - Return device capabilities in addition to identifying the device (maybe you'd want this to be an eventual goal, but plan for it). - If you're returning device capabilities, you'll want some form of local caching/storage. Figure that into the proposal. - Integrate it into the ContextSwitch view helper. Good luck! -Matt On Wed, January 30, 2008 11:26 am, Christer Edvartsen wrote: I have created a page in the wiki that will hold the proposal for a Zend_UserAgent component. The proposal does not hold that much information yet, but I will add some more as soon as I get some feedback from you guys. It's located at http://framework.zend.com/wiki/display/ZFPROP/Zend_UserAgent+-+Christer+Edvartsen The component is supposed to be used to classify user agents into some predefined categories. I suggest the following categories: * Browser * RSS Reader * Mobile Device * Robot A Zend_Controller_Action helper could also be made by using this component but I guess something like this could live outside of a typical MVC application so I suggest it as a separate component. There are several user agent databases out there, and the one I was thinking about using is http://www.user-agents.org/ which has an extensive list of user agent strings. One problem is that the database does not have the Mobile device category. The list is huge though (2500+ user agents) and I don't think it would be necessary to use _every_ user agent string in that database. Does anyone have any ideas of how to decide of what list we could use for something like this? The component will be made in such a manner that developers can add their own list/database if they think the one we provide is not sufficient. The component could also be extended to fetch some more detalied information about mobile devices using WURFL (http://wurfl.sourceforge.net/). Any comments? -- Christer Edvartsen [EMAIL PROTECTED] http://cogo.wordpress.com/
[fw-general] Zend_Date print in 1.5 Preview Release
In the 1.5 preview release, Zend_Date has a print statement on line 2157 which is being hit when I construct a new Zend_Date. It looks like this has been removed in trunk. I just wanted to make sure this made it into 1.5 (or didn't make it in, as the case may be). -- Bradley Holt [EMAIL PROTECTED]
Re: [fw-general] Zend_Date print in 1.5 Preview Release
1.5 will be build from trunk... so this is no problem. Greetings Thomas Weidner, I18N Team Leader http://www.thomasweidner.com - Original Message - From: Bradley Holt [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Saturday, February 02, 2008 7:13 PM Subject: [fw-general] Zend_Date print in 1.5 Preview Release In the 1.5 preview release, Zend_Date has a print statement on line 2157 which is being hit when I construct a new Zend_Date. It looks like this has been removed in trunk. I just wanted to make sure this made it into 1.5 (or didn't make it in, as the case may be). -- Bradley Holt [EMAIL PROTECTED]
Re: [fw-general] Zend_Date print in 1.5 Preview Release
OK, great, thank you! On Feb 2, 2008 1:45 PM, Thomas Weidner [EMAIL PROTECTED] wrote: 1.5 will be build from trunk... so this is no problem. Greetings Thomas Weidner, I18N Team Leader http://www.thomasweidner.com - Original Message - From: Bradley Holt [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Saturday, February 02, 2008 7:13 PM Subject: [fw-general] Zend_Date print in 1.5 Preview Release In the 1.5 preview release, Zend_Date has a print statement on line 2157 which is being hit when I construct a new Zend_Date. It looks like this has been removed in trunk. I just wanted to make sure this made it into 1.5 (or didn't make it in, as the case may be). -- Bradley Holt [EMAIL PROTECTED] -- Bradley Holt [EMAIL PROTECTED]
[fw-general] How can i inherit Zend_Form_Element?
I can't understand how can i inherit Zend_Form_Element. I tried redefine them but so many decorators and elements. -- View this message in context: http://www.nabble.com/How-can-i-inherit-Zend_Form_Element--tp15251330s16154p15251330.html Sent from the Zend Framework mailing list archive at Nabble.com.