Flex 3 and connection to remote ubuntu server

Good morning,
I'm trying to retrieve the result from a SQL query to populate a datagrid.
My server is a Ubuntu server on a virtual machine. I created the tables I want to extract information from using MySQLWorkbench and put them on my ubuntu server. Flex is running on my Mac.
I have the following code in the mxml file of my Flex project:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="rest_service.send()">
    <mx:HTTPService id="rest_service" url="http://192.168.56.101/testhtml.php"/>
    <mx:DataGrid left="0" right="0" top="0" bottom="0"
        dataProvider="{rest_service.lastResult.people.person}">
        <mx:columns>
           <mx:DataGridColumn headerText="Test ID" dataField="userid"/>
           <mx:DataGridColumn headerText="Name" dataField="username"/>
           <mx:DataGridColumn headerText="Email" dataField="emailaddress"/> 
        </mx:columns>
    </mx:DataGrid>
</mx:Application>
The testhtml.php file is on the server (in the /var/www/ folder) and looks like this:
<?php
   require ("Connection.php");
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$Query = "SELECT * from users";
$Result = mysql_query( $Query );
//print "allo?" . "<br/>";
echo htmlspecialchars('<?xml version="1.0" encoding="utf-8"?>')."<br/>";
echo htmlspecialchars('<people>')."<br/>";
//print '<people>';
// Iterate through the rows, printing XML nodes for each
while( $Row = mysql_fetch_object( $Result ) )
  echo "      ";
  echo htmlspecialchars('<person>') . "<br/>" ;
  echo "            ";
  echo htmlspecialchars('<userid>'.$Row->userid.'') ;
  echo htmlspecialchars('</userid>') . "<br/>";
  echo "            ";
  echo htmlspecialchars('<username>'.$Row->username.'');
  echo htmlspecialchars('</username>') . "<br/>";
  echo "            ";
  echo htmlspecialchars('<emailaddress>'.$Row->emailaddress.'');
  // echo htmlspecialchars('<emailaddress>"'.$Row->emailaddress.'"');
  echo htmlspecialchars('</emailaddress>') . "<br/>";
  echo "      ";
  echo htmlspecialchars('</person>') . "<br/>" ;
