3 Replies Latest reply on Feb 19, 2013 6:15 AM by paulkenneth

    A problem of Channel disconnected(Flex & PHP)


      Hi there,

      I am also a rookie of Flex. Recently,I try to learn it with the Adobe’s tutorials which locals on:



      However,when I attempt to add some employees as the tutorial


      says,there always be an error:

      Channel disconnected

      Channel disconnected before an acknowledgement was received

      Even though I searched for the solution a lot times,I haven’t find a appropriate one.

      It bothers me several days

      So, if you guys knew how to figure it out , please do me a favor.

      Thanx a lot


        • 1. Re: A problem of Channel disconnected(Flex & PHP)



          When you follow the TestDrive tutorial you assume that all the syntax is 100% OK. That is not the case here.


          If you try to use the functions createEmployee(), updateEmployee() or deleteEmployee() you will notice that it needs to bind the parameters to the $stmt variable. When the PHP service (in this case:  EmployeeService) is called and the function reaches the point where the binding is performed the PHP will return a PHP Fatal error (you may check on your PHP log - usualy in C:\xampp\php\logs\php_error_log)  informing that there is a Call to undefined function mysqli_bind_param().


          To solve this you must  change your code as described below:


                Let's assume we are working with the function createEmployee()


            public function createEmployee($item) {

               $stmt = mysqli_prepare($this->connection,

               "INSERT INTO employees (



               VALUES (?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?)");




          all the same until now... BUT, notice the very beggining of the next statement...


                    $stmt->bind_param('sssisssssssss', $item->firstname, $item->lastname,

                              $item->title, $item->departmentid, $item->officephone, $item->cellphone,

                              $item->email, $item->street, $item->city, $item->state,

                              $item->zipcode, $item->office, $item->photofile);




          When you check the original code you will notice that the



          was replaced by



          This will solve the problem for good


          Best regards!




          • 2. Re: A problem of Channel disconnected(Flex & PHP)

            The issue is because mysqli_bind_param() function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.


            Source: http://php.net/manual/en/function.mysqli-bind-param.php


            Replacing that with mysqli_stmt_bind_param() works .




            • 3. Re: A problem of Channel disconnected(Flex & PHP)

              Amazingly helpful! Thank god people like you exist because you just helped me massively!