10 Replies Latest reply on Apr 2, 2014 6:47 AM by ciganarija

    flashbuilder/php/zend partially working

    paula_ke Level 1

      I've made a simple application that uses the php service and the zend framework on wamp

      The database has three fields, one primary index.

      The project creation process works fine and when I create the data service with the wizzard, I get all the CRUD

      that I need.


      I set up a data grid and bind it to getAll<tablename>.  I run the app and all is fine (I see an empty table)

      My network monitor indicates I made a getAll query and it shows an okay result


      I set up a Data>generate form wizzard and bind it to create<tablename>(item...)


      I run the app and get the datagrid and the form with fields to enter my data, a button to create the item in the table and a result text box


      When I enter data and press the create button, I do not get any results ( I should get a 0)  I've stepped through the program and I never get a return token.

      My network monitor does not inidicate that I had any network traffic (nothing from my client to the php code on the server)


      To make things more interesting, when I do a Data/Services>Test Operation on the create function, I can load a set of data, run the test and it works! Data shows up in my table and the test response code is 0


      My question is, how do I debug the php service call on the client side as it does not seem to be working.






      More information:


      I loaded flashbuilder 4.5 on another windows system with wamp and zend and got exactly the same result.

      I now have two systems that do exactly the same thing.  I have a zipped directory of the project and can send it to someone who might

      be interested in this bug.


      As I step through the code I reach the operationManager object and the debugger can no longer see the code (it is part of the mx libraries I guess).

      At any rate, there is never a network call for the create<>(item...) operation so it must be in the mx.data.RPCDataManger, mx.data.DataManager, mx.data::ConcreteDataService/createItem




      Very frustrating.

        • 1. Re: flashbuilder/php/zend partially working
          paula_ke Level 1

          So, pjlumby has uncovered what we believe is a bug in the data service wizard.  It turns out that when you use the auto generated service calls that change the database such as create<blah>(item), update<blah>(item) and possibly delete<blah>item(itemID) that the data service does not 'commit' the change so nothing happens to your database.  No call to the PHP code, no network traffic.


          However, there is a 'commit()' function in the _Super_<blah>.as file in your services directory.  If you put a break point there, you will see that the method is never called.  Hmmmm.


          If you add the 'commit()' statement at the end of all the methods (before the return)  that modify the database (see first paragraph)[methods are located in _Super_<blah>.as in your services directory], well, things start working the way they are suppose to.


          Hope this helps those who have this bug.  I've wasted three days on this.


          Big thankyou to pjlumby.



          • 2. Re: flashbuilder/php/zend partially working



            Thanks A LOT!!! this issue was driving me nuts, Re-cheling every thing for the past week, you really help me out


            Good bye

            • 3. Re: flashbuilder/php/zend partially working
              paula_ke Level 1

              Glad it helped!  I'm not a big IDE fan and this is one of the reasons.  The IDE developers think they have all their bits covered and all a user has to do is follow their wizards and examples, unfortunately, when they have some bad bits, the IDE hides the sources necessary to really see what is going on.  I really want to make flashbuilder work but it's stuff like this that makes me remember why I like all the sources, VIM and Make



              • 4. Re: flashbuilder/php/zend partially working
                Lior Elrom

                Hi  Paula,


                Thanks so much for your answer and solution.

                I had the same problem/bug and couldn't resolve it till now.

                Adding the commit() function solved it.


                Thanks again for your time!!!

                • 5. Re: flashbuilder/php/zend partially working

                  Hi Paula.....


                  Thank you very much paula.... It was really helpful.... Thank you again..... You saved me before getting frustrated for days......

                  • 6. Re: flashbuilder/php/zend partially working

                    Hey Paula,


                    Now I have the "commit();" code before the return of each function in the "Super...Service.as" file but I I still get this error and my php-mysql data connection settings are there:


                    Error Dialog:


                    Channel disconnected

                    Channel disconnected before an acknowledgement was received


                    If you have any suggestions of what can this be I would truly appreciate your help.  Thank you.

                    • 7. Re: flashbuilder/php/zend partially working
                      paula_ke Level 1

                      You may want to monitor your network traffic to make sure that you are talking to your server.  The error you reported would indicate that you are attempting network connection to your server but your server is not responding.  I would dig deeper and look at the network monitor tool to be sure you are getting traffic out of your flash.  


                      It has been a long time since I played with the php wizard.  I've moved on to my own python services and use standard http cgi api calls with json return objects.  


                      Good Luck!



                      • 8. Re: flashbuilder/php/zend partially working
                        noah.j.anderson Level 1

                        I downloaded a program CHARLES to monitor traffic and find out what’s going on.  Could you elaborate a little bit about Python Service.  Sounds interesting enough J

                        • 9. Re: flashbuilder/php/zend partially working
                          paula_ke Level 1

                          flashbuilder actually has a network monitor (one of the tabs in the bottom window by whre the problems an data service tags are).

                          I use python mod_wsgi.  There is a bit of setup but once configures life gets real easy.  I can create a new interface in minutes and dashboards that include the flash code and the service side code in under an hour.  There is learning curve and a set up curve.


                          Good Luck,



                          • 10. Re: flashbuilder/php/zend partially working

                            i dont understand, should I just add "commit();" before return ? i have the same problem, except mine doesnt work even when testing