[NOT SOLVED] mkdir - too many links?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

[NOT SOLVED] mkdir - too many links?

Post 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..?
Last edited by phice on Wed Aug 18, 2004 2:10 am, edited 1 time in total.
Image Image
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

if it works, just turn off warnings
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Just for the sake of curiosity, can you show the relevant code?
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post 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";
Image Image
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

any help?
Image Image
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Guys..? Anyone? :P
Image Image
User avatar
Fredix
Forum Contributor
Posts: 101
Joined: Fri Jul 18, 2003 2:16 pm
Location: Wehr (Eifel) Germany
Contact:

Post by Fredix »

sorry for my dumb question that probably doe not help you but reading your code I'm wondering if

Code: Select all

<?php
$data[format]
?>
is really correct, I mean is it maybe $data['format'] or $data[$format] ??
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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.
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post 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. :)
Image Image
Post Reply