RE: [fw-general] Zend Loader performance - benchmark
Thx for the benchmarks :) I think there where earlier discussions on this and the ZF team are working on their own set of benchmarks, it will be interesting to see how all this compares. Looks to me like the performance difference is pretty negligible for most developers to worry about :) I was thinking about this after the earlier discussions and was wondering what people thought about phar? Would this improve performance if you really needed it? Keith Pope Web Developer -Original Message- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: 15 May 2008 23:56 To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend Loader performance - benchmark Hi! I've run a benchmark loading 725 framework class files on 5.2 and 5.3 with and without bytecode caching. The benchmark uses list of 725 Framework classes and loads them one by one, via require_once and via Zend_Loader::loadClass. You can see the files here: http://random-bits-of.info/fw-tests/ OK, so here's the results: Without bytecode cache: require_once Zend_Loader php5.24.42 4.42 php5.34.96 4.97 With bytecode cache: require_once Zend_Loader php5.263.04 56.62 php5.361.28 55.52 Numbers are requests per second (more is better). Bytecode cache used in the benchmark is Zend's one, not APC. Conclusions from this would be: 0. It is *very* important to understand that it is a narrow-point benchmark that tests only one function in one specific way. Please do not draw conclusions on behavior of whole applications based only on this benchmark. 1. You *do* want to use bytecode caching. You won't get 15x performance on any real application, but it does speed up loading very significantly. 2. Without bytecode caching, it doesn't matter if you use require_once or Loader - both are equally slow :) 3. With bytecode caching, Loader has some overhead - explanation for this is that with file accesses eliminated, require_once of course has little left, while Loader still does a couple of function calls. But on real-life apps it'd probably be very small, provided that it's about 10% even on loading-only huge-class-list benchmark, and your application probably does something useful instead of loading 700+ framework classes :) 4. 5.3 is still a moving target, to don't put too much stake in current benchmark results for 5.3, they probably will be different by the time 5.3 is in release cycle (hopefully, better :) If you have more questions on this, please ask. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT Reg. No. 666 9148 88. Telephone: 0870 243 3434, Fax: 0870 243 6041. Website: www.allpay.net Email: [EMAIL PROTECTED] This email, and any files transmitted with it, is confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error please notify the allpay.net Information Security Manager at the number above.
Re: [fw-general] Example Zend Framework Blog Application Tutorial: Parts 1-8
Working on it ;). Unlike a client site, my personal ones are the lowest priority on work days. I know it's clearly annoying to have it offline for days but I can't afford to take the time to fix it right now when the weekend is mere hours away ;). My request for a Slicehost VPS is being processed - maybe this evening depending on how long it takes to get the instance tailored. They don't install CPanel or anything so I'll probably end up installing lots of stuff as simple as tar ;). On the plus side, the usual sluggish response of my blog should be completely gone which is only to the good. Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation Member-Subscriber - Original Message From: Joseph Crawford [EMAIL PROTECTED] To: Pádraic Brady [EMAIL PROTECTED] Cc: Zend Framework General fw-general@lists.zend.com Sent: Friday, May 16, 2008 1:42:41 AM Subject: Re: [fw-general] Example Zend Framework Blog Application Tutorial: Parts 1-8 Just what I was looking for and it's not online lol just my luck :) On May 15, 2008, at 6:57 PM, Pádraic Brady wrote: I've decided on Slicehost - seems to have the most recommendations from developers I've heard from, and the pricing and features are incredible value. I prefer root access to CPanel and such anyway. Dreamhost returned a response 26 hrs after my query - I wonder if their entire support staff fell asleep yesterday? ;) As suspected, traffic spiked over the previous week bringing server load from 10 to over 125 at peak. They pretty much suggested their account would not be able to continue hosting the blog. Their alternative was their private server offering, but it's more expensive than VPS (managed with same limitations as their other accounts - no root access for example), and it's high time I prepared for the future an
Re: [fw-general] Zend Loader performance - benchmark
I think the results were inevitable. It seems there is still a lot of developers out there quoting from blog posts and irc discussions that are months, and in some cases, years old. You'd think PHP 5.2 was not being used anywhere ;). We really do need some more benchmarks out there proving this point. We live in a world where a framework can even be judged by it's download size afterall! Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation - Original Message From: Keith Pope [EMAIL PROTECTED] To: fw-general fw-general@lists.zend.com Sent: Friday, May 16, 2008 8:23:19 AM Subject: RE: [fw-general] Zend Loader performance - benchmark Thx for the benchmarks :) I think there where earlier discussions on this and the ZF team are working on their own set of benchmarks, it will be interesting to see how all this compares. Looks to me like the performance difference is pretty negligible for most developers to worry about :) I was thinking about this after the earlier discussions and was wondering what people thought about phar? Would this improve performance if you really needed it? Keith Pope Web Developer -Original Message- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: 15 May 2008 23:56 To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend Loader performance - benchmark Hi! I've run a benchmark loading 725 framework class files on 5.2 and 5.3 with and without bytecode caching. The benchmark uses list of 725 Framework classes and loads them one by one, via require_once and via Zend_Loader::loadClass. You can see the files here: http://random-bits-of.info/fw-tests/ OK, so here's the results: Without bytecode cache: require_once Zend_Loader php5.24.42 4.42 php5.34.96 4.97 With bytecode cache: require_once Zend_Loader php5.263.04 56.62 php5.361.28 55.52 Numbers are requests per second (more is better). Bytecode cache used in the benchmark is Zend's one, not APC. Conclusions from this would be: 0. It is *very* important to understand that it is a narrow-point benchmark that tests only one function in one specific way. Please do not draw conclusions on behavior of whole applications based only on this benchmark. 1. You *do* want to use bytecode caching. You won't get 15x performance on any real application, but it does speed up loading very significantly. 2. Without bytecode caching, it doesn't matter if you use require_once or Loader - both are equally slow :) 3. With bytecode caching, Loader has some overhead - explanation for this is that with file accesses eliminated, require_once of course has little left, while Loader still does a couple of function calls. But on real-life apps it'd probably be very small, provided that it's about 10% even on loading-only huge-class-list benchmark, and your application probably does something useful instead of loading 700+ framework classes :) 4. 5.3 is still a moving target, to don't put too much stake in current benchmark results for 5.3, they probably will be different by the time 5.3 is in release cycle (hopefully, better :) If you have more questions on this, please ask. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT Reg. No. 666 9148 88. Telephone: 0870 243 3434, Fax: 0870 243 6041. Website: www.allpay.net Email: [EMAIL PROTECTED] This email, and any files transmitted with it, is confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error please notify the allpay.net Information Security Manager at the number above.
Re: [fw-general] Dumb Question
Hi Joseph, What I usually do is three fold: 1. Add is as the default adapter to Zend_Db_Table for use by all my Zend based Models. This also acts as a Registry by the way, since you can call Zend_Db_Table::getDefaultAdapter() anywhere. 2. Add it to a Registry as would be normal practice. 3. Possibly add it as a Front Controller parameter so you can retrieve it from any controller action using that method. Where possible I prefer 3, simply because I prefer to avoid as many static calls in my controllers as possible. But a Registry works just fine so long as you use it only as needed. Paddy Joseph Crawford wrote: In my index.php bootstrap file I setup the database connection into a variable $db. Now I need to access this in other controllers. This seems like a dumb question to me but do I need to global $db; before I can access it in the indexAction method of the controller or is it in the global scope by default? Thanks, Joseph Crawford - Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com OpenID Europe Foundation - Irish Representative -- View this message in context: http://www.nabble.com/Dumb-Question-tp17253025p17269386.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
Hi and welcome :) You will have to supply more details about your problem for anyone to be able to help. For instance what kind of error messages do you get? Jacob Oettinger vladimirn wrote: First of all i would like to say hello to all in here Tho, if i missed a topic, please move it onto the right place. Well, i got to make some changes on the web site which has been make with zend framework. So i am kinda noob on ZF But job must have be done. So i started to read tutorials and so on.. My task was to add some functionality on the existing web site. I did it on my localhost, and everything is just fine. But, when i upload files to the web server, it wont work. What could be possibly reason? Or reasons? Any ideas? Where to look into? Thanks a lot in advance, Vladimir -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272166.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir oetting wrote: Hi and welcome :) You will have to supply more details about your problem for anyone to be able to help. For instance what kind of error messages do you get? Jacob Oettinger vladimirn wrote: First of all i would like to say hello to all in here Tho, if i missed a topic, please move it onto the right place. Well, i got to make some changes on the web site which has been make with zend framework. So i am kinda noob on ZF But job must have be done. So i started to read tutorials and so on.. My task was to add some functionality on the existing web site. I did it on my localhost, and everything is just fine. But, when i upload files to the web server, it wont work. What could be possibly reason? Or reasons? Any ideas? Where to look into? Thanks a lot in advance, Vladimir -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272439.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Has it worked before on the live server? If not, are you sure the rewrite rules are correct? Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) Sorry, I can't follow this. Where are you calling updateBanner? So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir Cheers, -- Vincent
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
If you are getting 500 Internal Server Error there must be something wrong with the configuration of the server. It could be problems with a .htaccess file, but also all sorts of other problems. It is probably not directly related to ZF. You may be able to find more information in your servers error log. It generally sounds like you could benefit from going through a introduction to ZF to help you better understand the interaction between the different parts of the MVC. You could look at: http://akrabat.com/zend-framework-tutorial/ or http://blog.astrumfutura.com/ (down at the moment) Jacob Oettinger vladimirn wrote: Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir oetting wrote: Hi and welcome :) You will have to supply more details about your problem for anyone to be able to help. For instance what kind of error messages do you get? Jacob Oettinger vladimirn wrote: First of all i would like to say hello to all in here Tho, if i missed a topic, please move it onto the right place. Well, i got to make some changes on the web site which has been make with zend framework. So i am kinda noob on ZF But job must have be done. So i started to read tutorials and so on.. My task was to add some functionality on the existing web site. I did it on my localhost, and everything is just fine. But, when i upload files to the web server, it wont work. What could be possibly reason? Or reasons? Any ideas? Where to look into? Thanks a lot in advance, Vladimir -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272647.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
Hello Vincent :) Web site is live and working on web server. if($this-Banner-update()) is called in BannerController.php (currently on webserver is: require_once('Banner.php'); if(Banner::update())) .htaccess is identical on localhost and web server. I got it from web server when got this project. And it is working on my localhost. also i noticed that when i am calling method like: $this-update('some sql statement') - which is in original file(popular.php - model) i remake for banners, i am getting error 500. If i use $this-db-update('some sql statement') it works fine. Is there a possibility that problem is caused by version of FW? i am not sure what version i have on my computer. It could be ZF1.5, but not sure and dont know how to check. On web server i think that this is ZF 1.01. Also, there is a folder inside every subfolder on web site which is called .svn. I dont know what is this for. :) Sorry if i am bothering with my problem, just i dont know from where to start to solve it . @Jacob- i already read acrabat and all tutorial from acrabat web site, but couldnt figure it out.. :( Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Has it worked before on the live server? If not, are you sure the rewrite rules are correct? Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) Sorry, I can't follow this. Where are you calling updateBanner? So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir Cheers, -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272949.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Vincent :) Web site is live and working on web server. if($this-Banner-update()) is called in BannerController.php (currently on webserver is: require_once('Banner.php'); if(Banner::update())) But you said PHP said: no such method updateBanner updateBanner() is a different method than update(). .htaccess is identical on localhost and web server. I got it from web server when got this project. And it is working on my localhost. also i noticed that when i am calling method like: $this-update('some sql statement') - which is in original file(popular.php - model) i remake for banners, i am getting error 500. If i use $this-db-update('some sql statement') it works fine. Sorry, I don't use Zend_Db so I can't help you here... Is there a possibility that problem is caused by version of FW? i am not sure what version i have on my computer. It could be ZF1.5, but not sure and dont know how to check. On web server i think that this is ZF 1.01. Using different versions of ZF will very likely cause differences in behaviour, best to develop using the same version. The version can be checked by opening the file Zend/Version.php, the VERSION contant contains the version number. Also, there is a folder inside every subfolder on web site which is called .svn. I dont know what is this for. :) The .svn folders are metadata for Subversion, a Version Control System. Apparently this website is managed using Subversion, so it's a little bit odd that you're not using it yourself. Sorry if i am bothering with my problem, just i dont know from where to start to solve it . @Jacob- i already read acrabat and all tutorial from acrabat web site, but couldnt figure it out.. :( Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Has it worked before on the live server? If not, are you sure the rewrite rules are correct? Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) Sorry, I can't follow this. Where are you calling updateBanner? So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir Cheers, -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272949.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Vincent
[fw-general] Route with variable parameters
Hello, I am trying to create a route to parse URL's like this: /:text/:page/:lang/:param1/:val1/:param2/:val2/:param3/:val3/:param4/:val4/:param5/:val5.. I have some problems: 1. How can i write the route to allow a potential unlimited number of parameters 2. How can i write the route to have parameters mixed in any order, except the first 3 params which are going to be fixed as position 3. How i can do to get from request params as getParam('param5') and to get 'value5' ? Thanks for replies. Cristian
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Vincent :) Web site is live and working on web server. if($this-Banner-update()) is called in BannerController.php (currently on webserver is: require_once('Banner.php'); if(Banner::update())) But you said PHP said: no such method updateBanner updateBanner() is a different method than update(). .htaccess is identical on localhost and web server. I got it from web server when got this project. And it is working on my localhost. also i noticed that when i am calling method like: $this-update('some sql statement') - which is in original file(popular.php - model) i remake for banners, i am getting error 500. If i use $this-db-update('some sql statement') it works fine. Sorry, I don't use Zend_Db so I can't help you here... Is there a possibility that problem is caused by version of FW? i am not sure what version i have on my computer. It could be ZF1.5, but not sure and dont know how to check. On web server i think that this is ZF 1.01. Using different versions of ZF will very likely cause differences in behaviour, best to develop using the same version. The version can be checked by opening the file Zend/Version.php, the VERSION contant contains the version number. Also, there is a folder inside every subfolder on web site which is called .svn. I dont know what is this for. :) The .svn folders are metadata for Subversion, a Version Control System. Apparently this website is managed using Subversion, so it's a little bit odd that you're not using it yourself. Sorry if i am bothering with my problem, just i dont know from where to start to solve it . @Jacob- i already read acrabat and all tutorial from acrabat web site, but couldnt figure it out.. :( Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: Hello Jacob, thank you :) I will try to explain. I have admin part of site. In administration i added new functionality- adding new banners. I made a BannerController.php(controller), Banner.php(model), and following the example of guy who made whole application i made admin-index.phtml and admin-update.phtml in scripts/banner folder. When you click on link i made in administration- Manage index banner, on my localhost i am getting a page with form for new banner. And it is working. Also there is an index,phtml page where i am calling ?=$this-getActiveBanner()? at some point. And this works fine too on my localhost. But when i upload all on live site, clicking on Manage index banner not showing new form, but redirecting out of administration page, and display Error 500: Internal server error, please try again ... or some. :) If no ideas so far, i can post my methods, so you can take a look into it. I am most confusing about that its work on localhost and same files doesn't work on live server :) Has it worked before on the live server? If not, are you sure the rewrite rules are correct? Second question is: I used existing file which have very similar functionality. It displays data from other mysql table, but same methods are used. So i just copied existing files, and made a new one. Eg. file Popular.php and PopularController.php i renamed to Banner.php and BannerController.php, and changed protected _name='popular' to _name='banners'. Also changed some html code and when click on Manage index banner i was getting error: No cuch metod updateBanner. Code for that was: if($this-Banner-update()).. and then did: require_once('Banner.php'); if(Banner::update()) and then works :) Sorry, I can't follow this. Where are you calling updateBanner? So i am so confused and dont have any clues about all this :) Thank you one more time, Vladimir Cheers, -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17272949.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Vincent -- View this message in context:
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) So what does get_class($this-Banner) say? -- Vincent
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
curently i am not at this computer. I will reply in hour and half :) Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) So what does get_class($this-Banner) say? -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17273590.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Framework 1.5.2 is now available!
Hi, Empty your cache and try again. If that doesnt work, make sure youre not behind a proxy with its own caching. If that doesn't work: http://framework.zend.com/download zip: http://framework.zend.com/releases/ZendFramework-1.5.2/ZendFramework-1.5.2.zip tar.gz: http://framework.zend.com/releases/ZendFramework-1.5.2/ZendFramework-1.5.2.tar.gz Cheers, Johannes 2008/5/16, Shekar C Reddy [EMAIL PROTECTED]: As of now, I still can't find v1.5.2 for download. Does it take time to update the site with the new download? Thanks, On Thu, May 15, 2008 at 4:29 PM, Wil Sinclair [EMAIL PROTECTED] wrote: Hi all, It is our pleasure to announce the release of Zend Framework 1.5.2! You can download this new mini release from the ZF download site: http://framework.zend.com/download A list of all issues resolved in this release can be found at: http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10 743 We couldn't have put this release together without the help of our generous Zend Framework community, so we here at Zend once again extend our thanks to everyone who contributed their time and effort to bring you the 1.5.2 release! ,Wil
Re: [fw-general] Route with variable parameters
I have some problems: 1. How can i write the route to allow a potential unlimited number of parameters IIRC this would be /:text/:page/:lang/* Thanks, What kind of Route is this ? Regex or Static ? Cristian
Re: [fw-general] Route with variable parameters
On Fri, May 16, 2008 at 2:58 PM, Cristian Bichis [EMAIL PROTECTED] wrote: I have some problems: 1. How can i write the route to allow a potential unlimited number of parameters IIRC this would be /:text/:page/:lang/* Thanks, What kind of Route is this ? Regex or Static ? Just the standard Zend_Controller_Router_Route, see http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.standard Route definition can contain one more special character - a wildcard - represented by '*' symbol. It is used to gather parameters similarly to the default Module route (var = value pairs defined in the URI). The following route more-or-less mimics the Module route behavior: ?php $route = new Zend_Controller_Router_Route( ':module/:controller/:action/*', array('module' = 'default') ); $router-addRoute('default', $route); Cristian -- Vincent
Re: [fw-general] Zend Framework 1.5.2 is now available!
On Thu, May 15, 2008 at 11:29 PM, Wil Sinclair [EMAIL PROTECTED] wrote: Hi all, It is our pleasure to announce the release of Zend Framework 1.5.2! You can download this new mini release from the ZF download site: http://framework.zend.com/download A list of all issues resolved in this release can be found at: http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10 743 We couldn't have put this release together without the help of our generous Zend Framework community, so we here at Zend once again extend our thanks to everyone who contributed their time and effort to bring you the 1.5.2 release! ,Wil I would like to thank you and the whole ZF Team for the very good work you are doing to provide and ensure this high quality framework!! THANK You ZF Team. ;-)
Re: [fw-general] Zend Loader performance - benchmark
-- Keith Pope [EMAIL PROTECTED] wrote (on Friday, 16 May 2008, 08:23 AM +0100): Thx for the benchmarks :) I think there where earlier discussions on this and the ZF team are working on their own set of benchmarks, it will be interesting to see how all this compares. Just for reference, Keith, Stas is a Zend employee, and is helping develop those benchmarks. Consider this a preview. :-) Looks to me like the performance difference is pretty negligible for most developers to worry about :) Which is precisely the point I've been trying to get across. You're more likely going to notice performance degradation from database and web service access than from Zend_Loader. I was thinking about this after the earlier discussions and was wondering what people thought about phar? Would this improve performance if you really needed it? It may, it may not. I think when using the C extension (ext/phar), there is a good possibility it would increase performance, but in large part because _all_ files would be loaded on each request -- and the C extension interoperates with the opcode cache well. But packaging and deployment of phars is a whole other barrel of monkeys. -Original Message- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: 15 May 2008 23:56 To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend Loader performance - benchmark Hi! I've run a benchmark loading 725 framework class files on 5.2 and 5.3 with and without bytecode caching. The benchmark uses list of 725 Framework classes and loads them one by one, via require_once and via Zend_Loader::loadClass. You can see the files here: http://random-bits-of.info/fw-tests/ OK, so here's the results: Without bytecode cache: require_once Zend_Loader php5.24.42 4.42 php5.34.96 4.97 With bytecode cache: require_once Zend_Loader php5.263.04 56.62 php5.361.28 55.52 Numbers are requests per second (more is better). Bytecode cache used in the benchmark is Zend's one, not APC. Conclusions from this would be: 0. It is *very* important to understand that it is a narrow-point benchmark that tests only one function in one specific way. Please do not draw conclusions on behavior of whole applications based only on this benchmark. 1. You *do* want to use bytecode caching. You won't get 15x performance on any real application, but it does speed up loading very significantly. 2. Without bytecode caching, it doesn't matter if you use require_once or Loader - both are equally slow :) 3. With bytecode caching, Loader has some overhead - explanation for this is that with file accesses eliminated, require_once of course has little left, while Loader still does a couple of function calls. But on real-life apps it'd probably be very small, provided that it's about 10% even on loading-only huge-class-list benchmark, and your application probably does something useful instead of loading 700+ framework classes :) 4. 5.3 is still a moving target, to don't put too much stake in current benchmark results for 5.3, they probably will be different by the time 5.3 is in release cycle (hopefully, better :) If you have more questions on this, please ask. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone, Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT Reg. No. 666 9148 88. Telephone: 0870 243 3434, Fax: 0870 243 6041. Website: www.allpay.net Email: [EMAIL PROTECTED] This email, and any files transmitted with it, is confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error please notify the allpay.net Information Security Manager at the number above. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Zend_XmlRpc_Server - performance (Zend_XmlRpc_Server_Cache)
-- David Goodwin [EMAIL PROTECTED] wrote (on Thursday, 15 May 2008, 10:43 PM +0100): I've written a (relatively) small Zend_XmlRpc_Server service and I'm pleased with the architecture of the code itself; however, I now need to see if I can boost performance. The documentation [1] covers how the server definition can be cached using Zend_XmlRpc_Server_Cache; unfortunately when I implemented this, calling 1000 method calls goes from taking 1 minute 40s to 2m 40 seconds. Hardly a performance improvement! Has anyone else here used the Zend_XmlRpc_Server_Cache functionality, and/or have any numbers to report back re before and after implementing it? Unfortunately, the server cache does not do what I intended it to when I originally coded it. The problem with performance is due to the fact that it must both re-instantiate objects as well as perform reflection on all of them -- but in reverse order (reflection objects are what are cached). I would like to address this in the future; would you be willing to put an issue in the tracker, so it doesn't get lost, but also so that I can ping you about testing? In the meantime, you have a couple of options: * First, don't use the server cache * Make sure you *are* using an opcode cache * Consider setting up functionality to cache read-only methods, so that the XML-RPC server can be bypassed entirely for such calls. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
[fw-general] Add functions to Zend_Form_Element
Hello, I've tried to extend Zend_Form_Element without success. I want to add some functions like class Form_Element extends Zend_Form_Element { protected $_unit = ''; protected $_elementId; /** * Set element unit * * @param string $unit * @return void */ public function setUnit($unit) { $this-_unit = (string) $unit; } /** * Retrieve element unit * * @return string */ public function getUnit() { return $this-_unit; } /** * Set element id * * @param integer $elementId * @return void */ public function setElementId($elementId) { $this-_elementId = (string) $elementId; } /** * Retrieve element id * * @return integer */ public function getElementId() { return $this-_elementId; } } With those functions I can access the given unit in the decorator with $this-element-getUnit(), that's what I'm trying to achiv. But unfortunately I just can't find a smooth way to do it properly. When I use $form-addPrefixPath it would work, but only if I redefine all Zend_Form_Element_* elements. By the way: My current quick and dirty solutions is to extend Zend_Form_Element: class Zend_Form_Element extends Form_Element implements Zend_Validate_Interface {} But this way I would have to update this file every time I'll do a SVN Update of the framework... Any solutions or suggestions? Thanks in advance. -- View this message in context: http://www.nabble.com/Add-functions-to-Zend_Form_Element-tp17275549p17275549.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Form Date input
Hi, I'm trying to figure out the easiest way of creating a date input structure to use in my Zend_Forms. Something that will allow the user to select a day, month and year. I can see this becoming a monster if I have to do it using three Zend_Form_Element_Select for every date input as I have multiple dates that need entering in my form. This would mean a huge Zend_Form class which I think may be a bit of overkill. Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Thanks for any help, Chris
Re: [fw-general] Zend_XmlRpc_Server - performance (Zend_XmlRpc_Server_Cache)
snip Unfortunately, the server cache does not do what I intended it to when I originally coded it. The problem with performance is due to the fact that it must both re-instantiate objects as well as perform reflection on all of them -- but in reverse order (reflection objects are what are cached). I would like to address this in the future; would you be willing to put an issue in the tracker, so it doesn't get lost, but also so that I can ping you about testing? In the meantime, you have a couple of options: * First, don't use the server cache OK. * Make sure you *are* using an opcode cache Yes, APC. * Consider setting up functionality to cache read-only methods, so that the XML-RPC server can be bypassed entirely for such calls. Not possible in this instance, it's data driven. Will create the issue shortly, thanks David. -- David Goodwin Pale Purple Limited Office: 0845 0046746 Mobile: 07792380669 http://www.palepurple.co.ukCompany No: 5580814 'Business Web Application Development and Training in PHP'
Re: [fw-general] Zend_Form Date input
In order to achieve this I've created a Form_Element called DateCombo. This one is associated with a View_Helper called FormDateCombo that renders the 3 selects automatically. If the element is called birthdate, the 3 selects are called birthdate_day, birthdate_month and birthdate_year inside and rendered with these names. In order to do a proper checking you will need to extend the isValid method to make the $value var to be an array of 3 values (year, month and day) and you'll need a DateCombo Validator too. You will find a good example at http://prototype.xaviervidal.net It's a class extending Zend_Form that is able to render with Jquery the error messages On Fri, May 16, 2008 at 4:17 PM, Chris MacPherson [EMAIL PROTECTED] wrote: Hi, I'm trying to figure out the easiest way of creating a date input structure to use in my Zend_Forms. Something that will allow the user to select a day, month and year. I can see this becoming a monster if I have to do it using three Zend_Form_Element_Select for every date input as I have multiple dates that need entering in my form. This would mean a huge Zend_Form class which I think may be a bit of overkill. Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Thanks for any help, Chris -- Xavier Vidal Piera Enginyer Tècnic Informàtic de Gestió Tècnic Especialista Informàtic d'equips [EMAIL PROTECTED] [EMAIL PROTECTED] http://web.xaviervidal.net 610.68.41.78
Re: [fw-general] Zend_Form Date input
On 16 May 2008, at 15:17, Chris MacPherson wrote: Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Several widget projects have good date selectors - take a look at dojo. I also like Zapatec's calendar as it's the only one I've found that lets you pick date and time together and display more than one month. As far as your form goes, they pop a correctly formatted date into a text or hidden field. Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ UK resellers of [EMAIL PROTECTED] CRM solutions [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ smime.p7s Description: S/MIME cryptographic signature
Re: [fw-general] Zend_Form Date input
-- Chris MacPherson [EMAIL PROTECTED] wrote (on Friday, 16 May 2008, 03:17 PM +0100): I'm trying to figure out the easiest way of creating a date input structure to use in my Zend_Forms. Something that will allow the user to select a day, month and year. I can see this becoming a monster if I have to do it using three Zend_Form_Element_Select for every date input as I have multiple dates that need entering in my form. This would mean a huge Zend_Form class which I think may be a bit of overkill. Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Zend_Validate_Date takes a standard input format (/MM/DD, iirc)... but this isn't a good UI. :-) A number of JS libraries allow you to decorate an element as a date picker - I've seen such things in Dojo and YUI, for instance. This might be a simple, viable option that would allow you to use a standard Zend_Form_Element_Text element with the Date validator. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Zend_Form Date input
That also sounds like a good idea, a lot less work than extending the form element probably. I'' check these both out too. Thanks Marcus. Marcus Bointon wrote: On 16 May 2008, at 15:17, Chris MacPherson wrote: Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Several widget projects have good date selectors - take a look at dojo. I also like Zapatec's calendar as it's the only one I've found that lets you pick date and time together and display more than one month. As far as your form goes, they pop a correctly formatted date into a text or hidden field. Marcus
RE: [fw-general] Zend_Form Date input
How about datepicker from jquery.ui, I thought it's the simplest way. Just set id on element text, and one line script on header then finish. Rgds, bn -Original Message- From: Chris MacPherson [mailto:[EMAIL PROTECTED] Sent: Friday, May 16, 2008 9:48 PM To: Marcus Bointon Cc: fw-general@lists.zend.com Subject: Re: [fw-general] Zend_Form Date input That also sounds like a good idea, a lot less work than extending the form element probably. I'' check these both out too. Thanks Marcus. Marcus Bointon wrote: On 16 May 2008, at 15:17, Chris MacPherson wrote: Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Several widget projects have good date selectors - take a look at dojo. I also like Zapatec's calendar as it's the only one I've found that lets you pick date and time together and display more than one month. As far as your form goes, they pop a correctly formatted date into a text or hidden field. Marcus
Re: [fw-general] Zend_Form Date input
http://marcgrabanski.com/code/ui-datepicker/ I actually used this with Zend_Form. It is easy to integrate and comes under MIT license. It has many language files and works very nice. Colors can be customized. Bart Chris MacPherson schreef: That also sounds like a good idea, a lot less work than extending the form element probably. I'' check these both out too. Thanks Marcus. Marcus Bointon wrote: On 16 May 2008, at 15:17, Chris MacPherson wrote: Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Several widget projects have good date selectors - take a look at dojo. I also like Zapatec's calendar as it's the only one I've found that lets you pick date and time together and display more than one month. As far as your form goes, they pop a correctly formatted date into a text or hidden field. Marcus -- Bart McLeod Space Web Internet Team Middenlaan 47 6865 VN Heveadorp The Netherlands t +31(0)26 3392952 m 06 51 51 89 71 @ [EMAIL PROTECTED] www.spaceweb.nl Bart McLeod is a Zend Certified Engineer. Click to verify!
Re: [fw-general] Zend_Form Date input
it is the same one as Bagus recommends by the way... Bart McLeod schreef: http://marcgrabanski.com/code/ui-datepicker/ I actually used this with Zend_Form. It is easy to integrate and comes under MIT license. It has many language files and works very nice. Colors can be customized. Bart Chris MacPherson schreef: That also sounds like a good idea, a lot less work than extending the form element probably. I'' check these both out too. Thanks Marcus. Marcus Bointon wrote: On 16 May 2008, at 15:17, Chris MacPherson wrote: Has anyone covered this ground before at all? Or have any ideas or pointers that I can check out. Several widget projects have good date selectors - take a look at dojo. I also like Zapatec's calendar as it's the only one I've found that lets you pick date and time together and display more than one month. As far as your form goes, they pop a correctly formatted date into a text or hidden field. Marcus -- Bart McLeod Space Web Internet Team Middenlaan 47 6865 VN Heveadorp The Netherlands t +31(0)26 3392952 m 06 51 51 89 71 @ [EMAIL PROTECTED] www.spaceweb.nl Bart McLeod is a Zend Certified Engineer. Click to verify! -- Bart McLeod Space Web Internet Team Middenlaan 47 6865 VN Heveadorp The Netherlands t +31(0)26 3392952 m 06 51 51 89 71 @ [EMAIL PROTECTED] www.spaceweb.nl Bart McLeod is a Zend Certified Engineer. Click to verify!
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
BannersController.php - my version of existing method [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = Banners::getBanners(); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] if i use $this-view-data = $this-Banners-getBanners(); i am getting: Fatal error: Call to a member function getBanners() on a non-object in C:\wamp\www\dev\application\controllers\BannersController.php on line 30 This works just fine on $this-Populars-getPopulars Existing method i got from Populars.php [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = $this-Populars-getPopulars(false); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] This is how i remake original method public function getBanners() { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-db-fetchAll('select * from banners'); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Banners'] = $row; $idx++; } return $ar_res; } Original method was: public function getPopulars($online_only = true) { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-fetchAll($where, $this-getOrder()); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Populars'] = $row-toArray(); $idx++; } return $ar_res; } On my local mashine: When i am using original method, i am redirected to public area of site and getting this: Internal server error Error An error occurred, please try again later. if i am using first method i rewrote, everything is working on local machine, but not on the live site. Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) So what does get_class($this-Banner) say? -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17277324.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
On Fri, May 16, 2008 at 5:21 PM, vladimirn [EMAIL PROTECTED] wrote: BannersController.php - my version of existing method [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = Banners::getBanners(); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] if i use $this-view-data = $this-Banners-getBanners(); i am getting: Fatal error: Call to a member function getBanners() on a non-object in C:\wamp\www\dev\application\controllers\BannersController.php on line 30 So $this-Banners is not an object. Perhaps in the PopularController's init() method $this-Populars is defined? You'll probably need to do something similar in the BannersController, i.e. $this-Banners = new Banners(). This works just fine on $this-Populars-getPopulars Existing method i got from Populars.php [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = $this-Populars-getPopulars(false); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] This is how i remake original method public function getBanners() { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-db-fetchAll('select * from banners'); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Banners'] = $row; $idx++; } return $ar_res; } Original method was: public function getPopulars($online_only = true) { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-fetchAll($where, $this-getOrder()); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Populars'] = $row-toArray(); $idx++; } return $ar_res; } On my local mashine: When i am using original method, i am redirected to public area of site and getting this: Internal server error Error An error occurred, please try again later. if i am using first method i rewrote, everything is working on local machine, but not on the live site. Could you post your .htaccess? Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) So what does get_class($this-Banner) say? -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17277324.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Vincent
Re: [fw-general] SVN Repository Reorganization
Hello again, So far I've seen some very helpful feedback on the proposed SVN repository reorganization. Thank you to everyone who has posted so far! :) For those of you that haven't commented yet, however, please review and post your thoughts. I'm thinking that we'll stop collecting feedback on Monday, so please post your feedback by the end of Monday if at all possible. Thanks again! :) Best regards, Darby Darby Felton wrote: Hi all, In order to prepare the framework SVN repository for accommodating the upcoming distinction between standard and extras components, and to consolidate the currently separate laboratory repository, we have prepared a proposed SVN structure for your review. And yes, this means you. :) We are particularly interested in receiving feedback from both ZF users and ZF developers regarding this reorganization, and you can help by taking a look and commenting on the following wiki page: http://framework.zend.com/wiki/x/sAEa Please let us know if you see any glaring oversights or even if you just see a little room for improvement - your feedback would be sincerely appreciated. If you don't have wiki commenting privileges, please send an e-mail (from the address associated with your JIRA/Confluence account) to [EMAIL PROTECTED] and ask for posting privileges. :) Thanks in advance for your feedback! Best regards, Darby
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
this is what i tought :) but BannersController and PopularController have same methods. This is init() public function init() { parent::init(); require_once 'Zend/Filter.php'; // load filters require_once 'Zend/Filter/StripTags.php'; //require_once 'Zend/Filter/HtmlEntities.php'; require_once 'lib/Zend/Filter/StripSlashes.php'; $this-filters = new Zend_Filter(); //$this-filters-addFilter(new Zend_Filter_StripTags()) //-addFilter(new Zend_Filter_HtmlEntities()) $this-filters-addFilter(new Zend_Filter_StripSlashes()); } Vincent-20 wrote: On Fri, May 16, 2008 at 5:21 PM, vladimirn [EMAIL PROTECTED] wrote: BannersController.php - my version of existing method [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = Banners::getBanners(); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] if i use $this-view-data = $this-Banners-getBanners(); i am getting: Fatal error: Call to a member function getBanners() on a non-object in C:\wamp\www\dev\application\controllers\BannersController.php on line 30 So $this-Banners is not an object. Perhaps in the PopularController's init() method $this-Populars is defined? You'll probably need to do something similar in the BannersController, i.e. $this-Banners = new Banners(). This works just fine on $this-Populars-getPopulars Existing method i got from Populars.php [code] public function adminIndexAction() { if (!$this-is_admin()) $this-_redirect(/admin/login); $this-view-status_list = array('1' = 'online', '0'= 'offline'); $this-view-data = $this-Populars-getPopulars(false); $this-view-messages = $this-_flashMessenger-getMessages(); } [/code] This is how i remake original method public function getBanners() { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-db-fetchAll('select * from banners'); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Banners'] = $row; $idx++; } return $ar_res; } Original method was: public function getPopulars($online_only = true) { $where = null; if ($online_only) $where = 'status = 1'; $rowset = $this-fetchAll($where, $this-getOrder()); if (is_null($rowset)) return array(); $idx = 0; foreach ($rowset as $row){ $ar_res[$idx]['Populars'] = $row-toArray(); $idx++; } return $ar_res; } On my local mashine: When i am using original method, i am redirected to public area of site and getting this: Internal server error Error An error occurred, please try again later. if i am using first method i rewrote, everything is working on local machine, but not on the live site. Could you post your .htaccess? Vincent-20 wrote: On 5/16/08, vladimirn [EMAIL PROTECTED] wrote: I misstyped what php said :) actually PHP said that method does not exist, and i know that method exist. But when i include file Banner.php which contain that method, and change in code from $this-Banner-update to Banner::update() then works fine. Original file(which i remake to make banner part) works fine with $this-Popular-update()... Also after changes i made, i moved completly folder structure from my localhost back to web, changing only database data in config.php and everything working but banners :) I like zend framework and what ZF offer, but it is so confusing sometimes :) I am not using SVn cause i cant figure it out how to use it. I read on svn web site but still dont get it. And it was already on web site i got to adjust. Thank you very much for your reply :) So what does get_class($this-Banner) say? -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17277324.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Vincent -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17278467.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
On Fri, May 16, 2008 at 6:08 PM, vladimirn [EMAIL PROTECTED] wrote: this is what i tought :) but BannersController and PopularController have same methods. This is init() public function init() { parent::init(); require_once 'Zend/Filter.php'; // load filters require_once 'Zend/Filter/StripTags.php'; //require_once 'Zend/Filter/HtmlEntities.php'; require_once 'lib/Zend/Filter/StripSlashes.php'; $this-filters = new Zend_Filter(); //$this-filters-addFilter(new Zend_Filter_StripTags()) //-addFilter(new Zend_Filter_HtmlEntities()) $this-filters-addFilter(new Zend_Filter_StripSlashes()); } So where does the PopularController define $this-Populars? And what does var_dump($this-Banners) in BannerController say? -- Vincent
[fw-general] Zend_Db in ZFW 1.5 requires hostname?
I'm running into a bit of a two part issue with Zend_Db. The issue is this: initially, we used ZFW 1.0 for different sites. Zend_Db_Adapter_Pdo_Oci created Oracle DSNs using the old format: dsn://host:port/dbname. This works just fine with: dsn://dbname In ZFW 1.5, that took a 180 and used a TNS Address format: dbname=(DESCRIPTION=(ADDRSES_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port)(CONNECT_DATA=(SID=dbname))) Well ... there's a slight issue here. With our config file, we never supplied the hostname. However, in 1.5, if we don't supply the hostname name, I get the error: exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000]: pdo_oci_handle_factory: ORA-12533: TNS:illegal ADDRESS parameters (/usr/src/php-5.2.4/ext/pdo_oci/oci_driver.c:513) DNS: oci:dbname=(DESCRIPTION=(CONNECT_DATA=(SID=dbname))) But, if I add the hostname/port to the config file, the 1.0 code then errors out with TNS Timeout errors... A bit of a quandry here. The two code bases are not compatiable. One requires hostname:port and the other will not work if I specify it. Any suggestions on how to fix this? They both use the same config file. The TNS file works file, or else the dsn://dbname wouldn't never work. However, the optional dbname seems to break PDO in ZFW 1.5. I did a google on the error and everybody suggested the same thing: supply the hostname. Which then ends up negating the whole purpose of a TNS names file. And by-passing that file is a bad idea. -- Philip [EMAIL PROTECTED] http://www.gpcentre.net/
[fw-general] Re: Zend_Db_Table_Abstract::insert() issue
Ah ha. Thanks for the insight. I missed that variable. Setting it to 2 worked. Thanks! (PS: Replied to list for archive purposes). Philip On Fri, May 16, 2008 at 12:56 PM, [EMAIL PROTECTED] wrote: That comment is no longer true (and should probably be removed). Read the comment for the Zend_Db_Table_Abstract class variable $_identity. http://framework.zend.com/apidoc/core/Zend_Db/Table/Zend_Db_Table_Abstract.html#$_identity -Bill Karwin Philip G wrote: I'm looking in the comments here and I ran into a problem: /** * Zend_Db_Table assumes that if you have a compound primary key * and one of the columns in the key uses a sequence, * it's the _first_ column in the compound key. */ According to this, it assumes the first key in a compound key is the sequence. Err, that's not true. Is there anyway to overwrite this assumption? We have tons of tables with quite complex cascading keys (some cases, 5 columns) and the sequence key is often the find column in the list. I'm running into an issue right now where we have one table with a two column compound key. The first column is a static number (related to our client numbers) and the second column is the sequence number. When I do an insert() it returns only the first column. This is against an Oracle DB, with a trigger on insert to mimic auto_increment (although, it's a sequence). I've tried setting the sequence to the sequence name and just leaving the default. Both cases, I only get 1 key of the compound PK back. I think it's related to the above column. Are there any hooks within Zend_Db_Table_Abstract I can use to overwrite this default / assumed behavior? -- Philip [EMAIL PROTECTED] http://www.gpcentre.net/ Quoted from: http://www.nabble.com/Zend_Db_Table_Abstract%3A%3Ainsert%28%29-issue-tp17278927p17278927.html -- Philip [EMAIL PROTECTED] http://www.gpcentre.net/
Re: [fw-general] noob problem - ZF works on localhost but not on webserver
Hello, i would like to thanks to Vincent and Jacob for their eforts to help me solve this. With their help i found what causes the problem. If i am calling: $rowset = $this-fetchAll($where, $this-getOrder()); in Banners.php this aint work. also above part of code is working in other model files... $rowset = $this-db-fetchAll(''select * from banners'); works for Banner.php any ideas? :) vladimirn wrote: First of all i would like to say hello to all in here Tho, if i missed a topic, please move it onto the right place. Well, i got to make some changes on the web site which has been make with zend framework. So i am kinda noob on ZF But job must have be done. So i started to read tutorials and so on.. My task was to add some functionality on the existing web site. I did it on my localhost, and everything is just fine. But, when i upload files to the web server, it wont work. What could be possibly reason? Or reasons? Any ideas? Where to look into? Thanks a lot in advance, Vladimir -- View this message in context: http://www.nabble.com/noob-problem---ZF-works-on-localhost-but-not-on-webserver-tp17272058p17282216.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Paginator... when?
Off the record, approximately when is Zend_Paginator expected to make its debut? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness
[fw-general] Re: Zend_Paginator... when?
I guess I meant Zend_Paginate (not Paginator), as in http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 On Fri, May 16, 2008 at 3:55 PM, David Mintz [EMAIL PROTECTED] wrote: Off the record, approximately when is Zend_Paginator expected to make its debut? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness
Re: [fw-general] Zend_Paginator... when?
-- David Mintz [EMAIL PROTECTED] wrote (on Friday, 16 May 2008, 03:55 PM -0400): Off the record, approximately when is Zend_Paginator expected to make its debut? We reviewed the proposal this week; once the proposal space is updated and the new SVN layout approved, we can post our official comments _and_ provide access for development of new components. You should be seeing activity in the coming week. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Re: Zend_Paginator... when?
Hi David, Sorry I can't be more specific, but Zend_Paginate should come to fruition quite soon. We're nearly ready to implement our new proposal process, after which time the proposal can move forward so that commits may begin. I have already reviewed it, and I estimate the likelihood of its approval to be roughly 99.999%. :) Many thanks to Jurriën Stutterheim and Matthew Ratzloff for moving this forward, and I also look forward to this component as part of Zend Framework! Best regards, Darby David Mintz wrote: I guess I meant Zend_Paginate (not Paginator), as in http://framework.zend.com/wiki/pages/viewpage.action?pageId=43560 On Fri, May 16, 2008 at 3:55 PM, David Mintz [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Off the record, approximately when is Zend_Paginator expected to make its debut? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness
Re: [fw-general] Zend Loader performance - benchmark
Hi! I was thinking about this after the earlier discussions and was wondering what people thought about phar? Would this improve performance if you really needed it? phar is a bit more complicated story... We'll be doing some work on performance-testing phar too, but that'll take some time. From what I understand, phar just stabilized and acquired the features it needed to be able to run with frameworks like ZF, and I'm not sure yet how bytecode caching solutions work with it. But we definitely intend to address this topic, now that phar looks like it's ready for the prime time. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED]
Re: [fw-general] Zend_XmlRpc_Server - performance (Zend_XmlRpc_Server_Cache)
snip I would like to address this in the future; would you be willing to put an issue in the tracker, so it doesn't get lost, but also so that I can ping you about testing? See http://framework.zend.com/issues/browse/ZF-3280 thanks David. -- David Goodwin Pale Purple Limited Office: 0845 0046746 Mobile: 07792380669 http://www.palepurple.co.ukCompany No: 5580814 'Business Web Application Development and Training in PHP'
RE: [fw-general] ACL Roles / Resources
Hi, I don't know if my simple tutorial will help: http://framework.zend.com/wiki/display/ZFUSER/Using+Zend_Acl+with+a+database +backend - Robert -Original Message- From: Joseph Crawford [mailto:[EMAIL PROTECTED] Sent: 15 May 2008 21:33 To: fw-general@lists.zend.com Subject: [fw-general] ACL Roles / Resources The Reference manual is a bit daunting when it comes to how to implement this. I understand how to use the stuff based on the examples the question I have is where all this goes. Is this put in the bootstrap file? Does each controller need to have the ACL defined in there? The reason I ask is because I might have these actions for a blog (view, edit, delete, approve) but I might also have those actions for blog comments. I might not want a user who has full privileges for the blog to be able to do anything on the blog comments. Anyone know of a good tutorial / walkthrough that will show me these things and hopefully answer these questions? Thanks, Joseph Crawford This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
Re: [fw-general] Zend_Paginator... when?
Hi David, Jurriën and I currently hope to have Zend_Paginate ready for Zend Framework 1.6. -Matt On Fri, May 16, 2008 at 12:55 PM, David Mintz [EMAIL PROTECTED] wrote: Off the record, approximately when is Zend_Paginator expected to make its debut? -- David Mintz http://davidmintz.org/ The subtle source is clear and bright The tributary streams flow through the darkness