Forum Moderators: phranque

Message Too Old, No Replies

PHP uploaded files not visible in FTP?

Files uploaded in php will not show up in ftp

         

sammy_s_a_m

4:33 am on Mar 24, 2008 (gmt 0)

10+ Year Member



I'm having trouble with php uploaded pictures not showing up in ftp (they are invisible). But through http they are obviously there.

How do I fix this problem so I can see them in ftp?

Cheers

PHP_Chimp

9:20 pm on Mar 25, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are you uploading the file? What I mean is are you loading them into a temp directory then moving them (as per the example [uk3.php.net] in the manual). If so are you sure that you are looking the correct place (not to be rude, just getting the obvious out of the way)?

Are you sure that your ftp is getting the updated information from the server, not a cached response (again getting the obvious out of the way)?

If this is a php problem you may be better off asking on the php forum.

sammy_s_a_m

7:21 am on Mar 26, 2008 (gmt 0)

10+ Year Member



yeah it is being moved. if I check via http for the file in the directory it's there.

also although i know it caches, it is the same on various ftp programs and once again, it's there in http.

lammert

8:14 am on Mar 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you do it the other way around, do pictures uploaded with ftp show up via http?

It might be a rights setting. On new versions of linux where selinux is activated, you sometimes may get strange results when the selinux [en.wikipedia.org] layer filters out files from directory listings in one protocol, but not in another. To prevent strange behaviour many hosting companies switch selinux off on their servers by default though.

If selinux is the problem, the directory where you upload your files first probably doesn't have the attributes set to be viewed by ftp. If these attributes get inherited by your uploaded file and you then move it to a new location, these attributes can be moved too, causing your file to be excluded from the FTP listing.