2
votes

This error has been faced by many people, as seen via internet, but none of the solutions given worked for me.

Problem:
I have a flex application which I am trying to run on a Linux machine. On Ubuntu, it works fine but on Fedora following error arises when a login button is clicked.

text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. 

Details:
Login button actually sends username and password entered by a user to a server deployed on same machine via HTTPService. That HTTPService actually sends data to db_mgmt.php on the server which takes care of authorization of the user by querying mysql database deployed on same machine. I am accessing db_mgmt.php in my code as:

_httpS.url= "utils/" + db_mgmt.php;

Point here is that I am accessing it via localhost. So I guess, I don't need crossdomain.xml.

Machines Information:

  • Machine on which App is not working:

    Linux Distro: Fedora
    IP: 192.168.1.115
    App Path: /var/www/html/flexApp.
    Owner: david:david
    Permissions: 755
    (I have tried setting permissions to 777 and owner to apache:apache just for testing but that din work either. Btw 'apache' is the user name running Apache/httpd on Fedora.)

  • Machine on which App is working fine:

    Linux Distro: Ubuntu
    IP: 192.168.1.113
    App Path: /var/www/flexApp.
    Owner: mark:mark
    Permissions: 755.

Problem seems not related to the Flash Player version:
I am accessing both machines from a third machine via firefox browser. Ubuntu one works fine. Fedora one returns the error mentioned. Point here is that this problem is not related to the FlashPlayer version I have in my third machine's firefox browser. Had it been the case, same problem should have popped up with the Ubuntu machine. (Note: same problem occurs in Chrome and Internet Explorer)

Problem is not because of incorrect path:
I can access following path fine. No problem occurs. And I get output from the file db_mgmt.php on both machines:

Fedora: http://192.168.1.115/flexApp/utils/db_mgmt.php
Ubuntu: http://192.168.1.113/flexApp/utils/db_mgmt.php

Where do I think the problem can be?
Well, after going through a lot of forums about this problem and trying the solutions given (with unsuccessful results), only thing i can think of is that some thing is wrong with the permissions of my files on Fedora server. HTTPService on Fedora machine is unable to access db_mgmt.php. But I don't know how can I be sure of it or what can be its solution. Do I need to make some changes to the settings of apache on Fedora machine?

I have to have run this app on Fedora for some other reasons. Hope to find a solution here. :)

Thanks.

Update:
Here is the whole dump of the error message:

(mx.messaging.messages::ErrorMessage)#0
body=""
cliendId = "DirectHTTPChannel0"
correlationId= "CD7D67A8-1AD1-5C89-331B-
07B7E51BC3A0"
  destination = ""
  extendedData = (null)
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"]. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
  faultString = "HTTP request error"
  headers = (Object)#1
    DSStatusCode = 500
  messageId = "5D10EE4D-BFA5-201E-EABE-07B7E550F727"
  rootCause = (flash.events::IOErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = ""
      dataFormat = "text"
    errorID = 0
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2032: Stream Error. URL: http://192.168.1.115/flexApp/utils/db_mgmt.php"
    type = "ioError"
  timestamp = 0
1
have you tried passing the absolute hard-coded path to _httpS.url ?AsTheWormTurns
Yes. Same error with using absolute hard-coded path. :-/Usman
I was wrong. db_mgmt.php wasn't displaying right information from database rather it wasn't displaying anything from database. I mistakenly thought that the output getting displayed was from DB. Installing php-mysql solved the problem. Man! I wasted so much time on this. Anyways, thank you. :)Usman

1 Answers

1
votes

First guess: your SELinux mandatory access control configuration isn't correctly set for your application. Fedora ships with SELinux and Ubuntu ships with AppArmor, so the MAC frameworks you're using are vastly different on the different systems.

Check your /var/log/audit/audit.log or /var/log/messages for avc:denied messages. See the Fedora SELinux FAQ for suggestions on how to really work with SELinux properly. Just a guess that the security context of your db_mgmt.php might not be properly set. Check ls -Z output on the db_mgmt.php file and compare it against other working PHP scripts -- perhaps you just need to update the security context to something the PHP interpreter domain can access.

Second guess: your server isn't configured to listen on the publicly accessible IP address 192.168.1.115 on the Fedora machine. Check netstat -anp output to make sure that the web server serving your application is listening to 0.0.0.0:80, not 127.0.0.1:80.

Third guess: See if any applications allow you to communicate "locally" via the hardware interface's address. (Check ssh 192.168.1.115 against ssh 127.0.0.1 and make sure both work. See /proc/sys/net/ipv4/conf/*/accept_local documentation in the Linux kernel source Documentation/networking/ip-sysctl.txt.)