5 Replies Latest reply on Jan 5, 2010 2:11 AM by Radhakrishna Bhat

    php service issue (flash builder 4)


      I started playing with Data/Services panel in FB4. Works pretty nice so far but there are a few issues I have:

      1. How can I manualy configure input types for the service? The dialog that appears is buggy - size is very small and I can't select input types there. Also changing method definithion in services.myservice._Super_MyService.as file (which is auto-generated) doesn't work - when I refresh or do something else FB4 just rewrites this file...


      2. Second issue is PHP related. I didn't use PHP for several years so my knowledge is still limited. I've created a service class like this:


      class MyService {
      public function addUser($username, $password) {
        $connection = 
      mysqli_connect('', 'root', 'root', myDB, 3306) or 
        $query = "INSERT INTO users (username, 
      password, role) 
            VALUES ('$username', PASSWORD('$password'), 
        mysqli_query($connection, $query) or 

      and it works. But if I move $connection variable outside function (to use it with other methods) I get some errors.. Anyone knows why and how to do this? Tried it with different access modifiers, wrapping it in separate function, but nothing helps..



        • 1. Re: php service issue (flash builder 4)
          Radhakrishna Bhat Level 3



          Thanks for the feedback. Could you please let us know what specific issues are you facing when using 'Configure Input Types' dialogue? I am able to change inpuit types through it.


          1. __Super_MyService.as files are not meant be changed. They will be re-generated every time there is a change in the service file. But you can make changes to the service by adding your code to MyService.as file which extends _Super_MyService class.


          2. You can declare a member var $connection in your PHP class and access it in all the methods using 'this' operator. ($this->connection). Better still, is to use a constrcutor method, the same way as DCD sample generation

          , eg:

              public function __construct() {
                    $this->connection = mysqli_connect(






          • 2. Re: php service issue (flash builder 4)
            sasxa.home Level 1

            Thanks for your inputs. I will look into that construct thingie (:


            As for 'Configure Input Types' dialogue, I can also use it in most cases, but some times it's static size isn't sufficient. For example, try adding this function to service:


            public function addUserData($username, $firstName, $lastName, $company, $jobTitle, 
                    $country, $state, $city, $zipCode, $address, $eMail, 
                    $phone, $cell, $fax, $webPage, $pictureURL) {


            On my PC when trying to change values, only one row is visible, and when I try to 'Select Type' for it, dropdown just closes without changing value. It would be nice if we could resize 'Configure Input Types' dialogue when needed... Or maybe just limit the size of 'Operation:' string in that dialogue..


            PS. I just played with it for a bit. If you enter too long function name select window completly disappears:


             public function abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz($abcdefghijklmnopqrstuvwxyz) {}
            • 3. Re: php service issue (flash builder 4)
              Radhakrishna Bhat Level 3

              Thank you. I have logged an usability issue for this. http://bugs.adobe.com/jira/browse/FB-25149

              But though function name and parameter names are not visible, i am able to configure the input types. If we have multiple arguments, the dialog will show a  scrollbar. Can you please provide us more detailed steps if i am missing something here?




              • 4. Re: php service issue (flash builder 4)
                sasxa.home Level 1

                Hope this image explains it (;

                • 5. Re: php service issue (flash builder 4)
                  Radhakrishna Bhat Level 3


                  I have a logged a bug for this http://bugs.adobe.com/jira/browse/FB-25164 .  We will look into the issue.