Page 1 of 1
[NOT SOLVED] mkdir - too many links?
Posted: Tue Aug 17, 2004 11:29 am
by phice
A client of mine is receiving this error:
Warning: mkdir(/home/magicvid/html/download/890ab3c61d90d409893082e7a72046fa): Too many links in /home/magicvid/public_html/view.php on line 393
Warning: symlink(): No such file or directory in /home/magicvid/public_html/view.php on line 402
Warning: Cannot modify header information - headers already sent by (output started at /home/magicvid/public_html/view.php:393) in /home/magicvid/public_html/view.php on line 408
Have any of you heard of this? Maybe it's too many people trying to create a directory at one time, or the folder is filled up..?
Posted: Tue Aug 17, 2004 11:44 am
by xisle
if it works, just turn off warnings
Posted: Tue Aug 17, 2004 11:50 am
by John Cartwright
Just for the sake of curiosity, can you show the relevant code?
Posted: Tue Aug 17, 2004 12:36 pm
by phice
Phenom wrote:Just for the sake of curiosity, can you show the relevant code?
Code: Select all
umask("0000");
$dir=md5(crypt("download"));
mkdir("/home/magicvid/html/download/$dir");
if (($data[format]=="rm" || $data[format]=="ram") && $m=="s") {
if ($data[format]=="rm") { $base=str_replace(".rm","",$url);
} else { $base=str_replace(".ram","",$url); }
system("echo "http://download.magicvideodepot.com/$dir/$base.ram" > /home/magicvid/html/download/$dir/$base.rm");
symlink("/home/magicvid/download/$url","/home/magicvid/html/download/$dir/$base.ram");
$url=$base.".rm";
} else {
symlink("/home/magicvid/download/$url","/home/magicvid/html/download/$dir/$url");
}
$url="http://download.magicvideodepot.com/$dir/$url";
Posted: Tue Aug 17, 2004 3:58 pm
by phice
any help?
Posted: Wed Aug 18, 2004 2:11 am
by phice
Guys..? Anyone?

Posted: Wed Aug 18, 2004 4:59 am
by Fredix
sorry for my dumb question that probably doe not help you but reading your code I'm wondering if
is really correct, I mean is it maybe $data['format'] or $data[$format] ??
Posted: Wed Aug 18, 2004 5:33 am
by markl999
How many links are there in /home/magicvid/html/download/ ?
ext2 is limited to 32,000 links in an inode, which in turn limits the number of directories in a single place to 31,998.
Posted: Wed Aug 18, 2004 1:35 pm
by phice
Yea, that's most likely it, mark.
Would any of you recommend either a good anti-leech php script or .htaccess code that only allows the referrer to be from our domain?
Let me check at HotScripts and I'll post a reply if I find anything reasonable.
