Hello Everyone,
I am having an issue with the create plugin, I am able to browse, and select files/folders for torrent creation, but once I select the file/files, enter the required information, I hit Create at which point it goes through the process of creating the torrent metafile, once the torrent creation process is complete I get the following error in the lower box:
Code:
Warning: file_put_contents(): The 2nd parameter should be either a string or an array in /var/www/html/test3/php/Torrent.php on line 363
In the upperbox the follow message is there:
Code:
mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing
Hashed 0 of 378 pieces.
Hashed 32 of 378 pieces.
Hashed 71 of 378 pieces.
Hashed 110 of 378 pieces.
Hashed 148 of 378 pieces.
Hashed 187 of 378 pieces.
Hashed 225 of 378 pieces.
Hashed 263 of 378 pieces.
Hashed 301 of 378 pieces.
Hashed 337 of 378 pieces.
Hashed 378 of 378 pieces.
Writing metainfo file... done.
Try to correct torrent file...
Done.
I am using rutorrent v3.0, I have the command line php installed, curl is fine, both are defined in the rutorrent config file. %webdirectory%/conf/config.php
I think this error is a php syntax error as the error states...
"The 2nd parameter should be either a string or an array..."
A look at the code of the page specified 'Torrent.php' the function in question is located on line 363,
'file_put_contents()' It is part of the greater function as show here:
Code:
/** Save torrent file to disk
* @param null|string name of the file (optional)
* @return boolean file has been saved or not
*/
public function save( $filename = null )
{
return file_put_contents( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, $this );
}
Taking a look here: http://www.w3schools.com/php/func_filesystem_file_put_contents.asp
We can see that the 2nd parameter would be the parameter specified after the first ","
Which would be:
Code:
( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, ----> $this <--- )
My thoughts on the error would be that, the $this variable is either being passed as "NULL" or being passed as a Integer for some reason, I am not a php coding expert, I could be totally wrong, lol.
I have checked all over this forum and people have spoken of the same error, but all the proposed or even closely related solutions have no effect.
Could this error be related to the ability for php to write files over a certain size? I know that the large the file being hashed for torrents the larger the torrent metafile.
Any help in this matter would be greatly appreciated. Thanks
I am having an issue with the create plugin, I am able to browse, and select files/folders for torrent creation, but once I select the file/files, enter the required information, I hit Create at which point it goes through the process of creating the torrent metafile, once the torrent creation process is complete I get the following error in the lower box:
Code:
Warning: file_put_contents(): The 2nd parameter should be either a string or an array in /var/www/html/test3/php/Torrent.php on line 363
In the upperbox the follow message is there:
Code:
mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing
Hashed 0 of 378 pieces.
Hashed 32 of 378 pieces.
Hashed 71 of 378 pieces.
Hashed 110 of 378 pieces.
Hashed 148 of 378 pieces.
Hashed 187 of 378 pieces.
Hashed 225 of 378 pieces.
Hashed 263 of 378 pieces.
Hashed 301 of 378 pieces.
Hashed 337 of 378 pieces.
Hashed 378 of 378 pieces.
Writing metainfo file... done.
Try to correct torrent file...
Done.
I am using rutorrent v3.0, I have the command line php installed, curl is fine, both are defined in the rutorrent config file. %webdirectory%/conf/config.php
I think this error is a php syntax error as the error states...
"The 2nd parameter should be either a string or an array..."
A look at the code of the page specified 'Torrent.php' the function in question is located on line 363,
'file_put_contents()' It is part of the greater function as show here:
Code:
/** Save torrent file to disk
* @param null|string name of the file (optional)
* @return boolean file has been saved or not
*/
public function save( $filename = null )
{
return file_put_contents( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, $this );
}
Taking a look here: http://www.w3schools.com/php/func_filesystem_file_put_contents.asp
We can see that the 2nd parameter would be the parameter specified after the first ","
Which would be:
Code:
( is_null( $filename ) ? $this->info['name'] . '.torrent' : $filename, ----> $this <--- )
My thoughts on the error would be that, the $this variable is either being passed as "NULL" or being passed as a Integer for some reason, I am not a php coding expert, I could be totally wrong, lol.
I have checked all over this forum and people have spoken of the same error, but all the proposed or even closely related solutions have no effect.
Could this error be related to the ability for php to write files over a certain size? I know that the large the file being hashed for torrents the larger the torrent metafile.
Any help in this matter would be greatly appreciated. Thanks