Title: can't get walletnotify to work Post by: rezalnik on February 13, 2015, 02:51:17 PM Hey,
I'm trying to Setup a script that executes whenever my wallet receives a Transaction and found out that walletnotify is a good solution to that. Though there is really only one helpful thread about this on here and that thread's solution didn't work for me.(https://bitcointalk.org/index.php?topic=203438.0) I would prefer do this with nodejs, though I don't know nodejs's equivalent to argv and argv, so I tried the php solution that the above thread suggests: my bitcoin.conf: Code: bitcoin.conf: my walletnotify.php: Code: if(2==$argc){ with this i got the error "Undefined variable: argc", so I did some Research that led me to putting this into my php.ini(line 650): Code: register_argc_argv = On I'm still getting the "undefined variable: argc" error though. If anyone could help me out here, I would highly appreciate it!(If anyone knows how to do this with nodejs, that would be even better!) Title: Re: can't get walletnotify to work Post by: goregrind on February 13, 2015, 05:32:08 PM Make sure you're modifying the right php.ini
/usr/bin/php -i|grep php.ini should tell you the location of the php.ini file /usr/bin/php -i|grep argc_argv should tell you if register_argc_argv is really on. Title: Re: can't get walletnotify to work Post by: rezalnik on February 13, 2015, 06:36:26 PM Make sure you're modifying the right php.ini php -i|grep php.ini should tell you the location of the php.ini file php -i|grep argc_argv should tell you if register_argc_argv is really on. Make sure you're modifying the right php.ini apperantly I was editing the wrong ini file, but now I edited the right one and when i call php -i|grep php.ini should tell you the location of the php.ini file php -i|grep argc_argv should tell you if register_argc_argv is really on. Code: php-i|grep argc_argv Code: register_argc_argv => On => On though when it still shows the error "Undefined variable: argc" Maybe the fact that there is 2 "on"s means that I did something wrong? Do you know which variables i would use in nodejs instead of "argc" and "argv"? Title: Re: can't get walletnotify to work Post by: goregrind on February 15, 2015, 09:43:47 AM You might have multiple versions of php installed.
Try again the instructions from my edited post, if that still doesn't clear it then I'm out of ideas. Do do that in nodejs you can start here: https://www.google.com/?gws_rd=ssl#q=node+js+command+line+arguments |