Jump to content
  • 0

antmedia and CGI with AJAX

Ray Jender


Ubuntu 18.04
antmedia community version

So I am experimenting with running a CGI via an AJAX process.

The CGI is a perl script with code to update a mysql database. 
The perl scripts works fine in stand alone mode when I execute it
from a console.

Now I want to send a variable to the perl script.  Here is what I
am using in the index.html, upon entering the  function startPublishing():

I use javascript to generate a random value and then I want to send it to
the perl script.  The perl script should update a database.

var myURL = 'https://localhost:5443/WebRTCApp/WEB-INF/cgi/connDB.cgi?streamID=' + streamId ;

In the browser console I am seeing this:

XHR failed loading: POST "https://localhost:5443/WebRTCApp/WEB-INF/cgi/connDB.cgi?streamID=asfknehadjr".

The streamID value is correct.  However the ERR_CONNECTION_REFUSED and XHR failed loading are the problem.

Any ideas why these errors are happening?

Note that the publishing function still works.  I just can't view it yet, until I get this fixed.


Link to comment
Share on other sites

  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...