WWW -> localhost -> can resolve host: http:;

Hi all,

I have setup on my computer a mysql + php scripts so as to fetch from db some values…

In unity I am trying to use the WWW class with a url “__*http://local/myserver/script.php?id=1*__
but I get the following error can not resolve host: http:;

any idea whats happening?

The apache mysql are running …

First of all check the script to see if is working in a browser. I have a hunch that your link should be http://localhost/myserver/script.php?id=1, then check to see if you respected this http://unity3d.com/support/documentation/Manual/Security%20Sandbox.html

yes u r right the link is http://localhost/myserver/script.php?id=1
and by mistake i wrote local also its working fine from the web browser…

any hint why it doesnt work from unity ?

has your webserver the crossdomain.xml installed at localhost?

I’m not sure localhost works at all on webplayers, as they never have a reason to access localhosts actually. don’t forget they run on the end user machine, not the server and localhost in this case would be the end user machine too where your service isn’t running for near granted.

The crossdomain.xml is there (localhost) the problem remains …
I also tried instead of localhost to put the local IP http://192.168.103.3/… but nothing change.

Finally I am not sure about your latest statement:

Isnt my user machine (Editor) granted ?

for your machine it naturally isn’t true but I talk about what comes out at the end, not during development on your machine :slight_smile:

For the editor there are special restrictions (and I at times get the feeling special problems) when it comes to the web sercurity emulation.