Page 1 of 1
Downloading .php Files From Web Directories
Posted: Wed Feb 08, 2006 2:44 pm
by BMN
Hello,
I am able to browse a directory on a web server and view the file list. This includes the php files, etc. on the server. When I try to download the php files from the directory they save as 0kb .html files.
I have tried "saving file" through IE6 and Firefox with no luck. Firecfox says it is downloading the file and then it disappears from the saved location, and IE6 saves it as a 0kb .html file.
Are there any applications/tools/fixes that are available for me to copy the .php files that I need?
Thank you.
Posted: Wed Feb 08, 2006 2:47 pm
by raghavan20
are you trying to download files that belong to you and in your host?
if it does not, then you cannot download php files...
Posted: Wed Feb 08, 2006 2:50 pm
by BMN
The files are on a remote server. Not my server. I do not have root access or FTP access to the server.
Why can I view the files but not download them?
Posted: Wed Feb 08, 2006 3:08 pm
by raghavan20
BMN wrote:The files are on a remote server. Not my server. I do not have root access or FTP access to the server.
Why can I view the files but not download them?
when you say you are able to view...you are viewing the generated HTML file from the PHP file .... is not it?
You cannot have access to server side scripts unless it is your script...even if it is your script...you can download the code by only means of FTP or any user interface given by the host.
Posted: Wed Feb 08, 2006 3:11 pm
by BMN
I am viewing the directory list.
(eg) index.php
12.php
hello.php
, etc.
These are examples of the files I can see. When I try to right-click and "save as", it saves as a 0kb file.
These are the files I am trying to download.
Posted: Wed Feb 08, 2006 3:14 pm
by John Cartwright
because the server is parsing the file when you download it..
think about it, if we could simply download the raw file, then you could steal anyones source code
Posted: Wed Feb 08, 2006 3:16 pm
by raghavan20
Jcart wrote:because the server is parsing the file when you download it..
think about it, if we could simply download the raw file, then you could steal anyones source code
think about the sensitive db information that might be stored in it...it is kinda inherent security to server side files...
Posted: Wed Feb 08, 2006 3:19 pm
by BMN
I thought security was the reason for not being able to download it. But I was confused because I could view the file.
Thanks for clearing that up and explaining it to me. That has been a great help!