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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:43:08+00:00 2026-06-07T03:43:08+00:00

i know there’s been couple of question about the same problem , i’ve already

  • 0

i know there’s been couple of question about the same problem , i’ve already check them .

i have very simple node.js chat app

i have a server running on 8000 port and it works fine

my client pages are html , they are running on apache and i’m using socket.io to connect them to the server and it works fine on the local host

but when i upload the app on the server i keep on getting this error in the firebug

io is not defined
var socket = io.connect('http://atenak.com:8000/');

or sometimes it doesn’t show that but when i try to broadcast message from cliend i get this error :

socket is undefined
socket.emit('msg', { data: msg , user:'max' });

the only difference is i’ve changed the localhost with atenak.com !

here is my html code

var socket = io.connect('http://atenak.com:8000/');
    var user = 'jack';
  socket.on('newmsg', function (data) {
       if(data.user == user )
       {
           $('#container').html(data.data);
       }
  });

     function brodcast(){
           var msg = $('#fild').val();
          socket.emit('msg', { data: msg , user:'max' });
      }

</script>
</head>
<body>
<div id="container">  </div>
   <input id="fild"  type="text">  <input name="" type="button" onClick="brodcast();">

</body> 

i have included the sockt.io.js

src="http://atenak.com:8000/socket.io/socket.io.js"

and server is running ok which means socket.io is installed on the server

here is the live page

http://atenak.com/client.html
  • 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-07T03:43:09+00:00Added an answer on June 7, 2026 at 3:43 am

    I’m getting:

    > Uncaught ReferenceError: io is not defined client.html:7
    x GET http://atenak.com:8000/socket.io/socket.io.js 
    

    indicating that your page cannot load http://atenak.com:8000/socket.io/socket.io.js; indeed, if you try to load that URL in the browser, you get a connection error. Make sure that your Node.js server (running Socket.IO) is accessible (e.g. ports not being blocked by a firewall, etc).

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

Sidebar

Related Questions

I know there are already similar question, but none of them could solve my
I know there have been many questions on grid and pack in the past
I know there is a wiki page about it , but since I'm very
I know there are similar questions already on SO but none of them seem
I know there have been similar questions posted but I think the issue I'm
I know there are lots of stack overflow posts about this. I have this
I know there are several topics out there about this, but none of them
I know there are many questions about this but none of them helped my
I know there are many threads that talk about this problem but I don't
I know there have been quite a few posts on this but none seem

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.