i have created a new Facebook application and i used the following url as canvas url http://localhost/my_app/
my code works perfectly on localhost, but when i try to cal my application using the following url : apps.facebook.com/leenaaps its displays the following error:
Unable to connect
Firefox can't establish a connection to the server at localhost
what could be the problem exactly?
You most likely do not have a local webserver running. If you do, it might be possible that Facebook uses https:// but you did not configure/enable SSL.
localhost is resolved to ip 127.0.0.1 and this is the local loopback address whcih means it is not routable and cannot be accessed from the internet, So you cannot use it in your canvas url.
You have to use a valid and active domain name like domain.com. If you don't have a public web server you may use some DDNS service, google it some are free
Related
i am trying to connect my site from others computers on local network. I can access the site from my system IP address but issue is this when i entered the username and password it will redirect the page from 192.168.0.2/ppp/login to localhost/ppp/auth/login and shows thee error localhost refused to connect.
localhost usually points to 127.0.0.1 . So, if you are getting redirected to localhost/login/ppp then the issue with your site's code. Don't redirect to http://localhost/login/ppp. Just do a redirect to /login/ppp instead.
The reason connection is refused is because the other PC doesn't have XAMPP (or any other web server) running on it.
your only need to change the config.php file in controllers. write your IP instead of localhost. Your code will run properly on network.
I created a simple android application (With MySQL database connectivity logic in php) to register a new contact. When I ran the application to the emulator (using localhost IP Address as 10.0.2.2), it was working fine. Now I want to test it on my device and I am facing connectivity issue of localhost
what should I do??
Here is my code:
#Override
protected String doInBackground(String... params) {
String reg_url="http://10.0.2.2/mobile/register.php";
String login_url="http://10.0.2.2/mobile/login.php";
}
Thanks in advance
First, make sure both your server and your device can establish a connection between each other (either they are in the same network, or the server is publicly accessible).
Then, check your server's IP address and get the port your server is running on. Use those when you establish a connection from your real device. The URL should look something like this: http://<server IP address>:<server port>/mobile/register.php.
You should look into adb reverse port forwarding. So, lets say you want your mobile's localhost:8888 to point to your local machine's localhost:8888, you can acheive it by using the following adb command:
adb reverse tcp:8888 tcp:8888
First parameter refers to the port on the device and the second on your computer.
adb reverse allows you to forward ports from your device to your host.
Let me know if you have any doubts.
Refer to the following link for more info:
http://www.codeka.com.au/blog/2014/11/connecting-from-your-android-device-to-your-host-computer-via-adb
I think that the connection is established ,when i write my adresse IP from the phone i get the wamp Localhost[1]
but when i run the application and enter the user s name and password i get this
(I think that is the description of the file login.php) [2]
http://i.stack.imgur.com/jSXXP.jpg // [1]
http://i.stack.imgur.com/cP8PB.jpg //[2]
i use this line to call the script php : String login_url="http://192.168.1.103:80/mobile/login.php";
I can access my wamp server via localhost in my system (port :8080), but not with public ip.
But then again when i try to access my wamp from other networks via public ip, yes i can get in.
The error i receive is "ERR_CONNECTION_REFUSED" it says that connect is rejected.
I have configured everything correctly, yes i have the apache config file set to allow all.
any clue?
Take a look at this. LINK
It could be NAT loopback that causes this for you
There is a Rapla event planner running at my work. It is set to be accessible only from computers in our office, though (IP check?). I needed to have an access also from my home, but the administrator won't reconfigure Rapla. However, I have an sftp account at the server (which is the same as the one where Rapla is running - same IP addressess; this server is accessible from Internet at browser's port 80, since we have our homepage running there).
I figured out, that I can upload Glype proxy script to my acoount and run it like this from any IP address: www.mycompany-domain.com/myfolder/glype/index.php. It really works and redirects me to a lot of websites, while showing my company server's IP. However, when I try to connect to a 8051 port (Rapla's port) through Glype, I get the cURL error:
The requested resource could not be loaded. libcurl returned the
error: Failed to connect to /here goes the IP/: Permission denied
Later on, I found a script called Glypeahead, which, according to the author, should fix this issue. I wasn't able to find any info how to use it and being myself just an amateur programmer, I am stuck at this moment.
So, my question is the following: how can I connect, using Glype, to Rapla's port 8051? I am open to any non-Glype solution too :-).
I have setup WAMP on my computer and have created a PHP web service which is located at this URL
http://localhost/WebService/?mode=get
I am using Android Studio and running the project on my Nexus 5 phone. Both the development computer and my phone are connected to the same wifi network.
When I try and call that URL from the application I get an error:
Caused by: java.net.ConnectException: failed to connect to /127.0.0.1 (port 80): connect failed: ECONNREFUSED (Connection refused)
In my manifest I have the internet permission.
How can I access a local web service from my attached phone for dev/debug?
Emulator uses a special ip address to access the host machine local host. Use this link
http://10.0.2.2/WebService/?mode=get
In some cases you might have to assign a port other than default.
Check your URL from your emulator or from the device... if you are not able to access it, Find the right url....
Open command prompt->type ipconfig-> Get IPV4 address.... something like 192.xx...
So your URL is "http://192.xx.xx.xx/WebService/?mode=get"
To access your local host from your android emulator Use the ip address given in ipconfig.
It might be best to use
machine_name.local
as the host name, as your server/computer could change IP address if you are using DHCP