echo htmlspecialchars('</people>');
mysql_close($db_handle);
else {
print "Database NOT Found ";
mysql_close($db_handle);
?>
I tested the php file by typing http://192.168.56.101/testhtml.php in my web browser and I get the xml code expected. The problem is that I don't think Flex is actually connecting to the server.... I have noticed that when you create a new project you can select an application server type but I have no idea what to put for the web root and the root url (I picked php in the list of options for the server type).
My server is not hosted on my machine but on a virtual machine. Is there something I need to install on my server, and if yes, on which folder?
Your help would be greatly appreciated. I'm a newbie and have lots to learn and I have been stuck on this for a while now.
Thank you again,
supernous

Forget it. I'm an idiot.
I forgot to active the "Allow remote admin" setting again

Similar Messages

  • Flex mobile connect to remote secure server!!

    Hi guys
    I'm a beginner with flex mobile.
    i'm trying to create an appllication flex mobile. and i have to connect to remote secured server (apache) to get some services deployed.
    i did it and when i try with emulator from flash builderit's worked, a pop up window started to enter a login and password for connect to the remote server. it's okay, i get a result.
    but now when i try this application with my mobile phone, application launched correctly but i can't connect to remte server ( i dont have anythig like a popup to enter the login and pssword).
    i need your help.
    thanks

    Did you ever figure this out? I'm having the same issue.

  • Oracle 10.2 on AIX -- need to connect to remote SQL server by dblink

    oracle 10.2 on AIX -- need to connect to remote SQL server by dblink
    i didn't see a odbc diectory in our oracle home path. how do i know odbc driver is installed in the oracle on our AIX server.
    If it is there, do i just need to modify the odbc.ini and then the inithsodbc.ora, linster.ora, tnsnammes.ora files, or am I missing something
    Appreciate your response
    Edited by: user10876711 on May 12, 2011 9:18 AM
    Edited by: user10876711 on May 12, 2011 9:18 AM

    when you want to connect from Oracle to a SQl Server you need the Oracle Gateway (HSODBC or even better Dg4ODBC) and a FOREIGN ODBC DRIVER for your foreign database - a SQL Server ODBC driver. You have to get this driver from a 3rd party vendor - Oracle does not offer any foreign ODBC drivers.
    So before being able to use DG4ODBC/HSODBC you need to install from a 3rd paryt vendor a SQL Server ODBC driver. Commercial vendrs are for example Data Direct, Openlink or Easysoft.
    On Unix ODBC drivers commonly also require a driver manager. If the ODBC driver vendor does not ship one with the ODBC driver you can get it from www.unixodbc.org

  • Connecting from Office and Connecting from Remote

    Hello
    Can anyone tell me what is the difference between "Connecting from Office" and "Connecting from Remote" in the connection wizard ?
    Thank you in advance

    Hi Naldoo,
    Into installation of SAP BPC you are specifying for application server 3 names:
    Application Server Name
    External Application Server Name
    Virtual Name
    The third one is used in case if you are using NLB.
    The first one is the one using by "Connecting from Office"
    The second one is used by "Connecting outside of office"
    For this reason External name must be FQDN )Fully qualify name)
    Application Server name can be short name
    I hope this will help.
    Regards
    Sorin Radulescu

  • Php connection to remote mysql server

    Hi,
    I've stragne problem using php 4.3.10 with Sun One 6.1 on Solaris 9. The connection to a remote mysql server fail. I've correct grants in both servers and the php.ini is setting to permit no limit connection to databases. the code:
    $host='my-remote-server.com';
    $link1=mysql_connect($host,"bla","blabla");
    if$db1 = mysql_select_db("LOGIN",$link1);
    $link = mysql_connect("localhost","bla","blabla");
    $db = mysql_select_db("LOGIN",$link);
    The remote connection fail but the local one works. When i work with another server Sun One 6 in Solaris 8 , everthing work wonderfull with the same deffinitions, it can connect the remote databases but the others machines can't connect the solaris 8 machine. i think there is something wrong in the solaris 9 or/and sun one 6.1 deffinition it avoid remote connection. The problem i don't know what may be wrong, which setting may affect tcp connections from web application in solaris 9/sun one 6.1 plataform.

    we found the problem finally and may be useful for someone. Using the solaris 9 network snifer (snoop) we found that the default php timeout connection for mysql doesn't work ,this value is 60 in the php.ini . After 4 or 5 miliseconds php application closes the connection when it runs from the webserver , running from the shell it doesn't happen.The answer from the other server arrived after 20 or 30 milisecods then the connection to the databases fails. The solution is to put unlimited tiemout , mysql_connection_timeout=-1 then it success to connect the remote mysql server correctly. May be problem without timeout connection in case the other server doesn't answer, then application may wait forever or untill the system or webserver take out the application. I didn't check this posibilty, mainly i'm interesting the applications can work and write in the remote databases. If this definition cause problem as application waiting connection we always can try with another value greater than 60.

  • I can't get Flashbuilder 4.6 to connect to remote Linux server on port 80

    I'm using Flashbuilder 4.6 on a Mac (Snow Leopard). I have a new CentOS 6.2 Linux server with Apache webserver 2.2.21 on it, then installed GlassFish 3.1.1 application server on it, then installed mod_jk to connect Apache and Glassfish. Everything is installed on the same server. I verified that I can deploy an example war file (web application) in Glassfish and access it fine using either,
        mydomain.com:8080/mywebapp  (uses port 8080, which is direct connection to GlassFish)
        mydomain.com/mywebapp   (uses port 80, which enters Apache and passes through mod_jk to get to Glassfish)
    This works well (no errors in any logs files).
    Then I download BlazeDS from Adobe website, create a hello world application with it and deploy it in GlassFish. I next try to setup a new Flex Project in Flashbuilder 4.5. Using the wizard, I come to the section (under Server location) where I need to input a Root Folder and Root URL. Everything works fine when using a Root URL of http://mydomain.com:8080/mywebapp, meaning, I can click on the Validate Configuration button and Flashbuilder connects to the server.
    But if I enter in the Root URL input field http://mydomain.com/mywebapp, then Flashbuilder cannot connect to the server. I need to eventually close port 8080, so I need this solution, which uses port 80, to work.
    I made sure that the httpd.conf file VirtualHost section does include a `JkMount /mywebapp worker1` statement, and I can even look at the mod_jk.log file and see that Apache correctly opens a socket for mod_jk to communicate via AJP between Apache and GlassFish (with no errors or warnings) when the address `mydomain.com/mywebapp` appears on port 80. The GlassFish server.log file also shows no problems.
    I'm stumped what to do next. Does anyone have experience connecting GlassFish, mod_jk, Apache, and Blazeds (or LCDS, should be similar)? If so, do you see any differences in my setup compared to yours? I'm only trying to use RemoteObject (not messaging, or streaming, etc.) with Java POJOs.

    Hi!
    Thanks for the reply. No, my ISP isn't providing me with three IP addresses, just one static address. And the VDSL modem...not a router, but beyond that, don't know much about it. Do have a switching hub, however, a gigabit thing that so far is working great.
    Managed, somehow, to get everything working, however. Really don't know what I did. But I can now take the MBP off the wire and connect to the other Macs without turning on Airpot on those machines. Next step now is to take the MBP to another location and try to establish a connection to the home network via Desktop Transporter or Vine. That's the Holy Grail that will allow me to sever the cords that keep me from straying too far from home during working hours. Love to sit at that coffee shop across the park and do my work from there!

  • MDBs failed to connect to remote JMS server

    Hi,
              We currently have 2 clusters: one is a regular cluster (cluster1) and the other is JMS cluster (cluster2). Our JMS server and filestore are targeted to a migratable server in JMS cluster.
              In our weblogic-ejb-jar.xml, we added element <provider-url> to the <message-driven-descriptor> to allow JMS remote connection as follows:
              <weblogic-enterprise-bean>
                   <ejb-name>MyBean</ejb-name>
                   <message-driven-descriptor>
                        <destination-jndi-name>MyTopic</destination-jndi-name>
              <provider-url>t3://myhost:19009,myhost:19011</provider-url>
              <connection-factory-jndi-name>MyConnectionFactory</connection-factory-jn
              di-name>
                   </message-driven-descriptor>
              </weblogic-enterprise-bean>
              When we deployed our application, the Connection Status of MyBean showed "disconnected". I have tried different values (t3://myhost:19009;t3://myhost:19011) and
              (t3://myhost:19009) but got the same result.
              When I re-targeted the JMS server and filestore to a regular server (instead of migratable server), I was able to connect remotely. But because we want to be able to migrate our JMS server (auto and manually), I have to target it to a migratable server.
              I could not figure out why my MDBs failed to connect to a remote JMS server when it is targeted to a migratable server? Is there a restriction that we have to target to a regular server in order to connect remotely or I'm doing something wrong?
              Any help would be greatly appreciated.
              Thanks,
              Thao

    I'm using WL9.2 and my migratable server is actually up and running (is that what you mean about booted?).                    I meant checking your log files to make sure that the JMS server itself actually booted, not checking that the host WL server was up. (For example you should see INFO messages indicating that the JMS server has loaded "X" records from its persistent store).
              >>> Could you elaborate on the known problem?
              9.x MDBs have special code for enhanced handling of remote distributed destinations. I'm guessing that this code is somehow causing problems when the remote JMS server is migratable. I don't have enough information to elaborate further than that.
              >>> What else I can try?
              Beyond contacting customer support, I'm not sure.
              Tom

  • Can't connect to remote SQL Server 2014 Standard with VS 2012

    Hi all,
    I am trying to create a development environment using SQL Server 2014 (not Express).  The SQL server instance is on a Windows 8.1 Pro machine in a non-domain environment.  I have Visual Studio 2012 installed on the same machine which can connect
    to the SQL server instance without problems.  I have another machine with VS 2012 that cannot connect.  SQL server is configured for mixed authentication.  The SSDT on the remote machine can see the SQL server networked instance, but will not
    connect with SQL authentication. 
    I have rounded up all the usual suspects;
    - The SQL server service is running
    - Remote connections are enabled on SQL server and the relevant firewall ports are open.
    - TCP/IP and named pipes are enabled
    - Remote connections are enabled in Management Studio
    - SQL Server Browser service in enabled and running
    What am I missing?  I have been out of developer mode for a few years and all of the tools have changed, but I seem to be missing something obvious.
    Many thanks in advance,
    Tim
    Tim in Dublin

    Hello,
    Have you configured the Windows Firewall on the Visual Studio computer too? Is there any other security software on those
    2 computers?
    Can you ping between both computers by computer name? If not, try connecting using the IP address. For example:
    10.0.0.10,1433
    1433 is the default SQL Server port number.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to connect to remote sql server database?

    Hallo,
    I am a new member, so please excuse me if my questions are dummy.
    I am using CR2008 SP2 to make reports from sql server 2005 databases.
    Localy there is no connection problem and everything works perfect.
    I would like to establish a connection with a remote sql server 2005,
    but i am not familiar with remote data retriving. which driver should i use? static ip? vpn? server ports?
    Any answer will be really appreciated

    Hello,
    This is more a question for Microsoft to see what and how they support remote connections to databases. As long as you have the connection made CR will not have any problems. You may find it is slow so optimizing your queries is highly recommended. Passing a million records through your web connector is going to take time.....
    I've personally used a VPN connection and then set the ODBC or OLE DB connection info to my test server here at work and it worked fine. But they were small data sets.
    Thank you
    Don

  • Connecting to remote oracle server from asp

    Hi All
    How can I access remote oracle server from asp?. I'm using the following connection string.
    " Provider=MS Remote;Remote Provider=MSDAORA;Data Source=XYZ;Remote Server=http://DBServersIP;User Id=id;Password=pw"
    Both the web server and DB server has oracle client. I can tnsping, connect using sql * plus from the webserver.
    But when I try to do simple connection & query , I get the following error.
    " Microsoft ADO/RDS(0x80072EFD)
    Internet Client Error: Cannot Connect to Server.
    All the permission settings are given correctly (after referring Microsoft & Oracle websites)
    Can someone throw some links or help.?
    Your replies much appreciated.
    Thank you
    Arum

    why do you have http://DBServersIP as the remote server?
    Your connection string should look like:
    "Driver={Microsoft ODBC for Oracle};Server=MY_SID;Uid=my_user;Pwd=my_pwd;"
    There are other variations, but none of them should include HTTP anywhere.

  • Cannot connect to Remote SQL server

    Hi,
    I was able to connect to remote server before and it was working but since couple of days when I tried to connect it generates error.
    "The Target PrincipalCannot  name is incorrect.Cannot Generate SSPI context."
    Jibran Ishtiaq

    See
    [ForumFAQ]How to troubleshoot error "SSPI handshake
    failed with error code 0x80090324
    A simple reason can be, that your local clock differens more then 5 min from the Server clock.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Connection to remote archive server fails!

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin-top:0cm;
    mso-para-margin-right:0cm;
    mso-para-margin-bottom:10.0pt;
    mso-para-margin-left:0cm;
    line-height:115%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Hello.
    Sometimes, I receive this message from archiver.mars...
    CS-MARS appliance cannot connect to the remote archive server that is set up for archiving the configuration and event data.
    Please verify that the connection of the archive server at IP: 'X.X.X.X' to the CS-MARS appliance is OK and CS-MARS appliance has the write permission to the exported path: '/' on the archive server!
    CS-MARS is running software version 6.0.6 and data archiving via SFTP.
    From GUI, data archiving status is running, archiving service enabled and remote server available.
    SFTP server log shows, at the same time, this entry
    02/16/2010 04:00:44 PM: [FAIL] Unknown global request [email protected] received
    02/16/2010 04:00:44 PM: [NOTE] Connection from X.X.X.X disconnected
    All suggestions are appreciated.
    Regards.
    Andrea

    If you are getting connection refused, either the server isn't listening on the port you have specified or there is a firewall intervening.
    Can you connect to the database using any other MSSQL client tools (query analyzer for instance?) If so, make sure the setting you have there are the same in sqldeveloper.

  • Each morning I get a notice to download a Firefox security update. When I click install, I get a message saying Installing Firefox and Connecting to the update server. It never connects; the progress bar just spins all day.

    Since shortly after installing Firefo 5 I get this message every time I start Firefox. A dialog box comes up that says Installing Firefox, followed by a spinning progress bar, followed by "connecting to the update server." It never progresses past this point and will stay this way indefinitely until I close the Window.
    Also since installing Firefox 5, the program crashes at least once or twice a day and I have to quit and restart. Don't know if there's any relationship between the two issues.

    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox

  • I got a message that I should download an upgrade to Firefox 3.6.16. So I hit the download button and it said "Downloading the update" and "Connecting to the udate server". And it gets stuck there. How can I get past it?

    I have an iMac OS 10.4. I downloaded Firefox a while ago and I had no real problems with it. Then I got this message that I should update Firefox to 3.6.16. So I hit the "Download" button and I get the "Software Update" which says "Downloading the update" with a progress bar and below it , it says "Connecting to the download server". But it gets stuck there. The progress bar has gone to the end of bar. How can I get hooked up to the Update server?

    That is because that Firefox 3.6.x version has been released later than the Firefox 4 version.
    If you have problems with updating then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Firefox 3.6.x: http://www.mozilla.com/en-US/firefox/all-older.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Question regrading uploading file on Flex and reading the on Java server

    Hello
    I am using Java on the server side and i am uploading a file using file reference on the client side using adobe flex 3 and passing it to the server side using http post and i am having trouble saving the file to database. I am also using hibernate, springframework, Jboss server and Mysql 5 database this is my flex code. I know for a fact that it is hitting the servlet page so i am just can't read the file.
    private function startUpload():void
                        if (_arrUploadFiles.length > 0) {
                             disableUI();
                             listFiles.selectedIndex = _numCurrentUpload;
                             scrollFiles();
                             var sendVars:URLVariables = new URLVariables();
                             sendVars.action = "upload";
                             var request:URLRequest = new URLRequest();
                             request.data = sendVars;
                        request.url = _strUploadUrl;
                        request.method = URLRequestMethod.POST;
                        _refUploadFile = new FileReference();
                        _refUploadFile = listFiles.selectedItem.file;
                        _refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
                             _refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
                        refUploadFile.addEventListener(IOErrorEvent.IOERROR, onUploadIoError);
                             refUploadFile.addEventListener(SecurityErrorEvent.SECURITYERROR, onUploadSecurityError);
                        _refUploadFile.upload(request, "file", false);
    This is my java code and i have tried so many different ways of getting this file but have hit a brick wall and i have no other ideas
    package com.file.exchange.service;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    import java.io.*;
    import java.sql.Blob;
    import com.file.exchange.vo.Files;
    import java.util.Date;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.io.File;
    import java.util.Enumeration;
    public class FileUpload extends FileBaseService
         private static final String CONTENT_TYPE = "text/xml; charset=utf-8";
         @Override
         protected String getXmlFromOperation(HttpServletRequest request,HttpServletResponse response) throws Exception
              //ServletOutputStream servletOutputStream = response.getOutputStream();
              //Object fileObject = new Object(response.getOutputStream().);
              //InputStream is = new InputStream() ;
              //InputStreamReader input = new InputStreamReader(request.getInputStream());
              //BufferedReader buffer = new BufferedReader(input);
              DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
              Date date = new Date();
              String data = "hello world";
              String id = "1";//getCharacterDataFromElement(vID);
              String name = String.valueOf(request.getAttributeNames());//getCharacterDataFromElement(vname);
              String type = ".txt";//getCharacterDataFromElement(vtype);
              String size = "5555";//Long.toString(fileObject.length());//getCharacterDataFromElement(vsize);
              Blob content = org.hibernate.Hibernate.createBlob(data.getBytes());//fisFile);//data.getbytes[]
              String date_uploaded = dateFormat.format(date);
              Files file = getFileDao().uploadFile(Integer.parseInt(id), name, type, Integer.parseInt(size), content, date_uploaded);
              return file.toXml();
    }

    You need to parse the request as multipart/form-data.
    Maybe [http://commons.apache.org/fileupload/|http://commons.apache.org/fileupload/] can help.

Maybe you are looking for

  • Voicemail access number?

    When I try to find out the number I need to call to access my voicemail at this address http://www6.verizon.com/vmlookup/vmlookup.asp I get this  No web site is configured at this address. Any other ways to find out the number?

  • Ipod Touch no longer giving me 'repeat' option

    I downloaded the new software update and since then I have not been able to repeat songs. The bar at the top of the screen is not there (the one with the scrubbing bar and the repeat, genius and shuffle buttons) I have performed a soft reset (this is

  • External hard drive to make space on desktop computer

    I have just recently backed up my entire hard drive to an external "My Book". I'd like to delete photos from the desktop computer to free up space, but don't know if I'll loose them on the "my book" too. As I understand time machine, it will allow me

  • How to Monitoring Index process by Dynamo?

    Hello all, how can i monitor the build index process by Dynamo? i'm using ATG Search 10.0.3 Tks regards

  • IPhoto keeps crashing when trying to burn disc

    I am trying to burn a cd of pictures (500 mb) and everytime I try to burn iPhoto crashes. It select the pictures, it recognizes the disc, the size is fine and then it crashes. I have a powerbook G4 with 1 gig RAM. I am using iPhoto 5