Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-22-2011, 12:09 PM   #1
launcher
Registered User
 
Join Date: Nov 2008
Posts: 17
Default Host problem or code problem ?

Hi everyone.
I have created a website on Flex builder 3 and it works fine on my local server,
but when I upload it to my host i get this error from flex.

ActionScript Code:
Error [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]

And the php files doesn't return any information.

I try to use crossdomain policy but it doesn't work.
here's my php file that returns the xml.

PHP Code:
<?php
    
require_once("config.php");

    class 
infoRetrieve
    
{
        private 
$connection;
        
        function 
infoRetrieve($table_name)
        {
            
$this->conn();
            
mysql_query("SET NAMES utf8");
            
$query $this->selectAllQuery($table_name);
            
$xml $this->returnXML($query);
            
print_r($xml);
        }
        
        public function 
conn()
        {
            
$this->connection mysql_connect(DB_SERVERDB_USERDB_PASS);
            if(!
$this->connection)
            {    
                die(
"database connection faled" mysql_error());
            }
            else
            {
                
$db_select mysql_select_db(DB_NAME$this->connection);
                if(!
$db_select)
                {
                    die(
"database selecition faled" mysql_error());
                }
            }    
        }
        
        public function 
selectAllQuery($table_name)
        {
            if(isset(
$table_name))
            {
                
$query mysql_query("SELECT * FROM {$table_name}");
            }
            return 
$query;
        }
        
        public function 
returnXML($info)
        {
            
$xml "<root>";
        
            if(isset(
$info))
            {
                while(
$row mysql_fetch_array($info))
                {
                    for(
$i 0$i < (count($row)/2); $i++)
                    {
                        
$xml .= "<item{$i}>";
                            
$xml .= $row[$i];
                        
$xml .= "</item{$i}>";
                    }
                }
            }
            else 
            {
                echo 
"Error";
            }
            
            
            
$xml .= "</root>";
            
            return 
$xml;
        }
        
        public function 
closeConn()
        {
            if(isset(
$this->connection))
            {
                
mysql_close($this->connection);
                unset(
$this->connection);
            }
        }
    }
?>
The php version on my local servar is 5.
On host server is 4. Can this be the problem ?
launcher is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:13 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.