Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New Coder
    Join Date
    Jul 2003
    Location
    Angier, NC
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Downloading PHP source files

    I have been hearing that there is a way to download PHP files which I had previously thought to be impossible. Can anyone tell me if there is any truth to these rumors and if so could you tell me how this is possible so that I can attempt to correct the problem on my server. Thanks

    -- Joe Davy
    No matter what happens, someone will find a way to take it too seriously -- Joe Davy

    www.axiscreations.com

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    If the PHP files are being served through the PHP engine on the webserver then no it is not possible to download the source files other than logging into the server via ftp/secure shell/Cpanel/etc.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe the rumor you heard refered to the common practice of putting your function libraries into .inc files. If the server isn't configured to send .inc files to the PHP engine and the file itself is accessible through the web (i.e. not in .htaccess or similarily protected directory), you can download it. But the same would be true for .txt, .muh and .foo files as well.

    It all depends on how your server is configured and how you name/place your files there. Basically what Spookster has said already.
    De gustibus non est disputandum.

  • #4
    New Coder
    Join Date
    Jul 2003
    Location
    Angier, NC
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks guys that is what I had been thinking all along, as far as parsed files. Thanks for the extra info Mordred.
    No matter what happens, someone will find a way to take it too seriously -- Joe Davy

    www.axiscreations.com

  • #5
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you want to view them, save the scripts as a .txt file and you should be available to view them...
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by SDP2006
    If you want to view them, save the scripts as a .txt file and you should be available to view them...
    Ok then save the php file you are currently viewing here on the forums as a text file and show me the PHP source code please.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #7
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    lol

  • #8
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ooops, thats not what I meant.....

    You know what I meant. I meant save your source file as a .txt

    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #9
    New Coder
    Join Date
    Dec 2002
    Location
    earth, usa, az
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If people could download your source php files... there would be a whole hell of a lot of trouble .... most the times - they'd have your DB name/user/pass, which obviously would give them access to that secure / private data...
    THis would be BIG trouble if somebody figured out how to download a pre-parsed php file...

  • #10
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Originally posted by Spookster
    Ok then save the php file you are currently viewing here on the forums as a text file and show me the PHP source code please.
    Always jumping at the chance for sarcasm eh? Should always take ambiguity into account spanky. :P
    Omnis mico antequam dominus Spookster!

  • #11
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by Mhtml
    Always jumping at the chance for sarcasm eh? :P
    Who me? Did they finally let you out of school detention.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #12
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Originally posted by SDP2006
    Ooops, thats not what I meant.....

    You know what I meant. I meant save your source file as a .txt

    Why would he need to save his own files as txt files? Be pointless as he'd be able to see php from his own php files

  • #13
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you trying to make me sound unprofessional??
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #14
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,055
    Thanks
    10
    Thanked 94 Times in 92 Posts
    The answer as ever is NO unless perhaps you choose IIS as your webserver.

    Closing this thread innit
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •