GeeCON Prague 2014*
The moose likes Sockets and Internet Protocols and the fly likes Java Server, PHP client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java Server, PHP client" Watch "Java Server, PHP client" New topic
Author

Java Server, PHP client

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

The Java Server is up and running. It is on one of my open ports (set on my router). It is also not blocked by the firewall (it is white listed). This happens if it is on the webpage : The PHP client just times out and does not successfully connect to the server. I see this message after 30 seconds : "Connection timed out". If I run it in BASH (Linux command line), it works :

It's at least working on the desktop, so I assume it has something to do with PHP and not Java at all. I could be wrong, so I will leave this up for the time being.

Server.java


If you guys could know PHP, please look for the disconnect between the programs :
HTML File :

PHP File :


I have posted this at http://www.phphelp.com/forum/index.php/topic,15294.0.html


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

I also tried the following :

It worked 100% on the desktop, but timed out on the server.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

There was absolutely nothing wrong with the code. It was because of the hosting service I was using. I set up an Apache server on my computer and it work 100% now.


Topic discussed and solved at :
http://www.phphelp.com/forum/index.php/topic,15294.0.html
 
GeeCON Prague 2014
 
subject: Java Server, PHP client