2 Replies Latest reply on Sep 17, 2010 5:59 AM by samuel_girardin

    Error : Flex and Php

    ArnaudF35

      Hi,

       

      I have an Apache server and a MySQL database (I'm using WampServer2.0).

       

      I have created with flashbuilder4 a new project and I have selected "php". I have used the menu "données>>connexion à php..."(probably "data>>linq to php..." in the english version) of flashbuilder and the autogenerated php class made by the program. It has well found my database and table and generated the php class but when I bind a datagrid with the service giving the table fields I have an error at the exec :

           mx.data::RPCDataManager/initialize can't find source. (find with the debug mode)

      and in the browser the error

           " Canal déconnecté Canal déconnecté avant l'obtention  de l'accusé de réception" (Sorry I'm french and don't have the traduction of the error)

       

      Is there something special to do with the Apache server or have I forgotten something ?

      I'm new in flex, and I've just created a project with a datagrid linqed with my database.

       

      Thanks in advance,

       

      Arnaud.

       

      (ps : sorry for my english, i'm french, no one is perfect )

        • 1. Re: Error : Flex and Php
          ArnaudF35 Level 1

          The problem was in the php file, I had forgotten to delete the "port" and its default value was "" wich is a string and not a long ...

          Another problem comes from UTF8 encode, solve thanks to :

           

          public function utf8_encode_array ($array)

          {

          $retArray = Array ();

          foreach($array as $key => $value)

          {

             $retArray[utf8_encode ($key)] = utf8_encode ($value);

          }

          return $retArray;

          }

           

          Called in the get fonction :

           

          while (mysqli_stmt_fetch($stmt))

          {

          $encodedRow = $this->utf8_encode_array ($row);

                      $rows[] = $encodedRow;

          $row = new stdClass();

          mysqli_stmt_bind_result($stmt ...

           

          I find the problem using the webservice with the test module of flashbuilder.

          • 2. Re: Error : Flex and Php
            samuel_girardin

            Merci beaucoup pour tes infos !

             

            samuel

             

            http://www.visualiser.fr