warning: Wrong parameter count for sha1() in /hsphere/local/home/adfansor/wikibj.com/bt_common.inc on line 304.

after installed and up load a torrent file, the page shows the error as above.

i cant upload a torrent file from the torrent option area, but only can upload file from the attachment upload,

after uploaded, i cant download the torrent file from the download this torrent, but can only download from the attachment.

Thank you very much for help me out of this problem.

Comments

adfansor’s picture

in fact there are two errors :

* warning: Wrong parameter count for sha1() in /hsphere/local/home/adfansor/wikibj.com/bt_common.inc on line 304.
* warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /hsphere/local/home/adfansor/wikibj.com/includes/database.mysql.inc on line 400.

adfansor’s picture

Version: 5.x-1.x-dev » 5.x-2.0-beta2

in fact there are two errors :

* warning: Wrong parameter count for sha1() in /hsphere/local/home/adfansor/wikibj.com/bt_common.inc on line 304.
* warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /hsphere/local/home/adfansor/wikibj.com/includes/database.mysql.inc on line 400.

tha10co’s picture

Assigned: adfansor » tha10co
Priority: Normal » Critical

When I try to upload a torrent I can see the upload Ok! but I Have this warning!

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in bt_torrent.module on line 346.

and the torrents I upload doesn't works...

Jonas Kvarnstrom’s picture

This could possibly be another instance of bad module weights. See the second half of http://drupal.org/node/196931#comment-652122 to see how I solved some similar problems I had with the module.

stuger’s picture

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in bt_torrent.module on line 346

i have the same problem...

Thyren’s picture

Version: 5.x-2.0-beta2 » 5.x-1.0-beta
Component: Miscellaneous » Code

Me too, except that it is on line 348

Edit: Like mentionned by Jonas Kvarnstrom, I changed the value of the 'weight' field of the 'modules/bittorrent/bt_torrent.module' record in the 'system' table from 0 to 1 and when I add a torrent, it now works fine!

So now I can add torrents normally, but I still don't understand how I can create a tracker page. Should I specify a tracker within the torrent files I create? If I need to, which url should I give?

bradfordcp’s picture

Depending on your settings the module may set the tracker for you. Under the BitTorrent Node Type settings page (admin/settings/bt_torrent) there is a setting to override the announce URL. If this is set to override, the URL of the tracker is automatically inserted. As far as creating a "Tracker page" could you clarify what that is?

~Chris

liquixis’s picture

Status: Active » Closed (won't fix)

5.x version is longer not supported.