Chat in AJAX

Discussion in 'Javascript' started by Gandalf, May 28, 2007.

  1. Gandalf

    Gandalf Guest

    I wrote a chat width AJAX.
    In my home wampserver apache it works just fine.

    The problem starts when I trying to upload the chat in to my real
    server. The chat prints error 403 in places which it should print the
    http request. Like I don't have permissions in these pages.

    there two things I should mark
    1.I did let permissions to write and execute (chmod) my chat files.
    2. My home server php version is 5.3 and my distant server php version
    is 4.3 .

    That is my home server link which works
    http://85.250.226.88/chat/

    That is my distant server link with the problem
    http://kaze.co.il/chat_index.php

    Most of the page is in hebrew.
    The problem starts usually when trying to create a privet conversation
    width one of the other users.

    Thanks for everyone
    Gandalf, May 28, 2007
    #1
    1. Advertising

  2. Gandalf

    -Lost Guest

    Gandalf wrote:
    > I wrote a chat width AJAX.
    > In my home wampserver apache it works just fine.


    Then you need to specify what is different between your home and remote
    servers.

    (Not below, I mean figure all differences out yourself and work through
    them.)

    > The problem starts when I trying to upload the chat in to my real
    > server. The chat prints error 403 in places which it should print the
    > http request. Like I don't have permissions in these pages.


    That is specifically a server error. Which means Apache says you do not
    have access to those pages (that are being requested).

    > there two things I should mark
    > 1.I did let permissions to write and execute (chmod) my chat files.
    > 2. My home server php version is 5.3 and my distant server php version
    > is 4.3 .


    Neither of which is a JavaScript problem, but instead a file permissions
    and PHP problem.

    > That is my home server link which works
    > http://85.250.226.88/chat/
    >
    > That is my distant server link with the problem
    > http://kaze.co.il/chat_index.php


    I attempted to see if there were any JavaScript errors. Yet you have
    requests firing every 200ms or so. This made me shut the page
    immediately. If there is truly a JavaScript problem, make the refresh
    rate significantly lower, kind of like a debug mode and all requests
    fire every five to ten seconds.

    > Most of the page is in hebrew.
    > The problem starts usually when trying to create a privet conversation
    > width one of the other users.


    I do not speak Hebrew, nor understand it well enough to understand how
    to initiate a private conversation.

    I did however, create a nickname, join a chat "room" and then noticed
    nothing I typed in got sent to the server.

    I would have watched the requests that were made as well, but like I
    said, firing them five to six times per second made it hard for me to
    follow.

    --
    -Lost
    Remove the extra words to reply by e-mail. Don't e-mail me. I am
    kidding. No I am not.
    -Lost, May 29, 2007
    #2
    1. Advertising

  3. Gandalf

    rf Guest

    "Gandalf" <> wrote in message
    news:...

    >I wrote a chat width AJAX.


    Crikey, re-write it will you mate!

    After -Lost made a response to your post I dived in for a look.

    I let it run for exactly 20 seconds. During that time it used up 100KB of my
    bandwidth. That is 5K of data per second. Outrageous.

    I pay many dollars per month for my bandwidth, and my cap is 1GB per month.
    Over that I pay twenty cents per megabyte.

    <does sums> If I were to have your page simply sitting on my browser for
    just 10 minutes your page would use up my bandwidth allocation for the
    entire day.

    And that is just me. What about your end. Lets say you have 10 people
    online. That is 50K per second out of your bandwidth. 175MB per hour. Four
    and a quarter gigabytes per day. 123 gigabytes per month. I hope you have an
    "unlimited" hosting plan :)

    --
    Richard.
    rf, May 29, 2007
    #3
  4. Gandalf

    Gandalf Guest

    On May 29, 11:58 am, "rf" <> wrote:
    > "Gandalf" <> wrote in message
    >
    > news:...
    >
    > >I wrote a chat width AJAX.

    >
    > Crikey, re-write it will you mate!
    >
    > After -Lost made a response to your post I dived in for a look.
    >
    > I let it run for exactly 20 seconds. During that time it used up 100KB of my
    > bandwidth. That is 5K of data per second. Outrageous.
    >
    > I pay many dollars per month for my bandwidth, and my cap is 1GB per month.
    > Over that I pay twenty cents per megabyte.
    >
    > <does sums> If I were to have your page simply sitting on my browser for
    > just 10 minutes your page would use up my bandwidth allocation for the
    > entire day.
    >
    > And that is just me. What about your end. Lets say you have 10 people
    > online. That is 50K per second out of your bandwidth. 175MB per hour. Four
    > and a quarter gigabytes per day. 123 gigabytes per month. I hope you have an
    > "unlimited" hosting plan :)
    >
    > --
    > Richard.


    Where do you live, mate?
    I never heard of it.
    In Israel it doesn't work like that at all.
    Until this day I never thought anyone pays for bandwidth. Otherwise I
    would owe my Internet company milions of dolars :) (my emule works
    most of the day ).
    Gandalf, May 29, 2007
    #4
  5. Gandalf

    Darko Guest

    On May 29, 12:35 pm, Gandalf <> wrote:
    > On May 29, 11:58 am, "rf" <> wrote:
    >
    >
    >
    > > "Gandalf" <> wrote in message

    >
    > >news:...

    >
    > > >I wrote a chat width AJAX.

    >
    > > Crikey, re-write it will you mate!

    >
    > > After -Lost made a response to your post I dived in for a look.

    >
    > > I let it run for exactly 20 seconds. During that time it used up 100KB of my
    > > bandwidth. That is 5K of data per second. Outrageous.

    >
    > > I pay many dollars per month for my bandwidth, and my cap is 1GB per month.
    > > Over that I pay twenty cents per megabyte.

    >
    > > <does sums> If I were to have your page simply sitting on my browser for
    > > just 10 minutes your page would use up my bandwidth allocation for the
    > > entire day.

    >
    > > And that is just me. What about your end. Lets say you have 10 people
    > > online. That is 50K per second out of your bandwidth. 175MB per hour. Four
    > > and a quarter gigabytes per day. 123 gigabytes per month. I hope you have an
    > > "unlimited" hosting plan :)

    >
    > > --
    > > Richard.

    >
    > Where do you live, mate?
    > I never heard of it.
    > In Israel it doesn't work like that at all.
    > Until this day I never thought anyone pays for bandwidth. Otherwise I
    > would owe my Internet company milions of dolars :) (my emule works
    > most of the day ).


    Richard is right. If you plan to make something useful, that doesn't
    just squander one's bandwidth (maybe in Israel it's not like that, but
    in פלשתינה it might be ;-) ), you shouldconsider making some kind of
    connection-based protocol. For example, I am right now in the middle
    of a project that serves similar purpose - I am making as part of the
    site I am on a module that serves the purpose of "live" betting - the
    page should be dynamically updated as soon as quotas or conditions for
    bets change in the database. So I made a daemon (am making, as a
    matter of fact) sitting on the server that keeps connections from Ajax
    on the clients, and gives them information just in the moment when
    something changes. You could make something like that too - broadcast
    messages only when someone says something. Of course, you can't rely
    on the Apache server, since it usually has some kind of time limit for
    one request, so you have to write your own server, but that's pretty
    trivial, you can even write it in PHP, if you're not familiar with c/c+
    +/Java, although I would recommend C++. Of course, all of this if you
    want to spend more time for this and you want to make quality chat. If
    you need support for this, you can ask here or at comp.lang.c++ or
    comp.lang.c or comp.unix.programming...
    Darko, May 29, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    2,181
  2. Replies:
    0
    Views:
    550
  3. minnie
    Replies:
    1
    Views:
    672
    Andrew Thompson
    Dec 13, 2006
  4. Tem

    ajax web chat

    Tem, Dec 6, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    450
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Dec 10, 2007
  5. Replies:
    1
    Views:
    132
    Tom Cole
    Sep 17, 2006
Loading...

Share This Page