Welcome Guest, Not a member yet? Register   Sign In
Flex ZendAmf CI "Channel disconnected" error
#1

[eluser]ndriana[/eluser]
Hi,

I followed this tutorial and it works fine. I then switched to Flex (with Flash Builder) following the basic concept of that tutorial and it still works fine. My problem is not then related to that thread anymore that I decided to open a new one.

It has something to do with CI Active Record.

Here is the code in test.php:
Code:
<?php
class Test extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
    }
    
    protected function takeData(){/*
        $this->db->where('id', 3);
        $data=$this->db->get('tablename');
        foreach($data->result() as $row){
            $output = $row->title;
        }
        */
        $output = 'Some dummy string...';
        return $output;
    }
    
    public function getMessage(){
        $output = (string)$this->takeData();
        return $output;
        //echo $output;
    }    
    
}
?>
I just wanted to publish a string from the database.
This code works well if I just publish some dummy string straight from the script. But when I try to extract one from the database, even uncommenting the first line
Code:
$this->db->where('id', 3);
will lead me to the following error.

Channel disconnected before an acknowledgement was received

I checked the class as a regular CI application on the browser with a simple echo and it works fine.

What I found online was to check my db settings but it doesn't help. That script pull out my data real fine.
#2

[eluser]ndriana[/eluser]
My bad again,

I made farther research and was asked to check my log. My apache (WAMP), had a lot to say.

You'll have to initialize the database class
Code:
$this->load->database();
otherwise, you'll have the server error
Call to a member function where() on a non-object

I wonder why CodeIgniter didn't catch that.




Theme © iAndrew 2016 - Forum software by © MyBB