简体   繁体   中英

Apache / PHP Unable to communicate with Tomcat JavaBridge

My project uses PHP JavaBridge, I have installed WAMP, JRE 6.0, and Tomcat 6.0.32 I can now access http://localhost:8080/ successfully but when I run my PHP site it gives me the following error

warning: fsockopen() [function.fsockopen]: unable to connect to localhost:8080 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )

Can anyone please help me with this issue?

EDIT

Forgot to mention that I am using Windows 7

My comment above worked as a solution and hence this answer, so that in future others get it.

Can you 127.0.0.1:8080 instead of localhost:8080? See what do you get?

fsocketopen takes the hostname and it should be a valid domain, in your case, (in general) it could be a valid domain as long as you have an entry for localhost in your hosts file (C:\\Windows\\System 32\\drivers\\etc\\hosts) . See if you have something similar to that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM