AI Zone Admin Forum Add your forum

CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP CHATBOT CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP CHATBOT MEETUP

On June 28th, 2017 we're organizing our next Chatbot Meetup in Amsterdam, The Netherlands. Feel free to join!'

PHP client interface problems
 
 
  [ # 16 ]

Hi Dave,

after typing netstat -ano | find “:34254”
there was nothing shown,
so I wrote down “34254” after “ChatScript port=” in LocalServer.bat
and in PHP-client after
$host = “localhost”;  //  <<<<<<<<<<<<<<<<< YOUR CHATSCRIPT SERVER IP ADDRESS GOES HERE
$port =
After this, I tried to start the client, but recieved the message:
“Ups. Google Crome wasn´t able to connect to localhost.”
So I looked into the PHP-client again, saw that there was written 1024 a second time after
  // get server response
  $ret=fgets($fp,
so I changed it at this place, too, but with the same result.

After that I changed every 34254 into 32769 in localserver.bat and PHP-client.
But unfortunately I recieved the same result, too.

 

 
  [ # 17 ]

Ok, this has taken me far longer than I had wanted, but I finally got a Windows XP computer set up on my local network with both a web server and ChatScript installed and running, and I have exactly the same problem that Andreas has. This will allow me to directly test what’s happening, and will eliminate “turn-around time”. Give me a few hours here, and I’ll provide some additional data.

 

 
  [ # 18 ]

Hi Dave,

this eases my heart: )
I was suspecting myself
of doing something so stupid
that nobody here could imagine; )

Best

Andreas

 

 
  [ # 19 ]

I’m still testing things, and trying to determine the source of the problem, but it looks like there may well be two contributing factors:

1.) After several volleys on both the XP machine and my Windows 7 box, the PHP script seems to simply “reload”, rather than actually send the posted information and try to connect to the script.

2.) when viewing the ChatScript logs (found in the LOGS folder), I see entries like this:

192.168.1.100 Dave/Harry Aug 12 06:05:58 time:31/15 msgwho are you  =>     <= 

This indicates that a blank response was sent, but this doesn’t happen all of the time. Also, when the PHP script just “reloads”, there is no entry added to the ChatScript server log, which is further evidence that at least a large part of the problem (if not all of it) is with the PHP script. So that’s the area I’ll likely be concentrating on.

 

 
  [ # 20 ]
Andreas Drescher - Aug 12, 2013:

“Ups. Google Crome wasn´t able to connect to localhost.”

This error sounds like a problem with your web server (XAMPP).  Verify that you’re able to at least run a simple PHP file like:

<?php

echo "hello world";

?> 

You were able to access the PHP client files before since you reported an fsockopen() warning message before.

Did you get a message like this:

Warningfsockopen()unable to connect to localhost:34254
inC
:xampphtdocschatscriptclient.php on line 61 

This would indicate that the PHP client attempted to connect to port 34254.  But if it says “Google Chrome is having problems connecting to localhost”, it means that your web server could be offline or something. 

Steps:

1. Make sure your web server is turned on
2. Create a simple PHP file named: hello.php to verify that your web server is processing PHP
3. Try to run your PHP Chatscript Client to see if you get any fsock warnings.
4. THEN try changing the ports on your CS server/client

 

 
  [ # 21 ]

Good point, Jaz. smile

 

 
  [ # 22 ]

I’ve done some further investigating, and one thing that I’m seeing is that when chatscript.exe is running in server mode, it takes up virtually all of the available CPU cycles, and is pushing over 150MB of ram. I’m using the default settings in the batch file, so nothing odd is going on with that. Here are the OS specs:

Windows XP Pro 32bit
1.5GB RAM
CPU Intel I7 3.6GHz (single core)

I tried to drop the process priority to “below normal”, and then to “low”, and each time chatscript.exe would drop to 15-20% CPU usage, then shoot up to around 90-98% again. As one would expect, when the CS server is taking that much CPU time, everything else suffers, and the system slows to a crawl. Rebooting the computer “solves” the problem for about 10-15 minutes, or until the second volley is sent. Then things grind to a near halt again until I stop the CS server.

Is there any way that I might be able to debug the system locally? I don’t have any development software installed at the moment, but I CAN install Visual Studio/VB6.

 

 
  [ # 23 ]

Visual Studio Express 10 is free.
And you can set memory parameters to reduce the CS footprint. It can surou cavive a 16MB footprint in iphone (with 1/3 dictionary), on startup it does tell you both the used and free space. It acquires a huge amount of free space so that it does not have to dynamically allocate space later, all its space is continuous which makes for fast allocation and deallocation each volley. And the space is huge by default, for doing many large-scale things—like holding facts to represent the Amazon product tree.  NORMAL chatbots only need a small amount of working space above the initial USED amounts.

 

 
  [ # 24 ]

WINDOWS CS servers will use all cycles because the server generally busy waits (windows is not a great server).  Linux doesn’t so it wont use the cycles when waiting.

 

 
  [ # 25 ]
Bruce Wilcox - Aug 12, 2013:

Visual Studio Express 10 is free.

I’ll have to look into that. Thanks. smile

Of course, I know as much C (of any flavor) as I do Esperanto, but I’m sure I can muddle through.

 

 
  [ # 26 ]

Hi all,

thank you very much for your help.
I keep my fingers crossed: )

Hi Jaz,

if I try running your small PHP-example under named chatscriptclient.php,
I recieve this warning:

Warning: fsockopen(): unable to connect to localhost:1024 (Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte. ) in C:\xampp\htdocs\chatscriptclient.php on line 61

Fatal error: Error opening socket in C:\xampp\htdocs\chatscriptclient.php on line 62

Best

Andreas

 

 
  [ # 27 ]
Andreas Drescher - Aug 13, 2013:

Hi all,

thank you very much for your help.
I keep my fingers crossed: )

Hi Jaz,

if I try running your small PHP-example under named chatscriptclient.php,
I recieve this warning:

Warning: fsockopen(): unable to connect to localhost:1024 (Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte. ) in C:\xampp\htdocs\chatscriptclient.php on line 61

Fatal error: Error opening socket in C:\xampp\htdocs\chatscriptclient.php on line 62

Best

Andreas

Now that you’re getting an error for port 1024, try changing the port on the client and on the server.

 

 

 
  [ # 28 ]

Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte

To paraphrase the translation:

The connection failed because the target machine actively refused it

 

 
  [ # 29 ]

Hi Jaz,

I think I did so.
Please look at my first
message on this page: )

Best Andreas

 

 
  [ # 30 ]

Hi Everyone,

Sorry to re-open this thread, but I was not sure where else to ask my question.

I have the following configuration: my website on one server with its own external IP and the CS server on another server with another IP.
In order to secure the transmission between the two, I would like to use SSL tcp. I read the manual regarding the CS server. I understood from the manual that the local encryption is not native, but does the CS server accepts SSL TCP? I tried but was not successful.

Is there another way to protect the content of the transmission?

Thanks a lot for your help!
Gilles

 

 < 1 2 3 > 
2 of 3
 
  login or register to react