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 8587131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:29:33+00:00 2026-06-11T22:29:33+00:00

I am using : socket.io: ~0.9.10 I am running into this issue when I

  • 0

I am using :
“socket.io”: “~0.9.10”

I am running into this issue when I go to my apache webserver hosted client.html page hosted on port 80:

XMLHttpRequest cannot load http://localhost:5000/socket.io/1/?t=1348624895534. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

I am running SocketIO on my serverside to be on port 5000 as shown below:

io = io.listen(5000);
io.set("origins","*");

However, everytime I load my apache client.html page, I see in my SocketIO server console:

warn: illegal origin: http://localhost

How do I get rid of this issue?

  • 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-06-11T22:29:34+00:00Added an answer on June 11, 2026 at 10:29 pm

    You are doing CORS.

    The error you are getting comes from the fact that Socket.IO seems to be using XHR rather that Websockets. This is what socket.IO does when websockets are not available it uses another protocol, FlashSockets, XHR-polling… etc.

    You need to set a header on you apache server to allow a query to be made to another website, here your Socket.io server.

    Here is a how to.

    It would be a lot simpler for you if you just used only one server.
    You could use Express to deliver the static html file. Here is a demo/tutorial app to get started easily with Socket.IO + Express.

    This demo is a boiler plate to push on dotCloud, so if you want to painlessly deploy, follow those instructions.

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

Sidebar

Related Questions

I'm not sure if this is a known issue that I am running into,
I'm running into a problem while running both a Flash socket and using Ajax
I have a program in C++, using the standard socket API, running on Ubuntu
I've been using socket.io with node.js and came across Nowjs , it seems this
I have Android client app that communicates with server using Socket . On my
I have a application in which I am using socket programming , having this(image)
I'm writting a client using socket to receive EEG data from a recording PC
I've been using RMI in this project for a while. I've gotten the client
I'm running into a little trouble with MySQL Workbench. This is the situation, I'm
I'm running into a strange issue trying to use ByteArrays to send an object

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.