Bitcoin Forum
May 06, 2024, 02:55:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [SOLVED] walletnotify not working on Windows  (Read 2279 times)
supermoney (OP)
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
November 22, 2015, 10:57:15 AM
Last edit: November 22, 2015, 12:35:16 PM by supermoney
 #1

Hello guys, months ago I was writing a PHP script using walletnotify for storing transactions in a database. Now bitcoind at notify pop ups the system console for a second but it doesn't execute any...
After many tests I ended up using a very simple script for testing purposes:

test.php
Code:
<?php
$fp=fopen("C:/test.txt","a");
$out=$argv[1]."\n";
fwrite($fp,$out);
?>

bitcoin.conf
Code:
walletnotify = C:/php/php.exe -f C:/test.php %s

debug.log
Code:
2015-11-22 12:30:56 AddToWallet e20f0f5eb3b1d68fc1f33440cfc419a7e03719f645b292fec07211a56e6c185b  new
2015-11-22 12:30:56 runCommand error: system(C:/php/php.exe -f C:/test.php e20f0f5eb3b1d68fc1f33440cfc419a7e03719f645b292fec07211a56e6c185b) returned 1

Which actually works if ran manually through cmd but not by bitcoind when gets new transactions, just the console flashes and then byebye... Is my walletnotify cmd string correct?

SOLVED: had to use '\' instead of '/' damn it  Roll Eyes
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714964139
Hero Member
*
Offline Offline

Posts: 1714964139

View Profile Personal Message (Offline)

Ignore
1714964139
Reply with quote  #2

1714964139
Report to moderator
1714964139
Hero Member
*
Offline Offline

Posts: 1714964139

View Profile Personal Message (Offline)

Ignore
1714964139
Reply with quote  #2

1714964139
Report to moderator
1714964139
Hero Member
*
Offline Offline

Posts: 1714964139

View Profile Personal Message (Offline)

Ignore
1714964139
Reply with quote  #2

1714964139
Report to moderator
BitAurum
Sr. Member
****
Offline Offline

Activity: 318
Merit: 250


View Profile
November 22, 2015, 08:34:30 PM
 #2

If you solved the problem you should lock this thread to avoid more posts on this thread.
You can find the link to lock this thread at the bottom of this page.
FruitsBasket
Legendary
*
Offline Offline

Activity: 1232
Merit: 1017


View Profile
November 22, 2015, 08:36:44 PM
 #3

If you solved the problem you should lock this thread to avoid more posts on this thread.
You can find the link to lock this thread at the bottom of this page.
Lol, why are you explaining a sr member where the lock button is located, I think that he knows where it is.

@supermonkey, such litlle details are very i portant one small mistake and then it is not working. Good that you have fixed it!

fck@dt-alwayzz_newbz
supermoney (OP)
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
November 24, 2015, 09:58:01 PM
 #4

If you solved the problem you should lock this thread to avoid more posts on this thread.
You can find the link to lock this thread at the bottom of this page.

Thanks for the tip but I know it already.
Anyways, I left the thread open because I've got another question for you: what does happen if bitcoind eg. crashes? Will walletnotify seek for new/missing transactions at launch?
Still didn't try (sorry  Embarrassed) but I hope it won't skip them lol
supermoney (OP)
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
November 28, 2015, 01:56:12 PM
 #5

If you solved the problem you should lock this thread to avoid more posts on this thread.
You can find the link to lock this thread at the bottom of this page.

Thanks for the tip but I know it already.
Anyways, I left the thread open because I've got another question for you: what does happen if bitcoind eg. crashes? Will walletnotify seek for new/missing transactions at launch?
Still didn't try (sorry  Embarrassed) but I hope it won't skip them lol

Any idea? Explanation? I wanna make sure walletnotify it's a safe and stable way to fetch ~50/100 transactions (send/receive) a day.
supermoney (OP)
Legendary
*
Offline Offline

Activity: 1161
Merit: 1004



View Profile
December 08, 2015, 09:27:31 AM
 #6

I've now completed my scripts and everything is working like a charm, closed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!