phpCollab Community
Discuss everything phpCollab!

The forums are currently in READ-ONLY mode while we upgrade the forums.
Home » Community » Bug Reports » FTP Uploading Bug
FTP Uploading Bug [message #7622] Mon, 27 March 2006 20:37
GREGORY is currently offline  GREGORY
Messages: 30
Registered: March 2005
phpCollab friend
(At Least on LAMP Stack - which is what i am working on when this following bug was produced)

When uploading a document to the linked content of a new Task, the document would be successfully linked and uploaded. However the following error would be produced:

[code]
Warning: ftp_mkdir(): Can't create directory: File exists in /home/webmorph/public_html/includes/library.php on line 753

Warning: ftp_mkdir(): Can't create directory: File exists in /home/webmorph/public_html/includes/library.php on line 753

Warning: Cannot modify header information - headers already sent by (output started at /home/webmorph/public_html/includes/library.php:753) in /home/webmorph/public_html/includes/library.php on line 219
[code]

So I changed the library.php from a mod of dracono:

// @ function createDir ~line 650 - 750
function createDir($path) 
{
	global $mkdirMethod, $ftpRoot;
	if ($mkdirMethod == "FTP") 
	{
		$pathNew = "";
		$ftp = ftp_connect(FTPSERVER);
		ftp_login($ftp,FTPLOGIN,FTPPASSWORD);
		/* GREGORY NICHOLAS BIATTCHH 3/27/2006 */
		$dir = split("/", $path);
		for ($i = 1; $i < count($dir); $i++)
		{
			$path .= "/" . $dir[$i];
			if(!@ftp_chdir($ftp, $path))
			{
				@ftp_chdir($ftp, "/");
				if(!@ftp_mkdir($ftp, $path))
				{
					break;
				} // end if
			} // end if
		} // end for
		ftp_quit ($ftp);
	} // end if
	if ($mkdirMethod == "PHP") 
	{
		@mkdir("../$path",0755);
		@chmod("../$path",0777);
	} // end if
} // end function
Previous Topic: Forgot Password breaks
Next Topic: login to mantis buggtracker
Goto Forum:
  


Current Time: Mon May 20 19:29:28 CEST 2013

Total time taken to generate the page: 0.30750 seconds