Re: Dup-finder doesn't run

Blake Watters <[email protected]>
Newsgroups gmane.comp.audio.netjuke.user
Organization Ibiblio
Message-ID <[email protected]>
It seems like your particular build of PHP does not have md5_file. I've just taken a look at the php.net page, and it seems that md5_file only exists in PHP 4.2 and higher. There's a simple work-around though. I'll get this fix into CVS tonight (actually the dup-finder will soon be using the audio data minus the tags/headers for better accuracy). You can fix this by adding this to the end of your lib/inc-common.php file:

if (! function_exists ('md5_file')) {

function md5_file ($file) {

	if (! file_exists ($file)) {

		return (false);

	}

	$fd = fopen($file, 'r');
	$contents = fread ($fd, filesize ($file));
	fclose ($fd);

	return (md5 ($contents));

}

}

On Sat, 15 Mar 2003 13:38:36 -0800 (PST)
[email protected] wrote:

> > From: Steve Sloan <[email protected]>
> 
> > Under 1.0b17, as well as current CVS, attempting to use the duplicate track 
> > finder gives me:
> 
> >   Parse error: parse error, unexpected $ in [...]/netjuke/admin/dup-finder.php on line 436
> 
> > I can see no obvious errors (IANA-PHPCoder), but I notice that the file only 
> > has 435 lines, so I suspect some sort of syntax error.
> 
> Mine has only 435 lines as well.  dup-finder worked great here for
> finding dup tags, but bombed when I selected "MD5":
> 
>   Fatal error: Call to undefined function: md5_file() in
>   /www/netjuke/admin/dup-finder.php on line 120
> 
> Am I missing some required MD5 library?
> 
> -Steve
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open! 
> Get cracking and register here for some mind boggling fun and 
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> Netjuke-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/netjuke-users
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+djUBhEyptefxjgkRAgciAKCTKK2rRIYtoMj/LUpXwRQ5zwhYdwCeOtTX
cz2oehaUu/6eCWwEZ32gLUQ=
=9wq7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.