Page 1 of 1

ftp_put - failed to open stream: No such file or directory

Posted: Thu Aug 21, 2008 12:24 am
by Mr Tech
I created a CMS ages ago that created files in the root directory. It was a super dodgey set-up which made the root folder writeable etc. I'm doing an update for people who have this old system and am going to use FTP to create the files now.

What I've done is created a temp folder where the files are created. I was then going to use ftp_put to move the files into the root directory. I've tried that but I get this error:
Warning: ftp_put(/home/***/public_html/test.php) [function.ftp-put]: failed to open stream: No such file or directory in /home/***/public_html/admin/ftp/ftp.class.php on line 102
I've tried many different codes/classes and keep getting this error... Any idea's what is wrong? I thought FTP didn't need folders to be writeable to create/move files...

Re: ftp_put - failed to open stream: No such file or directory

Posted: Thu Aug 21, 2008 12:40 am
by s.dot
Yes, they do.

Re: ftp_put - failed to open stream: No such file or directory

Posted: Thu Aug 21, 2008 12:58 am
by Mr Tech
So if I use a normal FTP program such as FIleZilla, it doesn't need this. Is this because they are both totally seperate systems or is there a way to create a file without the folder being writeable?