Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by kevinseligmann · Mar 15, 2012 at 08:47 PM · standalonephpwwwformhost

WWWform 'couldn't connect to host' on Standalone player

Hi people, I've been developing an interactive application at work, using a login system via php. I've setted up an Apache server on my machine, and the application works flawlessly. EXCEPT, when we try the app on other pc.

The logic is very simple, I send variables to a php script hosted internally, the php makes all the transactions with the Mysql database and print's the results. Easy.

The problem is, that no matter if I set a local Apache server (Which can be accessed via lan), or a server with a public domain, when I make a STANDALONE exe for my application, it doesn't connect.

At first, the php url was like http://192.168.1.13:8080/dev/unity/login.php , but when I noticed that other pc's couldn't connect to it VIA unity, I set it up on a public server like http://kevinseligmann.com.ar/dev/unity/login.php

The problem is the same, through unity editor it connects, but when making a standalone (NOT WEBPLAYER) it doesn't.

Here's my code:

 function doLogin() {
     var sHash = Md5Sum(strUsername+strPassword+sYourID);
     var tURL = sURL;
     tURL=tURL+"?mdwCMD=loginRequest";
     tURL=tURL+"&user="+strUsername;
     tURL=tURL+"&pass="+strPassword;
     tURL=tURL+"&md5="+sHash;
     var rLogin = WWW(tURL);
     yield rLogin;
     switch(rLogin.text) {
         case "loginTrue":
             Application.LoadLevel (1);
             break;
         case "loginFalse":
             sLoginStatus = "Login Status: Failed, Please Try Again";
             yield WaitForSeconds(3);
             sLoginStatus = "";
             break;
     };
 }

I also tried a simpler script, like:

 function debugLogin(){
     var w:WWW = new WWW (sURL);
     yield w;
     Debug.Log (w.text);
 }


But on the output log of the standalone player, it clearly says "Couldn't connect to host".

So, anyone has any idea what this can be? Thanks in advance for your help.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by kevinseligmann · Apr 17, 2012 at 10:00 PM

It had to do with the Crossdomain.xml file on the server. Never forget to put it as you will have the same problem!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

WWW Class is acting up 1 Answer

Is there a maximimun number of fields for WWWForm.AddField? 1 Answer

Retrieving varibale values from a php script? 1 Answer

seperate binary retrieved from sql server 1 Answer

Send an integer array through WWWForm 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges