Re: [fw-general] PHPUnit and ZF
2008/11/24 CatharsisJelly [EMAIL PROTECTED] No errors, no tests.. nothing. Now I'm not sure if this is the fault of PHP, ZF or PHPUnit but it took me half a day to find it. As a warning any other coder that if this is happening to you you should check to see if you have a syntax error in your code somewhere. I remember a similar case where the class file was included with the @ error suppression character. Zend_Loader uses it a lot, so probably the error message vanish. -- Giorgio Sironi Piccolo Principe Ossigeno Scripter http://www.sourceforge.net/projects/ossigeno
Re: [fw-general] Zend_Mail - to long subject -- Outlook puts '= ' in subject
I have this same problem with ZF 1.6.1. My mail server is Exchange and long subjects work fine using PHP's mail() function, but not using Zend_Mail. It seems that the problem lays in Zend_Mail-_encodeHeader() method. This is the code used to replicate the issue: // Works $subject = '¿Tu sueldo es justo? a que no... entonces entra a Trabajar.com y búscate un curro donde te paguen muuuchísima pasta!'; mail('[EMAIL PROTECTED]', $subject, 'Test'); // Does not work as expected $transport = new Zend_Mail_Transport_Smtp(); $mail = new Zend_Mail('utf-8'); $mail-setBodyText('Qué largo este asunto, no?'); $mail-setFrom('[EMAIL PROTECTED]', 'CuantoGanas.com'); $mail-setSubject($subject); // The same long line as above $mail-setReturnPath('[EMAIL PROTECTED]'); $mail-addTo('[EMAIL PROTECTED]'); $mail-send($transport); Thanks! Matthew Weier O'Phinney-3 wrote: -- froesi [EMAIL PROTECTED] wrote (on Monday, 01 October 2007, 08:03 AM -0700): I updated to newest ZF version. Still the same problem. I am not using SMTP. Try using it via the SMTP transport, and see if that works. Matthew Weier O'Phinney-3 wrote: -- froesi [EMAIL PROTECTED] wrote (on Monday, 01 October 2007, 06:27 AM -0700): I send a mail via $mail = new Zend_Mail; I need a long subject. The problem is, that Outlook won't correctly paste the linebreaks together again. So in a long subject stands an = at the position, where the linebreak was. Example: Here I write an entry in the Zend Framework Community Bo= ard does anybody has an idea? None. I just did a subject of 138 characters and sent via SMTP through our exchange server, and had no issues. -- 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_Mail---to-long-subjectOutlook-puts-%27%3D-%27-in-subject-tp12979214p20678275.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZF Memory usage
Hello, I recently deployed a ZF based site and have been experiencing memory issues on the server. This isn't to say the problem is with ZF, but I really wanted to ask other people's experiences in a number of areas. Host: Media Temple DV (dedicated virtual) Memory: 256mb Issues: frequent memory overages (more than once a day), reported as black level kmemsize QoS alerts in the Plesk control panel. I have APC enabled. It shows about 7mb of 32mb allocated memory used. I've set apc.stat to 0. I added a memory_get_usage(true) to my bootstrap, and with APC it comes out at about 1.75mb per page (much higher without). Page serve times are in the 0.7 range. I don't think the site is getting particularly high traffic, and I experienced some kmemsize issues even before launch. There are no other sites running on that hosting atm, and I'm pretty sure mail use is low. I've been following the server with top as much as possible, apache httpd process instances are showing 2.5% memory use. On average the mem usage is showing : siMem:689496k total, 311772k used, 377724k free. The mysqld process shows 3.2% overall mem usage . load averages are like: 0.08, 0.06, 0.01. I'm really stumped as to what to try. Is there any way of knowing what scripts were running when the memory ran out? As for improving performance I could implement some aggressive caching techniques, but before that I wanted to know what other peoples ZF apps look like in terms of memory usage. What is a typical ZF website memory footprint? Many thanks if you have any suggestions, even if it's just for further testing. -- View this message in context: http://www.nabble.com/ZF---Memory-usage-tp20678541p20678541.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Mail - to long subject -- Outlook puts '= ' in subject
I just checked further into the framework and saw that Zend_Mail sends the header to Zend_Mime, then Zend_Mime has a 74 character limit on line length. That's ok because RFC 2822 recommends a maximum header length of 78 characters, but I think that the line should be cut to comply with that, instead of replacing its contents with encoded characters. Maybe I'm lacking a lot of background in the Mime/Encoding topic, but in terms of usability I think it would be easier if the line is cut. Mauricio Cuenca wrote: I have this same problem with ZF 1.6.1. My mail server is Exchange and long subjects work fine using PHP's mail() function, but not using Zend_Mail. It seems that the problem lays in Zend_Mail-_encodeHeader() method. This is the code used to replicate the issue: // Works $subject = '¿Tu sueldo es justo? a que no... entonces entra a Trabajar.com y búscate un curro donde te paguen muuuchísima pasta!'; mail('[EMAIL PROTECTED]', $subject, 'Test'); // Does not work as expected $transport = new Zend_Mail_Transport_Smtp(); $mail = new Zend_Mail('utf-8'); $mail-setBodyText('Qué largo este asunto, no?'); $mail-setFrom('[EMAIL PROTECTED]', 'CuantoGanas.com'); $mail-setSubject($subject); // The same long line as above $mail-setReturnPath('[EMAIL PROTECTED]'); $mail-addTo('[EMAIL PROTECTED]'); $mail-send($transport); Thanks! Matthew Weier O'Phinney-3 wrote: -- froesi [EMAIL PROTECTED] wrote (on Monday, 01 October 2007, 08:03 AM -0700): I updated to newest ZF version. Still the same problem. I am not using SMTP. Try using it via the SMTP transport, and see if that works. Matthew Weier O'Phinney-3 wrote: -- froesi [EMAIL PROTECTED] wrote (on Monday, 01 October 2007, 06:27 AM -0700): I send a mail via $mail = new Zend_Mail; I need a long subject. The problem is, that Outlook won't correctly paste the linebreaks together again. So in a long subject stands an = at the position, where the linebreak was. Example: Here I write an entry in the Zend Framework Community Bo= ard does anybody has an idea? None. I just did a subject of 138 characters and sent via SMTP through our exchange server, and had no issues. -- 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_Mail---to-long-subjectOutlook-puts-%27%3D-%27-in-subject-tp12979214p20678591.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZF Memory usage
Have you tired any of the performance tips in the manual http://framework.zend.com/manual/en/performance.html Also have you tried debugging locally using Xdebug profiling, I use this regularly to catch bottlenecks. Another one to check is if you are using Zend_Db_Table etc that you are not getting too bigger resultsets, you can easily run out of memory of you retrieve large data sets using db_table. 2008/11/25 mothmenace [EMAIL PROTECTED]: Hello, I recently deployed a ZF based site and have been experiencing memory issues on the server. This isn't to say the problem is with ZF, but I really wanted to ask other people's experiences in a number of areas. Host: Media Temple DV (dedicated virtual) Memory: 256mb Issues: frequent memory overages (more than once a day), reported as black level kmemsize QoS alerts in the Plesk control panel. I have APC enabled. It shows about 7mb of 32mb allocated memory used. I've set apc.stat to 0. I added a memory_get_usage(true) to my bootstrap, and with APC it comes out at about 1.75mb per page (much higher without). Page serve times are in the 0.7 range. I don't think the site is getting particularly high traffic, and I experienced some kmemsize issues even before launch. There are no other sites running on that hosting atm, and I'm pretty sure mail use is low. I've been following the server with top as much as possible, apache httpd process instances are showing 2.5% memory use. On average the mem usage is showing : siMem:689496k total, 311772k used, 377724k free. The mysqld process shows 3.2% overall mem usage . load averages are like: 0.08, 0.06, 0.01. I'm really stumped as to what to try. Is there any way of knowing what scripts were running when the memory ran out? As for improving performance I could implement some aggressive caching techniques, but before that I wanted to know what other peoples ZF apps look like in terms of memory usage. What is a typical ZF website memory footprint? Many thanks if you have any suggestions, even if it's just for further testing. -- View this message in context: http://www.nabble.com/ZF---Memory-usage-tp20678541p20678541.html Sent from the Zend Framework mailing list archive at Nabble.com. -- -- [MuTe] --
Re: [fw-general] ZF Memory usage
mothmenace schrieb: Hello, I recently deployed a ZF based site and have been experiencing memory issues on the server. This isn't to say the problem is with ZF, but I really wanted to ask other people's experiences in a number of areas. Host: Media Temple DV (dedicated virtual) Memory: 256mb Issues: frequent memory overages (more than once a day), reported as black level kmemsize QoS alerts in the Plesk control panel. I have APC enabled. It shows about 7mb of 32mb allocated memory used. I've set apc.stat to 0. I added a memory_get_usage(true) to my bootstrap, and with APC it comes out at about 1.75mb per page (much higher without). Page serve times are in the 0.7 range. I don't think the site is getting particularly high traffic, and I experienced some kmemsize issues even before launch. There are no other sites running on that hosting atm, and I'm pretty sure mail use is low. I've been following the server with top as much as possible, apache httpd process instances are showing 2.5% memory use. On average the mem usage is showing : siMem:689496k total, 311772k used, 377724k free. The mysqld process shows 3.2% overall mem usage . load averages are like: 0.08, 0.06, 0.01. I'm really stumped as to what to try. Is there any way of knowing what scripts were running when the memory ran out? As for improving performance I could implement some aggressive caching techniques, but before that I wanted to know what other peoples ZF apps look like in terms of memory usage. What is a typical ZF website memory footprint? Many thanks if you have any suggestions, even if it's just for further testing. Hello, i think you can start tu search on your SQL Statements. Maybe yout are getting too large results from Database (Zend DB?). Install and use profiling and FirePHP could be help. Regards Carlos Medina
Re: [fw-general] ZF Memory usage
Hi Keith Carlos, first of all many thanks for replying! :) Re: http://framework.zend.com/manual/en/performance.html Class loading - I tried commenting out all require_onces in the Zend lib, this definitely makes a difference if APC is not enabled, but AFAIK, APC with stat turned off means all require()d scripts are cached? Or am I wrong? Internationalization - thankfully I don't have to use this on the site... phew View Rendering - will definitely look into this... Does this help mem usage aswell as serve time? Re: DB, I have FirePHP, the front page query log is : (9 @ 0.01551 sec). Too much db table loading sounds VERY much something I want to investigate - I have Xquery installed - I'm a newbie with it, I have webgrind (http://code.google.com/p/webgrind/) but this doesn't seem to show breakdown of memory usage, just execution times? Anyway you've given me a lot to go on so thanks again. -- View this message in context: http://www.nabble.com/ZF---Memory-usage-tp20678541p20679446.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] New To PHP Zend
Sir Having read much introductory aspects about object oriented programming. I feel I have the logic of how its constructs works. I find I learn much faster, when seeing the logic of finished code and then playing around it. Having being thoroughly confused by reading textbooks on HTM CSSL [which are necessarily long winded].I became rapidly familiar by examining working code and then playing around with the same. Upon learning the conventions, making changes without corrupting the output.suddenly my comprehension took-off. Am I correct in assuming that the Zend Framework, provides large pre-written chunks of php/mysql code, which can be inserted into my application in the form of a jigsaw puzzle? For example, if I required to my users to upload documents in a secure fashion to my application - is there a chunk of ZEND code, which can perform this task [of course with a little marry-up work]? Will it provide the entire function requirements, which preclude my having to start from scratch [until I am sufficiently capable and so moved]. Note...this may be baby talk to youwhich really explains where I am in terms of my skills. Fundamentally, I'd like to tackle building applications relatively simply.it is easier for me to learn this way. To that end; would you recommend that I should use a code generator of some kind [and work backwards] and/or get straight in there with a more clean start [such as Zend]? I use Dreamweaver MX as my code editor, which I have grown to enjoy using. ta mike Themselves wrote: I would also recommend a basic guide to OO programming, as much of Zend takes advantage of PHP5's OO features, and unless you spend the time to formally learn OO it can be somewhat confusing. There are a number of fantastic tutorials out there on the Googles, but I personally read the first 2 chapters of Packt Publishing - Object-Oriented Programming with PHP5, which all made so much sense that I didn't need the rest of the book :P There's a lot more to OO than what you'll learn through an understanding the mechanics of it, it takes a number of years to really get to *think* in objects. Bruce Eckel's Thinking in Java is apparently a fantastic book for helping you down the road of truly understanding OO, but I've not read past the first few pages yet. Always so busy :/ On Tue, Nov 25, 2008 at 1:55 AM, Django Woolf [EMAIL PROTECTED] wrote: Hi All Am new to php/mysql and am looking to use Zend Framework as the backbone of my introduction into such application design, for the purposes of building dynamic web sites. I have made myself sufficiently familair with HTML as the first part of my learning and now wish to step up to building data driven web applications. Have fore-armed myself with several books for reference, but feel that at my advanced years and lack of technical nous...the best method for accelerated learning is to use the above, in a by rote manner.almost like building a jigsaw, which I can examine by seeing completed and working code. Could someone kindly offer a start point? thanks Mike -- View this message in context: http://www.nabble.com/New-To-PHP---Zend-tp20664844p20664844.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/New-To-PHP---Zend-tp20664844p20677893.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Unable to find controller index in module admin
Hello all! I have to add admin folder into my application structure. So far i did like this: /application -admin/ controllers/ ---IndexController.php views/ ---scripts/ ---index/ --index.phtml controllers/ --IndexController.php --ErrorController.php views/ and so on... When i point my url to www.domain.com/admin i am getting this message: Unable to find controller index in module admin in my bootstrap i have something like: $frontController = Zend_Controller_Front::getInstance(); /* Point the front controller to your action controller directory */ $frontController-addModuleDirectory($base.'/application/admin'); $frontController-setControllerDirectory(array('default'=$base.'/application/controllers','admin'=$base.'application/admin/controllers')); What i need is to access admin folder which will have different controllers then rest of the application, pointing URL to www.domain.com/admin I thought to do this with routing, but i am not sure if this is a good solution, because i will have a lot controllers in Admin folder, different from controllers in application direcotory. Thanks, V -- View this message in context: http://www.nabble.com/Unable-to-find-controller-%22index%22-in-module-%22admin%22-tp20679516p20679516.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Zend_Acl howto know isAllowed is false due to assert fail?
Well, I have fields to show/hide on different conditions for example. Consider show/hide person salary. If user has entered secret password (this would be the assert) he will be allowed to see someone's salary else just a link will be presented to enter secret password. But on other hand if there is not even allow for this salaray to see I wouldn't even display link to enter secret pass...it will all be just hidden. Hope it makes more sense now. I like abstraction too.just kinda not sure what best approach in my case is. Colin Guthrie wrote: Julian Davchev wrote: Hi, Lets say I have this snippet some code already for creating acl object $acl-allow('baby','house','break',$hadMilk); So how do I know i $isAllowed = $acl-isAllowed('baby','house','break'); // so if $isAllowed === falsehow do I know this is due to $hadMilk assert is false or just no such allow rule there? I think a question I would ask is why do you need to know this? Abstraction is good! Zend_ACL is a system that allows this abstraction. If you want to know the reasons why your ACL fails, then just check each condition manually and don't use the Zend_ACL system at all! I guess you could throw an exception or set something in a registry in your assert method if you really want to bubble this info up to the calling code, but I'd think seriously about the reasons behind doing this before going down this route. Col
Re: [fw-general] Newbie - Specific problem involing layouts, views and a partial
-- Julian102 [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 03:00 AM -0800): Background I have a website that sells DVD's. I have a navigation box which is on every single page of the site in the left column where you can browse the different categories of DVD. The categories in this table are stored in a table in the database where they are set to on or off. I need to do some logic that pulls the categories that are set to on from the category table and display them on every page of the website. First, make sure that logic is encapsulated in a model. Then create a view helper that pulls that information from the model and renders it. If that information is not changing often, I'd also add some caching logic to either the model or the view helper to reduce the number of hits to the database. The Proposed Fix I am confused as to the correct way you would fix this problem. I think you would need to put a link from the layout to a view helper perhaps a partial that would somehow get the information from the model without involving any specific controllers but I'm not sure. I'm sorry as this is probably a very simple question but I introduced ZEND Framework at work last week and I need to get things done quickly to justify the move but I'm struggling to understand parts of the official documentation. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] ZF Memory usage
-- mothmenace [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 03:27 AM -0800): Hi Keith Carlos, first of all many thanks for replying! :) Re: http://framework.zend.com/manual/en/performance.html Class loading - I tried commenting out all require_onces in the Zend lib, this definitely makes a difference if APC is not enabled, but AFAIK, APC with stat turned off means all require()d scripts are cached? Or am I wrong? require_once statements are still a nominal performance hit even with opcode caching (i.e., you'll see a *slight* improvement), though they won't really affect memory usage. Internationalization - thankfully I don't have to use this on the site... phew View Rendering - will definitely look into this... Does this help mem usage aswell as serve time? If you're heavily using partial() improperly (see the appendix for details) or heavily using action(), then yes, it will have an impact on memory usage, as each performs a fair bit of cloning, which creates more objects in memory. Re: DB, I have FirePHP, the front page query log is : (9 @ 0.01551 sec). Too much db table loading sounds VERY much something I want to investigate - I have Xquery installed - I'm a newbie with it, I have webgrind (http://code.google.com/p/webgrind/) but this doesn't seem to show breakdown of memory usage, just execution times? Use XDebug or Zend Debugger instead. However, the point is that you should cache data sets that are frequently displayed, and also minimize the amount of data pulled to only what you need. This can have a tremendous impact on resources. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] Unable to find controller index in module admin
-- vladimirn [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 03:31 AM -0800): Hello all! I have to add admin folder into my application structure. So far i did like this: /application -admin/ controllers/ ---IndexController.php Is the class in the above file named Admin_IndexController? views/ ---scripts/ ---index/ --index.phtml controllers/ --IndexController.php --ErrorController.php views/ and so on... When i point my url to www.domain.com/admin i am getting this message: Unable to find controller index in module admin in my bootstrap i have something like: $frontController = Zend_Controller_Front::getInstance(); /* Point the front controller to your action controller directory */ $frontController-addModuleDirectory($base.'/application/admin'); $frontController-setControllerDirectory(array('default'=$base.'/application/controllers','admin'=$base.'application/admin/controllers')); What i need is to access admin folder which will have different controllers then rest of the application, pointing URL to www.domain.com/admin I thought to do this with routing, but i am not sure if this is a good solution, because i will have a lot controllers in Admin folder, different from controllers in application direcotory. Thanks, V -- View this message in context: http://www.nabble.com/Unable-to-find-controller-%22index%22-in-module-%22admin%22-tp20679516p20679516.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] PHPUnit and ZF
-- Giorgio Sironi [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 10:18 AM +0100): 2008/11/24 CatharsisJelly [EMAIL PROTECTED] No errors, no tests.. nothing. Now I'm not sure if this is the fault of PHP, ZF or PHPUnit but it took me half a day to find it. As a warning any other coder that if this is happening to you you should check to see if you have a syntax error in your code somewhere. I remember a similar case where the class file was included with the @ error suppression character. Zend_Loader uses it a lot, so probably the error message vanish. Actually, Zend_Loader only suppresses errors when doing isReadable() checks, and that's been the case since 1.5.0. ;) -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] Unable to find controller index in module admin
Hello Matt, i dunno why is your reply empty to me :) However i find solution for this: In Admin module, i need to name my indexController as Admin_indexController. Also i changed my bootstrap : $frontController-setControllerDirectory( array( 'default' = $base . '/application/controllers', 'admin' = $base . '/application/admin/controllers' ) ); Thankss, V Matthew Weier O'Phinney-3 wrote: -- vladimirn [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 03:31 AM -0800): Hello all! I have to add admin folder into my application structure. So far i did like this: /application -admin/ controllers/ ---IndexController.php Is the class in the above file named Admin_IndexController? views/ ---scripts/ ---index/ --index.phtml controllers/ --IndexController.php --ErrorController.php views/ and so on... When i point my url to www.domain.com/admin i am getting this message: Unable to find controller index in module admin in my bootstrap i have something like: $frontController = Zend_Controller_Front::getInstance(); /* Point the front controller to your action controller directory */ $frontController-addModuleDirectory($base.'/application/admin'); $frontController-setControllerDirectory(array('default'=$base.'/application/controllers','admin'=$base.'application/admin/controllers')); What i need is to access admin folder which will have different controllers then rest of the application, pointing URL to www.domain.com/admin I thought to do this with routing, but i am not sure if this is a good solution, because i will have a lot controllers in Admin folder, different from controllers in application direcotory. Thanks, V -- View this message in context: http://www.nabble.com/Unable-to-find-controller-%22index%22-in-module-%22admin%22-tp20679516p20679516.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ -- View this message in context: http://www.nabble.com/Unable-to-find-controller-%22index%22-in-module-%22admin%22-tp20679516p20680727.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZF 1.7 - Zend Dojo SubmitButton Bug?
Hi all, I have created a form class that extends Zend_Dojo_Form. I have various elements (i.e. ComboBox, DateTextBox etc) in the form including a SubmitButton and they all display perfectly in ZF1.6.1. My problem has arrisen since upgarading to ZF 1.7. Since the upgrade the SubmitButton is not displaying correctly (Everything else works fine). Below is the code involved: $this-addElement('SubmitButton', 'submit', array( 'label' = 'Submit!!', 'decorators' = $this-_buttonElementDecorator // returns array ('DijitElement') )); $this-addDisplayGroup( array('submit'), 'datasubmit', array( 'disableLoadDefaultDecorators' = true, 'decorators' = $this-_buttonGroupDecorator, // returns array ('FormElements', 'Fieldset') 'class' = 'submit' ) ); This results in the following HTML being generated: input content=Submit!! id=submit name=submit value= type=submit //fieldset/form Note the 'label' value from the addElement is placed within a 'content' attribute in the HTML but the 'value' remains empty...?! Am I doing something wrong? Apologies if so... This works perfectly fine in ZF 1.6.1. I notice the Dojo CDN has changed to Google in the latest release but Im unsure of the cause... Both Zend_Dojo_View_Helper_SubmitButton and Zend_Dojo_View_Helper_Button appear to be exactly the same in both versions... Thanks, David -- View this message in context: http://www.nabble.com/ZF-1.7---Zend-Dojo-SubmitButton-Bug--tp20680984p20680984.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Zend_Acl howto know isAllowed is false due to assert fail?
Yep you got the scenario right. Thanks for insight. I will dig a bit further though cause all acls are controlled by admins and with two settings needed for single field it might come too much to think of :) I think I will be able to utilize internal _getRuleType() to figure out if explicite allow is present at all or not so ultimately I can work with single condition. Thanks again. Colin Guthrie wrote: Julian Davchev wrote: Well, I have fields to show/hide on different conditions for example. Consider show/hide person salary. If user has entered secret password (this would be the assert) he will be allowed to see someone's salary else just a link will be presented to enter secret password. But on other hand if there is not even allow for this salaray to see I wouldn't even display link to enter secret pass...it will all be just hidden. Hope it makes more sense now. I like abstraction too.just kinda not sure what best approach in my case is. Ahh right I think I understand your use case now. THere are really three states here. 1. Not allowed ever. 2. Allowed in principle but not authenticated to that level. 3. Allowed in principle and authenticated. Is that a fair statement? If so I would just split this into two sets of permissions one with an assert and one without. The first would indicate if the user is ever allowed or not (basically in the first group above or not in that group). The second controls the actual viewing of the sensitive info (with the assert). So I would do something like: if ($acl-isAllowed('CanViewSalaries')) { if ($acl-isAllowed('ViewSalary')) { // Display it. } else { // Display auth for the ViewSalary assert(). } } Dunno if that would work for you or not but I hope it helps. Col
Re: [fw-general] ZF Memory usage
Wow thanks Matt. I am using partial() a lot - I will investigate the appendix asap. I've got a page on the site which uses no DB calls, and it still uses 5mb memory without APC, so think that DB use is unlikely the bottleneck now. In XDebug, without APC, I am getting the following values for time / memory / function : 1 0.0005 58096 {main}( ) ../index.php:0 2 0.0011 100828 require( '/[...]/bootstrap.php' ) ../index.php:5 3 0.0683 3254816 Zend_Controller_Front-dispatch( ) ../bootstrap.php:155 4 0.0803 3842316 Zend_Controller_Dispatcher_Standard-dispatch( ) ../Front.php:934 Is 3842316 a standard value at dispatch() for memory use? I will report back as soon as I've had a chance to try out some of the optimizations, really happy to have something to work on :) -- View this message in context: http://www.nabble.com/ZF---Memory-usage-tp20678541p20681205.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZF 1.7 - Zend Dojo SubmitButton Bug?
it's a known bug, try this: http://www.framework.zend.com/issues/browse/ZF-4977;jsessionid=C628D5128C025969ADFBC9D052740C19?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel On Tue, Nov 25, 2008 at 10:14 PM, drj201 [EMAIL PROTECTED] wrote: Hi all, I have created a form class that extends Zend_Dojo_Form. I have various elements (i.e. ComboBox, DateTextBox etc) in the form including a SubmitButton and they all display perfectly in ZF1.6.1. My problem has arrisen since upgarading to ZF 1.7. Since the upgrade the SubmitButton is not displaying correctly (Everything else works fine). Below is the code involved: $this-addElement('SubmitButton', 'submit', array( 'label' = 'Submit!!', 'decorators' = $this-_buttonElementDecorator // returns array ('DijitElement') )); $this-addDisplayGroup( array('submit'), 'datasubmit', array( 'disableLoadDefaultDecorators' = true, 'decorators' = $this-_buttonGroupDecorator, // returns array ('FormElements', 'Fieldset') 'class' = 'submit' ) ); This results in the following HTML being generated: input content=Submit!! id=submit name=submit value= type=submit //fieldset/form Note the 'label' value from the addElement is placed within a 'content' attribute in the HTML but the 'value' remains empty...?! Am I doing something wrong? Apologies if so... This works perfectly fine in ZF 1.6.1. I notice the Dojo CDN has changed to Google in the latest release but Im unsure of the cause... Both Zend_Dojo_View_Helper_SubmitButton and Zend_Dojo_View_Helper_Button appear to be exactly the same in both versions... Thanks, David -- View this message in context: http://www.nabble.com/ZF-1.7---Zend-Dojo-SubmitButton-Bug--tp20680984p20680984.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Netbeans IDE with PHP
Just found this: http://www.netbeans.org/downloads/index.html http://www.netbeans.org/downloads/index.html It is a 24Mb download (compared with Eclipse PDT 130Mb) with full PHP, Javascript etc support. The javascript editor is excellent along with code completion etc. The PHP side of things is also excellent. One of the coolest things I have found it the Collaboration plugin. I have setup our own Collab server using OpenFire - http://www.igniterealtime.org/downloads/index.jsp http://www.igniterealtime.org/downloads/index.jsp The plugin allows you to share files and edit them. This could become my IDE of choice for developing PHP applications! - Robert 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] ZF Memory usage
-- mothmenace [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 05:30 AM -0800): Wow thanks Matt. I am using partial() a lot - I will investigate the appendix asap. I've got a page on the site which uses no DB calls, and it still uses 5mb memory without APC, so think that DB use is unlikely the bottleneck now. In XDebug, without APC, I am getting the following values for time / memory / function : 1 0.0005 58096 {main}( ) ../index.php:0 2 0.0011 100828 require( '/[...]/bootstrap.php' ) ../index.php:5 3 0.0683 3254816 Zend_Controller_Front-dispatch( ) ../bootstrap.php:155 4 0.0803 3842316 Zend_Controller_Dispatcher_Standard-dispatch( ) ../Front.php:934 Is 3842316 a standard value at dispatch() for memory use? Well, you have to understand that dispatch() encapsulates *everything* that happens in the app -- all plugins, all helpers, all views, all application logic... You should be able to drill further in to see what specific routines *within* that call are using the most memory. I will report back as soon as I've had a chance to try out some of the optimizations, really happy to have something to work on :) -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] ZF 1.7 - Zend Dojo SubmitButton Bug?
-- drj201 [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 05:14 AM -0800): I have created a form class that extends Zend_Dojo_Form. I have various elements (i.e. ComboBox, DateTextBox etc) in the form including a SubmitButton and they all display perfectly in ZF1.6.1. My problem has arrisen since upgarading to ZF 1.7. Since the upgrade the SubmitButton is not displaying correctly (Everything else works fine). It's a known bug and it's been submitted to the issue tracker no fewer than four times. Until 1.7.1 is released, there's a simple, forward-compatible workaround: set the 'label' dijit parameter, as shown below: Below is the code involved: $this-addElement('SubmitButton', 'submit', array( 'label' = 'Submit!!', 'dijitParams' = array('label' = 'Submit!!'), 'decorators' = $this-_buttonElementDecorator // returns array ('DijitElement') )); This will ensure that the label is drawn. $this-addDisplayGroup( array('submit'), 'datasubmit', array( 'disableLoadDefaultDecorators' = true, 'decorators' = $this-_buttonGroupDecorator, // returns array ('FormElements', 'Fieldset') 'class' = 'submit' ) ); This results in the following HTML being generated: input content=Submit!! id=submit name=submit value= type=submit //fieldset/form Note the 'label' value from the addElement is placed within a 'content' attribute in the HTML but the 'value' remains empty...?! Am I doing something wrong? Apologies if so... This works perfectly fine in ZF 1.6.1. I notice the Dojo CDN has changed to Google in the latest release but Im unsure of the cause... Both Zend_Dojo_View_Helper_SubmitButton and Zend_Dojo_View_Helper_Button appear to be exactly the same in both versions... -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
[fw-general] ZendX Jquery reports Zend_Dojo error???
I grab this code from documentation and tried to reporoduce some result. So, this is a code: public function indexAction() { $form = new ZendX_JQuery_Form ( ); $form-setDecorators ( array ('FormElements', array ('AccordionContainer', array ('id' = 'tabContainer', 'style' = 'width: 600px;', 'jQueryParams' = array ('alwaysOpen' = false, 'animated' = easeslide ) ) ), 'Form' ) ); $form-setAction ( 'formdemo.php' ); $form-setAttrib ( 'id', 'mainForm' ); $form-setAttrib ( 'class', 'flora' ); $subForm1 = new ZendX_JQuery_Form ( ); $subForm1-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'DatePicker and Slider' ) ) ) ) ); $subForm2 = new ZendX_JQuery_Form ( ); $subForm2-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'AutoComplete and Spinner' ) ) ) ) ); // Add Element Date Picker $elem = new ZendX_JQuery_Form_Element_DatePicker ( datePicker1, array (label = Date Picker: ) ); $elem-setJQueryParam ( 'dateFormat', 'dd.mm.yy' ); $subForm1-addElement ( $elem ); // Add Element Spinner $elem = new ZendX_JQuery_Form_Element_Spinner ( spinner1, array ('label' = 'Spinner:' ) ); $elem-setJQueryParams ( array ('min' = 0, 'max' = 1000, 'start' = 100 ) ); $subForm1-addElement ( $elem ); // Add Slider Element $elem = new ZendX_JQuery_Form_Element_Slider ( slider1, array ('label' = 'Slider:' ) ); $elem-setJQueryParams ( array ('defaultValue' = '75' ) ); $subForm2-addElement ( $elem ); // Add Autocomplete Element $elem = new ZendX_JQuery_Form_Element_AutoComplete ( ac1, array ('label' = 'Autocomplete:' ) ); $elem-setJQueryParams ( array ('data' = array ('New York', 'Berlin', 'Bern', 'Boston' ) ) ); $subForm2-addElement ( $elem ); // Submit Button $elem = new Zend_Form_Element_Submit ( btn1, array ('value' = 'Submit' ) ); $subForm1-addElement ( $elem ); $form-addSubForm ( $subForm1, 'subform1' ); $form-addSubForm ( $subForm2, 'subform2' ); $formString = $form-render ( $view ); } AFTER pointing url to the page, i am getting quite strange error: Fatal error: Call to undefined method Zend_Dojo_View_Helper_TabContainer::addPane() in D:\wamp\www\singlescash\library\ZendX\JQuery\View\Helper\TabPane.php on line 72 I think i dont call any Zend_Dojo view helper in here? Or i do? I am using Zend_dojo forms on web site, but not within this directory and this controller -- View this message in context: http://www.nabble.com/ZendX-Jquery-reports-Zend_Dojo-errortp20682080p20682080.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZendX Jquery reports Zend_Dojo error???
but you enabled the View for Dojo support? Because having both Dojo and jQuery helpers in your view will probably not work! you can try this by doing: $view-getHelperPaths() or $view-getPluginLoader()-getPaths() greetings, Benjamin On Tuesday 25 November 2008 15:55:30 vladimirn wrote: I grab this code from documentation and tried to reporoduce some result. So, this is a code: public function indexAction() { $form = new ZendX_JQuery_Form ( ); $form-setDecorators ( array ('FormElements', array ('AccordionContainer', array ('id' = 'tabContainer', 'style' = 'width: 600px;', 'jQueryParams' = array ('alwaysOpen' = false, 'animated' = easeslide ) ) ), 'Form' ) ); $form-setAction ( 'formdemo.php' ); $form-setAttrib ( 'id', 'mainForm' ); $form-setAttrib ( 'class', 'flora' ); $subForm1 = new ZendX_JQuery_Form ( ); $subForm1-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'DatePicker and Slider' ) ) ) ) ); $subForm2 = new ZendX_JQuery_Form ( ); $subForm2-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'AutoComplete and Spinner' ) ) ) ) ); // Add Element Date Picker $elem = new ZendX_JQuery_Form_Element_DatePicker ( datePicker1, array (label = Date Picker: ) ); $elem-setJQueryParam ( 'dateFormat', 'dd.mm.yy' ); $subForm1-addElement ( $elem ); // Add Element Spinner $elem = new ZendX_JQuery_Form_Element_Spinner ( spinner1, array ('label' = 'Spinner:' ) ); $elem-setJQueryParams ( array ('min' = 0, 'max' = 1000, 'start' = 100 ) ); $subForm1-addElement ( $elem ); // Add Slider Element $elem = new ZendX_JQuery_Form_Element_Slider ( slider1, array ('label' = 'Slider:' ) ); $elem-setJQueryParams ( array ('defaultValue' = '75' ) ); $subForm2-addElement ( $elem ); // Add Autocomplete Element $elem = new ZendX_JQuery_Form_Element_AutoComplete ( ac1, array ('label' = 'Autocomplete:' ) ); $elem-setJQueryParams ( array ('data' = array ('New York', 'Berlin', 'Bern', 'Boston' ) ) ); $subForm2-addElement ( $elem ); // Submit Button $elem = new Zend_Form_Element_Submit ( btn1, array ('value' = 'Submit' ) ); $subForm1-addElement ( $elem ); $form-addSubForm ( $subForm1, 'subform1' ); $form-addSubForm ( $subForm2, 'subform2' ); $formString = $form-render ( $view ); } AFTER pointing url to the page, i am getting quite strange error: Fatal error: Call to undefined method Zend_Dojo_View_Helper_TabContainer::addPane() in D:\wamp\www\singlescash\library\ZendX\JQuery\View\Helper\TabPane.php on line 72 I think i dont call any Zend_Dojo view helper in here? Or i do? I am using Zend_dojo forms on web site, but not within this directory and this controller -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] ZendX Jquery reports Zend_Dojo error???
-- vladimirn [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 06:55 AM -0800): I grab this code from documentation and tried to reporoduce some result. So, this is a code: snip -- a ZendX_JQuery_Form example... AFTER pointing url to the page, i am getting quite strange error: Fatal error: Call to undefined method Zend_Dojo_View_Helper_TabContainer::addPane() in D:\wamp\www\singlescash\library\ZendX\JQuery\View\Helper\TabPane.php on line 72 I think i dont call any Zend_Dojo view helper in here? Or i do? I am using Zend_dojo forms on web site, but not within this directory and this controller Are you dojo-enabling the view in your bootstrap, by any chance? (i.e., calling Zend_Dojo::enableView($view)) If so, you need to make sure that the JQuery view paths are the last added to the view, as several helper names are the same between the two. I'm not sure how the JQuery component adds view paths, but I'm sure it's in the docs. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] ZendX Jquery reports Zend_Dojo error???
Yes, dojo is enabled in bootstrap file. How to avoid this conflict? I am not sure that i know how to use $view-getHelperPath() and $view-getPluginLoader()-getPaths(); Will using this make use of Dojo An JQeury at the same time? Thanks, V beberlei wrote: but you enabled the View for Dojo support? Because having both Dojo and jQuery helpers in your view will probably not work! you can try this by doing: $view-getHelperPaths() or $view-getPluginLoader()-getPaths() greetings, Benjamin On Tuesday 25 November 2008 15:55:30 vladimirn wrote: I grab this code from documentation and tried to reporoduce some result. So, this is a code: public function indexAction() { $form = new ZendX_JQuery_Form ( ); $form-setDecorators ( array ('FormElements', array ('AccordionContainer', array ('id' = 'tabContainer', 'style' = 'width: 600px;', 'jQueryParams' = array ('alwaysOpen' = false, 'animated' = easeslide ) ) ), 'Form' ) ); $form-setAction ( 'formdemo.php' ); $form-setAttrib ( 'id', 'mainForm' ); $form-setAttrib ( 'class', 'flora' ); $subForm1 = new ZendX_JQuery_Form ( ); $subForm1-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'DatePicker and Slider' ) ) ) ) ); $subForm2 = new ZendX_JQuery_Form ( ); $subForm2-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'AutoComplete and Spinner' ) ) ) ) ); // Add Element Date Picker $elem = new ZendX_JQuery_Form_Element_DatePicker ( datePicker1, array (label = Date Picker: ) ); $elem-setJQueryParam ( 'dateFormat', 'dd.mm.yy' ); $subForm1-addElement ( $elem ); // Add Element Spinner $elem = new ZendX_JQuery_Form_Element_Spinner ( spinner1, array ('label' = 'Spinner:' ) ); $elem-setJQueryParams ( array ('min' = 0, 'max' = 1000, 'start' = 100 ) ); $subForm1-addElement ( $elem ); // Add Slider Element $elem = new ZendX_JQuery_Form_Element_Slider ( slider1, array ('label' = 'Slider:' ) ); $elem-setJQueryParams ( array ('defaultValue' = '75' ) ); $subForm2-addElement ( $elem ); // Add Autocomplete Element $elem = new ZendX_JQuery_Form_Element_AutoComplete ( ac1, array ('label' = 'Autocomplete:' ) ); $elem-setJQueryParams ( array ('data' = array ('New York', 'Berlin', 'Bern', 'Boston' ) ) ); $subForm2-addElement ( $elem ); // Submit Button $elem = new Zend_Form_Element_Submit ( btn1, array ('value' = 'Submit' ) ); $subForm1-addElement ( $elem ); $form-addSubForm ( $subForm1, 'subform1' ); $form-addSubForm ( $subForm2, 'subform2' ); $formString = $form-render ( $view ); } AFTER pointing url to the page, i am getting quite strange error: Fatal error: Call to undefined method Zend_Dojo_View_Helper_TabContainer::addPane() in D:\wamp\www\singlescash\library\ZendX\JQuery\View\Helper\TabPane.php on line 72 I think i dont call any Zend_Dojo view helper in here? Or i do? I am using Zend_dojo forms on web site, but not within this directory and this controller -- Benjamin Eberlei http://www.beberlei.de -- View this message in context: http://www.nabble.com/ZendX-Jquery-reports-Zend_Dojo-errortp20682080p20684609.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] ZendX Jquery reports Zend_Dojo error???
you have to make sure, that the jQuery Helper path gets added BEHIND the dojo helper path in the particular module that you are using it in. You have to read the PluginLoader and View Helper manuals on how to make this work. On Tuesday 25 November 2008 17:25:31 vladimirn wrote: Yes, dojo is enabled in bootstrap file. How to avoid this conflict? I am not sure that i know how to use $view-getHelperPath() and $view-getPluginLoader()-getPaths(); Will using this make use of Dojo An JQeury at the same time? Thanks, V beberlei wrote: but you enabled the View for Dojo support? Because having both Dojo and jQuery helpers in your view will probably not work! you can try this by doing: $view-getHelperPaths() or $view-getPluginLoader()-getPaths() greetings, Benjamin On Tuesday 25 November 2008 15:55:30 vladimirn wrote: I grab this code from documentation and tried to reporoduce some result. So, this is a code: public function indexAction() { $form = new ZendX_JQuery_Form ( ); $form-setDecorators ( array ('FormElements', array ('AccordionContainer', array ('id' = 'tabContainer', 'style' = 'width: 600px;', 'jQueryParams' = array ('alwaysOpen' = false, 'animated' = easeslide ) ) ), 'Form' ) ); $form-setAction ( 'formdemo.php' ); $form-setAttrib ( 'id', 'mainForm' ); $form-setAttrib ( 'class', 'flora' ); $subForm1 = new ZendX_JQuery_Form ( ); $subForm1-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'DatePicker and Slider' ) ) ) ) ); $subForm2 = new ZendX_JQuery_Form ( ); $subForm2-setDecorators ( array ('FormElements', array ('HtmlTag', array ('tag' = 'dl' ) ), array ('TabPane', array ('jQueryParams' = array ('containerId' = 'mainForm', 'title' = 'AutoComplete and Spinner' ) ) ) ) ); // Add Element Date Picker $elem = new ZendX_JQuery_Form_Element_DatePicker ( datePicker1, array (label = Date Picker: ) ); $elem-setJQueryParam ( 'dateFormat', 'dd.mm.yy' ); $subForm1-addElement ( $elem ); // Add Element Spinner $elem = new ZendX_JQuery_Form_Element_Spinner ( spinner1, array ('label' = 'Spinner:' ) ); $elem-setJQueryParams ( array ('min' = 0, 'max' = 1000, 'start' = 100 ) ); $subForm1-addElement ( $elem ); // Add Slider Element $elem = new ZendX_JQuery_Form_Element_Slider ( slider1, array ('label' = 'Slider:' ) ); $elem-setJQueryParams ( array ('defaultValue' = '75' ) ); $subForm2-addElement ( $elem ); // Add Autocomplete Element $elem = new ZendX_JQuery_Form_Element_AutoComplete ( ac1, array ('label' = 'Autocomplete:' ) ); $elem-setJQueryParams ( array ('data' = array ('New York', 'Berlin', 'Bern', 'Boston' ) ) ); $subForm2-addElement ( $elem ); // Submit Button $elem = new Zend_Form_Element_Submit ( btn1, array ('value' = 'Submit' ) ); $subForm1-addElement ( $elem ); $form-addSubForm ( $subForm1, 'subform1' ); $form-addSubForm ( $subForm2, 'subform2' ); $formString = $form-render ( $view ); } AFTER pointing url to the page, i am getting quite strange error: Fatal error: Call to undefined method Zend_Dojo_View_Helper_TabContainer::addPane() in D:\wamp\www\singlescash\library\ZendX\JQuery\View\Helper\TabPane.php on line 72 I think i dont call any Zend_Dojo view helper in here? Or i do? I am using Zend_dojo forms on web site, but not within this directory and this controller -- Benjamin Eberlei http://www.beberlei.de -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] Newbie - Specific problem involing layouts, views and a partial
Thanks a lot for the help Matthew Weier O'Phinney-3 wrote: -- Julian102 [EMAIL PROTECTED] wrote (on Tuesday, 25 November 2008, 03:00 AM -0800): Background I have a website that sells DVD's. I have a navigation box which is on every single page of the site in the left column where you can browse the different categories of DVD. The categories in this table are stored in a table in the database where they are set to on or off. I need to do some logic that pulls the categories that are set to on from the category table and display them on every page of the website. First, make sure that logic is encapsulated in a model. Then create a view helper that pulls that information from the model and renders it. If that information is not changing often, I'd also add some caching logic to either the model or the view helper to reduce the number of hits to the database. The Proposed Fix I am confused as to the correct way you would fix this problem. I think you would need to put a link from the layout to a view helper perhaps a partial that would somehow get the information from the model without involving any specific controllers but I'm not sure. I'm sorry as this is probably a very simple question but I introduced ZEND Framework at work last week and I need to get things done quickly to justify the move but I'm struggling to understand parts of the official documentation. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ -- View this message in context: http://www.nabble.com/Newbie---Specific-problem-involing-layouts%2C-views-and-a-partial-tp20679035p20685672.html Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Netbeans IDE with PHP
How's the css support ? Does it allow you to write custom file extension configurations ? Bet it doesn't compare to Zend studio though ! =P Thanks, Mike Tramontano From: Robert Castley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 8:45 AM To: fw-general@lists.zend.com Subject: [fw-general] Netbeans IDE with PHP Just found this: http://www.netbeans.org/downloads/index.html It is a 24Mb download (compared with Eclipse PDT 130Mb) with full PHP, Javascript etc support. The javascript editor is excellent along with code completion etc. The PHP side of things is also excellent. One of the coolest things I have found it the Collaboration plugin. I have setup our own Collab server using OpenFire - http://www.igniterealtime.org/downloads/index.jsp The plugin allows you to share files and edit them. This could become my IDE of choice for developing PHP applications! - Robert 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] Netbeans IDE with PHP
2008/11/25 Michael Tramontano [EMAIL PROTECTED]: How's the css support ? Does it allow you to write custom file extension configurations ? Bet it doesn't compare to Zend studio though ! =P I won't argue with you, but NetBeans it's free. Zend Studio isn't. I think this is big difference. I use Eclipse-pdt 1.x and NetBeans both for php, but the eclipse sometimes drive me crazy. I'm waiting for the stable pdt-2.0. -- - - -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando -- Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell
[fw-general] Cannot consume SOAP Service
Hi guys, I created a small soap service with Zend_Soap_Server and Zend_Soap_AutoDiscover but I cannot consume its data via a java soap client. I tried it all the day but it won´t work. - SNIP - class MyFooService { /** * @return string */ public function getStaticString() { return 'Hello World'; } } - SNAP - It is accessable (for me!) via http://jason/Laboratory/JMS/service.php which is the service and http://jason/Laboratory/JMS/service.php?wsdl which will show wsdl definition. The created wsdl definition looks like this: - SNIP - ?xml version=1.0? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://jason/Laboratory/JMS/service.php; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap-enc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; name=MyFooService targetNamespace=http://jason/Laboratory/JMS/service.php; portType name=MyFooServicePort operation name=getStaticString input message=tns:getStaticStringRequest / output message=tns:getStaticStringResponse / /operation /portType binding name=MyFooServiceBinding type=tns:MyFooServicePort soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http; / operation name=getStaticString soap:operation soapAction=http://jason/Laboratory/JMS/service.php#getStaticString; / input soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /input output soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /output /operation /binding service name=MyFooServiceService port name=MyFooServicePort binding=tns:MyFooServiceBinding soap:address location=http://jason/Laboratory/JMS/service.php; / /port /service message name=getStaticStringRequest / message name=getStaticStringResponse part name=getStaticStringReturn type=xsd:string / /message /definitions - SNAP - As you can see I do not use Zend_Soap_AutoDiscover in its original version (see attached MyAutoDiscover.diff, could not extend and use my own class because I need access to private class properties). I needed to change soap:body use=encoded encodingStyle=... / to soap:body use=literal namespace=... / because wsimport (small tool included in jdk) cannot handle encoded. So I used following command to create java classes from wsdl definiton: # wsimport -keep http://jason/Laboratory/JMS/service.php?wsdl So I got this two java classes: # jason.laboratory.jms.service.MyFooServicePort.java # jason.laboratory.jms.service.MyFooServiceService.java After that I created a soap client using these classes (jdk1.6.0_10): - SNIP - package jason.laboratory.jms.myfooclient; import jason.laboratory.jms.service.*; public class MyFooClient { /** * @param args */ public static void main(String[] args) { MyFooServiceService mfss = new MyFooServiceService(); MyFooServicePortmfsp = mfss.getMyFooServicePort(); String result= mfsp.getStaticString(); if (result != null) { System.out.println(Result: + result); } else { System.out.println(Result is NULL); } } } - SNAP - I expected Result: Hello World but I always get Result is NULL. Zend_Soap_Client has no problems consuming the service. It looks like an java problem, but we also tested the same soap server using a Microsoft Dynamics AX soap client and got the same result. Okay we do not get NULL as return value from service, the Microsoft soap client shows 1 as result. So I am searching for a solution how to get it working. I am absolutly clueless why I do not get the correct result. Is there someone who can verify or solve my problem? :-) If there are any questions or if there are more information needed, please ask! If needed I can upload my sources. -- Jan Index: AutoDiscover.php === --- AutoDiscover.php(revision 12830) +++ AutoDiscover.php(working copy) @@ -244,7 +244,7 @@ } /* wsdl:binding's */ -$operation = $wsdl-addBindingOperation($binding, $method-getName(), array('use' = 'encoded', 'encodingStyle' = http://schemas.xmlsoap.org/soap/encoding/;), array('use' = 'encoded', 'encodingStyle' = http://schemas.xmlsoap.org/soap/encoding/;)); +$operation = $wsdl-addBindingOperation($binding, $method-getName(), array('use' = 'literal', 'namespace' = $this-_uri), array('use' = 'literal', 'namespace' = $this-_uri)); $wsdl-addSoapOperation($operation, $uri-getUri() . '#' .$method-getName());
[fw-general] Zend Http Client Adapter Socket Error with Zend RSS
I am getting the following error when I try to consume any RSS feed. Below is the code I am using (from the manual) ?php ini_set('display_errors', 1); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); print function_exists('stream_context_create') ? true : false; //prints true // Fetch the latest Slashdot headlines try { $slashdotRss = Zend_Feed::import('http://rss.slashdot.org/Slashdot/slashdot'); } catch (Zend_Feed_Exception $e) { // feed import failed echo Exception caught importing feed: {$e-getMessage()}\n; exit; } catch (Zend_Http_Client_Adapter_Exception $zhcae) { print $zhcae-getMessage(); exit; } // Exception that is thrown Unable to Connect to tcp://rss.slashdot.org:80. Error #-1077097640: -- View this message in context: http://www.nabble.com/Zend-Http-Client-Adapter-Socket-Error-with-Zend-RSS-tp20689403p20689403.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Cannot consume SOAP Service
this is very valueable input. thank you very much. I have to look into that. Unfortunatly the AutoDiscover and WSDL internals are in very bad shape to extend without easily breaking backwards compability, so i cannot assure you that I can include it in the next mini or minor release. Do i understand you correctly, that it worked for you with Java, when you switched from encoded to literal? greeetings Benjamin On Tuesday 25 November 2008 21:23:30 Jan Pieper wrote: Hi guys, I created a small soap service with Zend_Soap_Server and Zend_Soap_AutoDiscover but I cannot consume its data via a java soap client. I tried it all the day but it won´t work. - SNIP - class MyFooService { /** * @return string */ public function getStaticString() { return 'Hello World'; } } - SNAP - It is accessable (for me!) via http://jason/Laboratory/JMS/service.php which is the service and http://jason/Laboratory/JMS/service.php?wsdl which will show wsdl definition. The created wsdl definition looks like this: - SNIP - ?xml version=1.0? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://jason/Laboratory/JMS/service.php; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap-enc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; name=MyFooService targetNamespace=http://jason/Laboratory/JMS/service.php; portType name=MyFooServicePort operation name=getStaticString input message=tns:getStaticStringRequest / output message=tns:getStaticStringResponse / /operation /portType binding name=MyFooServiceBinding type=tns:MyFooServicePort soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http; / operation name=getStaticString soap:operation soapAction=http://jason/Laboratory/JMS/service.php#getStaticString; / input soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /input output soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /output /operation /binding service name=MyFooServiceService port name=MyFooServicePort binding=tns:MyFooServiceBinding soap:address location=http://jason/Laboratory/JMS/service.php; / /port /service message name=getStaticStringRequest / message name=getStaticStringResponse part name=getStaticStringReturn type=xsd:string / /message /definitions - SNAP - As you can see I do not use Zend_Soap_AutoDiscover in its original version (see attached MyAutoDiscover.diff, could not extend and use my own class because I need access to private class properties). I needed to change soap:body use=encoded encodingStyle=... / to soap:body use=literal namespace=... / because wsimport (small tool included in jdk) cannot handle encoded. So I used following command to create java classes from wsdl definiton: # wsimport -keep http://jason/Laboratory/JMS/service.php?wsdl So I got this two java classes: # jason.laboratory.jms.service.MyFooServicePort.java # jason.laboratory.jms.service.MyFooServiceService.java After that I created a soap client using these classes (jdk1.6.0_10): - SNIP - package jason.laboratory.jms.myfooclient; import jason.laboratory.jms.service.*; public class MyFooClient { /** * @param args */ public static void main(String[] args) { MyFooServiceService mfss = new MyFooServiceService(); MyFooServicePortmfsp = mfss.getMyFooServicePort(); String result= mfsp.getStaticString(); if (result != null) { System.out.println(Result: + result); } else { System.out.println(Result is NULL); } } } - SNAP - I expected Result: Hello World but I always get Result is NULL. Zend_Soap_Client has no problems consuming the service. It looks like an java problem, but we also tested the same soap server using a Microsoft Dynamics AX soap client and got the same result. Okay we do not get NULL as return value from service, the Microsoft soap client shows 1 as result. So I am searching for a solution how to get it working. I am absolutly clueless why I do not get the correct result. Is there someone who can verify or solve my problem? :-) If there are any questions or if there are more information needed, please ask! If needed I can upload my sources. -- Jan -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] Cannot consume SOAP Service
No, it do not work after changing it from encoded to literal. I only could create java classes with wsimport [1] after changing it. A teammate also told me to change it to literal for Microsoft Dynamics AX because he is already consuming soap services and they all use literal. The problem I have is, that I wrote an application and now I need a soap service to provide functionality to non-php-applications. We begun to test the soap service with Microsoft Dynamics AX but it won´t work. After I could not figure out why (useless error messages, no possibility to check what the service is doing) we tried to consume the service with an java soap client. There I got usefull error messages so I could change Zend_Soap_AutoDiscover like mentioned in my first email. Now I could create java classes with wsimport to consume the soap service but I always get NULL as return value. No error message, no empty result... only NULL. Found another application that can consume the soap service. WSDL explorer of WTP project (http://www.eclipse.org/webtools/). Don´t know what it is written in, but I think it is writtn in java like all eclipse plugins :-) [1] https://jax-ws.dev.java.net/jax-ws-ea3/docs/wsimport.html -- Jan this is very valueable input. thank you very much. I have to look into that. Unfortunatly the AutoDiscover and WSDL internals are in very bad shape to extend without easily breaking backwards compability, so i cannot assure you that I can include it in the next mini or minor release. Do i understand you correctly, that it worked for you with Java, when you switched from encoded to literal? greeetings Benjamin On Tuesday 25 November 2008 21:23:30 Jan Pieper wrote: Hi guys, I created a small soap service with Zend_Soap_Server and Zend_Soap_AutoDiscover but I cannot consume its data via a java soap client. I tried it all the day but it won´t work. - SNIP - class MyFooService { /** * @return string */ public function getStaticString() { return 'Hello World'; } } - SNAP - It is accessable (for me!) via http://jason/Laboratory/JMS/service.php which is the service and http://jason/Laboratory/JMS/service.php?wsdl which will show wsdl definition. The created wsdl definition looks like this: - SNIP - ?xml version=1.0? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:tns=http://jason/Laboratory/JMS/service.php; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap-enc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; name=MyFooService targetNamespace=http://jason/Laboratory/JMS/service.php; portType name=MyFooServicePort operation name=getStaticString input message=tns:getStaticStringRequest / output message=tns:getStaticStringResponse / /operation /portType binding name=MyFooServiceBinding type=tns:MyFooServicePort soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http; / operation name=getStaticString soap:operation soapAction=http://jason/Laboratory/JMS/service.php#getStaticString; / input soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /input output soap:body use=literal namespace=http://jason/Laboratory/JMS/service.php; / /output /operation /binding service name=MyFooServiceService port name=MyFooServicePort binding=tns:MyFooServiceBinding soap:address location=http://jason/Laboratory/JMS/service.php; / /port /service message name=getStaticStringRequest / message name=getStaticStringResponse part name=getStaticStringReturn type=xsd:string / /message /definitions - SNAP - As you can see I do not use Zend_Soap_AutoDiscover in its original version (see attached MyAutoDiscover.diff, could not extend and use my own class because I need access to private class properties). I needed to change soap:body use=encoded encodingStyle=... / to soap:body use=literal namespace=... / because wsimport (small tool included in jdk) cannot handle encoded. So I used following command to create java classes from wsdl definiton: # wsimport -keep http://jason/Laboratory/JMS/service.php?wsdl So I got this two java classes: # jason.laboratory.jms.service.MyFooServicePort.java # jason.laboratory.jms.service.MyFooServiceService.java After that I created a soap client using these classes (jdk1.6.0_10): - SNIP - package jason.laboratory.jms.myfooclient; import jason.laboratory.jms.service.*; public class MyFooClient { /** * @param args */ public static void main(String[] args) { MyFooServiceService mfss = new
RE: [fw-general] Netbeans IDE with PHP
IMHO it does compare. The CSS support is also excellent, it doesn't seem to suffer the bug I reported in Eclipse (ages ago!) whereby the CSS syntax of font:11px/14px Verdana; get formatted to: font: 11px/ 14px Verdana; (notice the space) The laptop I currently use (issued through work) handles Netbeans far better than Eclipse. My personal Mac Pro is responsive in both. After 'playing' with Netbeans more I have come to the following conclusions: 1) Team Synchronise ROCKS! in Eclipse. Netbeans offers no comparison. 2) Javascript editing is far better in Netbeans than in PDT 1.0.3 3) Loving the colour highlight in explorer tree in Netbeans to show changed/modified files 4) Collaboration ROCKS! in Netbeans. Loving OpenFire as well. 5) Netbeans plugin installation is far easier than Eclipse. NetBeans provides you with a list of (156) plugins available to install. 6) NetBeans 5 seconds to load/start, Eclipse 7 seconds (on the laptop) 7) I removed Zend Studio Beta in favour of Eclipse + PDT as it was soo slow. I am now using Eclipse + PDT for the Team Synchronise and NetBeans for code development (for the time being). OK, you could argue that PHP support is not so good in NetBeans but it all comes down to using the tool that fits. NetBeans gives a PHP developer everything he needs, as does Eclipse + PDT. That leaves personal preference as the deciding factor. As with everything in life, it is nice to have a choice! _ From: Michael Tramontano [mailto:[EMAIL PROTECTED] Sent: 25 November 2008 19:24 To: Robert Castley; fw-general@lists.zend.com Subject: RE: [fw-general] Netbeans IDE with PHP How's the css support ? Does it allow you to write custom file extension configurations ? Bet it doesn't compare to Zend studio though ! =P Thanks, Mike Tramontano From: Robert Castley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 8:45 AM To: fw-general@lists.zend.com Subject: [fw-general] Netbeans IDE with PHP Just found this: http://www.netbeans.org/downloads/index.html http://www.netbeans.org/downloads/index.html It is a 24Mb download (compared with Eclipse PDT 130Mb) with full PHP, Javascript etc support. The javascript editor is excellent along with code completion etc. The PHP side of things is also excellent. One of the coolest things I have found it the Collaboration plugin. I have setup our own Collab server using OpenFire - http://www.igniterealtime.org/downloads/index.jsp http://www.igniterealtime.org/downloads/index.jsp The plugin allows you to share files and edit them. This could become my IDE of choice for developing PHP applications! - Robert 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. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.