unable to connect to web demo

+2 votes

hello,

i am trying to connect multichain to web demo but getting this error despite following all the steps...i am new to this and any help would mean a lot...i am using windows and have xampp for apache.. also checked that curl is enabled.. i am running server and node on the same machine...

here's the error msg:

MultiChain Demo

Choose an available node to get started:

Notice: Undefined index: name in C:\xampp\htdocs\multichain-web-demo-master\index.php on line 86

 

here are my config.txt details - 

default.name=chain1                   # name to display in the web interface

default.rpchost=127.0.0.1             # IP address of MultiChain node

default.rpcport=4330                   # see rpc-port from chain parameters

default.rpcuser=multichainrpc          # username for RPC from multichain.conf

default.rpcpassword=EsPtzt5J9v...                   # password for RPC from multichain.conf

Please tell me what i am doing wrong.

asked Oct 15, 2017 by daredevil

1 Answer

+2 votes

It could be because the web demo is expecting Unix-style line endings ("\n"), but your config file contains Windows-style endings ("\r\n").

If you stick print_r($config); after line 5 of index.php, please tell us what you see.

Also please check your web server's error log for any PHP reported problems.

answered Oct 16, 2017 by MultiChain
Sorry for responding a little late.. here's what it shows..
Array ( [default] => Array ( [name] => chain1 ) [default] => Array ( [rpchost] => 127.0.0.1 [rpcport] => 4330 [rpcuser] => multichainrpc [rpcpassword] => EsPtzt5J9vPrwFpbpP8mfBzV9fh... ) )

Looks like web demo is able to fetch the details..i also checked the php error log file...shows the same notice as posted above in the question..nothing else..
another query:does web demo support protocol version 10009?
i checked further...
    $chain=@$_GET['chain'];      //line 6
this line is not able to get its value..as a result name parameter is also kept empty..what to do now?
There appears to be an invisible character (what's known as a byte order mark) before the first 'default' word in your config file, so it appears to the web demo as if two different chains have been named and defined. The simplest solution is just to start the config file with a blank line.

The other thing you found is the expected behavior before a chain has been selected.
Thanks a lot...it worked perfectly..!!
Now when i am Viewing Streams, i am getting this msg...
Notice: Undefined index: subscribe_b12973fac61b19d14473c41ecd23db2681cc97dde59bbd7f5623315e36c17351 in C:\xampp\htdocs\multichain-web-demo-master\page-view.php on line 13

Notice: Undefined index: stream in C:\xampp\htdocs\multichain-web-demo-master\page-view.php on line 19
 and below this the tables gets printed..!!

Also while setting label..i am getting this msg in label field..
[18-Oct-2017 08:57:52 Europe/Berlin] PHP Notice:  Undefined index: 1S1kpCf8hrUAo1KCi4aBZeus1eCxN53hiu17rq in C:\xampp\htdocs\multichain-web-demo-master\page-label.php on line 30

if these are not that bothersome,please tell me then how to stop printing these on the browser?
We've updated the code in Github to avoid these warnings. You can also use the display_errors PHP setting to prevent warnings showing up in the browser.
Thanks a lot for you help. It is running smoothly now.
how do you start the file with a blank line?
...