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

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
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

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

Post 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...
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

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

Post by s.dot »

Yes, they do.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Mr Tech
Forum Contributor
Posts: 424
Joined: Tue Aug 10, 2004 3:08 am

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

Post 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?
Post Reply