0 Replies Latest reply on Sep 1, 2009 2:22 AM by Abdol A

    Moving flex project to a PRODUCTION SERVER?

    Abdol A Level 1



      My problem is about putting my flex project to my Production server. my project retrieves some data from MYSQL Database in my Production server e.g.  "http://mydomain.com"


      Problem Description: When I uploaded the release build of the project to my Production Server then I typed the URL For it e.g. "http://mydoamin.com/myproject/main.html" I see a message says "send failed". (note: when I run the project from localhost it work and shows the data).


      Software: Flash Builder beta


      MXML Code:


      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:myservice="services.myservice.*">
                     import mx.events.FlexEvent;
                     import mx.controls.Alert;
                     protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
                          getAllItemsResult.token = myservice.getAllItems();
                <s:CallResponder id="getAllItemsResult"/>
                <myservice:Myservice id="myservice" destination="myservice" endpoint="http://localhost/myproject-debug/gateway.php" 
                     fault="Alert.show(event.fault.faultString)" showBusyCursor="true" source="myservice"/>
           <mx:DataGrid x="105" y="98" width="606" height="308" id="dataGrid" 
                 dataProvider="{getAllItemsResult.lastResult}" editable="true">
                     <mx:DataGridColumn headerText="password" dataField="password"/>
                     <mx:DataGridColumn headerText="userid" dataField="userid"/>
                     <mx:DataGridColumn headerText="username" dataField="username"/>


      PHP Code:


      class myservice {
           private function connect() {
                // TODO Establish the database connection
                // Sample code
                      $connection = mysql_connect("mydomain.com",  "root",  "root") or die(mysql_error());
                      mysql_select_db("myDB", $connection) or die(mysql_error());
           public function getAllItems() {
                // TODO Auto-generated method stub
                // Retrieve a array of records from the database and return that
                // Sample code
                       $sql = "SELECT * FROM users";
                       $result = mysql_query($sql) or die('Query failed: ' . mysql_error());
                       return $result;



      Please I want to know from you that do I need change something like amf_config.ini or gateway.php or something else?