t3ran13 / php-graphene-node-client

PHP client for connection to Graphene node (STEEM/GOLOS/VIZ/WHALESHARES)
MIT License
12 stars 12 forks source link

OpComment #9

Closed fervi closed 6 years ago

fervi commented 6 years ago

Well, My PHP knowledge isn't good. I try to create bot with comment creating function, but it doesn't work. Probably error is simple

Error log: http://meshnet-users.tk/paste/p/hops/o.txt

<?php

include('libs/php-graphene-node-client/vendor/autoload.php');

use GrapheneNodeClient\Tools\ChainOperations\OpComment;
use GrapheneNodeClient\Connectors\Http\SteemitHttpConnector;
use GrapheneNodeClient\Tools\secp256k1_context_create;

$connector = new SteemitHttpConnector();

$answer = OpComment::doSynchronous(
    $connector,
    '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg',
    'guest123',
    'dtaipen',
    '',
    'Test nowego bota! Przepraszam za spam.',
    '{"tags":["polish", "pl-artykuly", "pl-steem"]}',
    'problemy-z-siecia-steem',
    'fervi'
);

?>
t3ran13 commented 6 years ago

Hi your logs are

Uncaught Error: Call to undefined function GrapheneNodeClient\Tools\secp256k1_context_create

You need install for broadcast (sending transactions to blockchain):

install components

-automake
- libtool
-libgmp-dev

install extensions

- secp256k1 (how to install secp256k1-php)
- gmp
t3ran13 commented 6 years ago

Do you use docker?

fervi commented 6 years ago

No, native system. I installed secp256k1 but it still didn't help. Maybe something with my system (or code) ;)

or maybe extension wasn't load

t3ran13 commented 6 years ago

i need error logs)

did you use composer?

fervi commented 6 years ago

did you use composer?

Yes, but I just include autoload.php PHP-Graphene File

PHPInfo: http://meshnet-users.tk/paste/p/hopu/h.

My mission is just to upvote someone or create comment. (interact with blockchain), but maybe something is missing in my code and doesn't work

Upvote log http://meshnet-users.tk/paste/p/hopu/n.txt

Upvote code http://meshnet-users.tk/paste/p/hopv/f.txt

t3ran13 commented 6 years ago

you still did not install secp256k1

Uncaught Error: Call to undefined function GrapheneNodeClient\Tools\secp256k1_context_create

look readme for details. You can see how i install it in docker. Just copy & past

fervi commented 6 years ago

I closing temporary this issue, I don't have time now :(