drottemberg
Hello and Happy new year,
I tried the Hello World with lightstreamer integrated web server and it works perfectly
Then I try to deploy it on my webserver on the same machine. I followed all instructions but I cannot make it work.
I use Symfony Framework so it might be a routing issue.
this is the messages I get
5: 23:28:42,727 ER createEngine The call of createEngine methods after the BODY onload event is supported only for DOM2 browsers. You might have reached this point, due to slow page downloads.
and
ER bind Unable to find the Engine. Retrying. If the problem persists, please check your configuration.
Any help would be appreciated.
Thank you Damien
Mone
hello,
please can you paste here your js code for pushpage and engine configuration?
Oh! And of course, happy new year to you too :Smile_Ag:
drottemberg
Here is the code below.
Of course mysite.tls and push.mysite.tld are in hosts file.
If I put the directory into my web root it works by typing the full address but it's not how symfony works so I can't do that.
I think the issue is the routing system because url are rewritten in symfony. You don't specify the page directly you specify in the URL a module/an action that will be executed in the server. So I have to create a module with action that will display hello world file. The JS are found with no problem but maybe in your JS you are trying to call other files that cannot be found.
<?php
use_javascript('/LS/lscommons.js');
use_javascript('/LS/lspushpage.js');
?>
<div source="lightstreamer" table="hellotable" item="greetings" field="message">loading...</div>
<div source="lightstreamer" table="hellotable" item="greetings" field="timestamp">loading...</div>
<script>
var page = new PushPage();
page.context.setDomain('mysite.tld');
page.onEngineCreation = function(engine) {
engine.connection.setAdapterName("HELLOWORLD");
engine.changeStatus("STREAMING");
engine.connection.setLSHost('push.mysite.tld'); // (set the hostname when deploying on web server)
engine.connection.setLSPort('8080'); // (set the port when deploying on web server)
}
page.bind();
page.createEngine("HelloWorldApp", "LS", "SHARE_SESSION");
var pushtable = new OverwriteTable(null, null, "MERGE");
page.addTable(pushtable, "hellotable");
</script>
drottemberg
I Solved the problem
it was the directory specified in createEngine. I left it as LS (relative) instead of /LS absolute
Now one last question. Why Hello world post a request to bind_session.js every 5 seconds and not StockListDemo that just calls control.html and that's it. ?
Dario Crivelli
Posting requests to bind_session.js in sequence denotes polling.
All our demos are configured for streaming and polling is only used as a recovery when streaming is not supported by the environment.
Are you using 2 different installations of Lightstreamer in order to supply Hello World and the StockListDemo?
Do you see polling after any page refresh on Hello World?