Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 494967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:32:55+00:00 2026-05-13T05:32:55+00:00

Hoping someone can shed some light on this. I have a PHP program which

  • 0

Hoping someone can shed some light on this.

I have a PHP program which opens a port and sends some text to a java program listening on that port. Basically, there could be many instances of this PHP program connecting over this port to this one java program. The java program contacts an API, retrieves the answer, and then sends the information back over the port to the PHP program.

This solution seems to work but sometimes I get a empty response in my PHP program. The java program runs run successfully but the answer string is not transmitted back through the port to the php program.

Does this solution sound valid? Will I ever have an instance where the java program will send back the wrong information to the PHP program? Can anyone see any problems here? Thanks a bunch!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:32:55+00:00Added an answer on May 13, 2026 at 5:32 am

    “Opens a port” is ambiguous, I’m going to assume you mean “opens a TCP connection”.

    There’s no reason that the scheme you outlined cannot work, but you haven’t provided enough information to narrow down the cause of the problem you’re having.

    When your PHP script gets an empty response from your Java code, it could be because the connection was broken, but it’s more likely that the code on one end or the other has a bug. Make sure you’re testing all the result values for errors.

    If you need help finding the problem, you will need to post more specifics, ideally the smallest example of real code (for both ends of the connection) you can get to exhibit the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hoping someone can provide an answer with this, although it's not 100% programming related.
I'm hoping someone can clarify this behavior for me, and explain how ASP.NET is
As a follow-up to this question I am hoping someone can help with the
I'm hoping someone has seen this before because I can't for the life of
I have this problem I'm hoping someone knows the answer to. I have an
I got a little stuck and I'm hoping someone can point me in the
I've run into a really strange bug, that I'm hoping someone can explain. I
I've never been much for math and I'm hoping that someone can help me
I was hoping someone could validate my assumptions before I recommend that my client
The print functionality of Excel (using VBA) is extremely slow. I'm hoping someone has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.