Page 2 of 2

Posted: Tue Mar 29, 2005 4:35 pm
by astrix
timvw wrote:sorry, my mistake, the 60 doesn't indicate filesize... if i'm not mistaken it indicates the number of "links" to the file.


but there is no relationship between a symlink and your www rootdir.
but there is no relationship between a symlink and your www rootdir.

Why? I checked in various servers and appear to be always is how this, all the servers that have public_html have also a symlink in the ftp root dir to this public_html...

Also the symlinks are this, redirections to other directory... I believe this is how this... Are you sure is no relationship between a symlink and www rootdir?

And, I not find any explantion of the second item array of the ftp_rawlist return... Please, is possible explain more the "indicates the number of "links" to the file"? That is to say, yes, in each server I checked have different values this second parameter...

Another question, are servers that connect via ftp to web root directly, others to a ftp root with public_html, in any windows server I see a "webroot" subdirectory in the ftp root dir that is the web root... But any other posibilities?

Thanks in advance...

Posted: Tue Mar 29, 2005 4:53 pm
by astrix
And with ftp_raw or ftp_exec there won't be any instruction in order to know which it is the web root?

Posted: Wed Mar 30, 2005 3:28 am
by timvw
read for example

http://216.147.18.102/unixfaq/filesystem.shtml

i'm aware of webhosts that simply use /home/user/domain1 and /home/user/domain2 as webroot for domain1 and domain2. no symlinks in there... another example: start a sourceforge projects and you'll see the website is in /home/p/pr/projectname.

Posted: Wed Mar 30, 2005 5:03 pm
by astrix
timvw wrote:read for example

http://216.147.18.102/unixfaq/filesystem.shtml

i'm aware of webhosts that simply use /home/user/domain1 and /home/user/domain2 as webroot for domain1 and domain2. no symlinks in there... another example: start a sourceforge projects and you'll see the website is in /home/p/pr/projectname.
Yes timvw, appear to be is no form of retrieve the true web root path - although I think is logical in any site should be, but... ... ... -...

And yes, the second parameter is a count of links to the dir-arch, thanks, I not find nothing info about this second parameter and is important know well wath is all the info of the archs and dirs...

Thanks for the link!!!

Posted: Wed Mar 30, 2005 7:55 pm
by astrix
A little explanation I write in other forum:

http://www.webmasterworld.com/forum88/7 ... 0.htm#msg7
coopster wrote:I'm not aware of any way you are going to be able to get the DOCUMENT_ROOT value on a remote server this way. Typically, if you are given the userid and password, you will have an idea what the web root realpath is in advance.
astrix wrote:In reality is some for comfort, for connect directly via ftp to the web root dir, bur also for automatization in some process...

This question is also valid for the winsock dll and activex - also not are info, or I not find, of how know which is the web root dir -, is the same, how make a ftp program that connect directly always to the web root directory...

For example, you have various webs and want to perfom some operations via ftp automatically and need to upload archives to the web root, instead of insert for each ftp connection wath is the web root dir for upload - lost time - is possible to automatize...

I think in some place must be which is the web root dir, but I not find solution... Not find also in documentation of winsock... That is the same in reality, winsock work almost equal of ftp php I believe...

I am developping a software that need upload a php script to the main web dir of the user for realize some operations automatically and is more confortable not need to answer to the user where is the web root...

I believe is incredible this info, simple info, not are available...

Posted: Wed Mar 30, 2005 8:37 pm
by astrix
Well, thinking, is possible a shoddy work...

Upload one special file named strange "suerfweihjfkmokqwo.php" - check before if exists in the dir - in each dir of the ftp root dir, a file how this:

<?php echo getcwd(); ?>

And check if the, for example, http://www.test.com/suerfweihjfkmokqwo.php work...

Is possible a solution, is shoddy work, but... Work...

Posted: Wed Mar 30, 2005 8:48 pm
by feyd
just request the path.. good grief.