...

View Full Version : Downloading PHP source files



soccerdvy
09-16-2003, 03:11 AM
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

Spookster
09-16-2003, 03:21 AM
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.

mordred
09-16-2003, 10:25 AM
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. :)

soccerdvy
09-19-2003, 08:08 PM
thanks guys that is what I had been thinking all along, as far as parsed files. Thanks for the extra info Mordred.

SDP2006
09-19-2003, 09:07 PM
If you want to view them, save the scripts as a .txt file and you should be available to view them...

Spookster
09-19-2003, 11:15 PM
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.

Nightfire
09-20-2003, 02:36 AM
lol:D

SDP2006
09-21-2003, 03:26 AM
Ooops, thats not what I meant.....

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

:)

ryno267
09-22-2003, 07:36 AM
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... :mad: :eek:

Mhtml
09-22-2003, 07:12 PM
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

Spookster
09-22-2003, 11:05 PM
Originally posted by Mhtml
Always jumping at the chance for sarcasm eh? :P

Who me? Did they finally let you out of school detention. :p

Nightfire
09-23-2003, 12:36 AM
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 :p

SDP2006
09-23-2003, 02:03 AM
Are you trying to make me sound unprofessional??

firepages
09-23-2003, 03:25 AM
The answer as ever is NO unless perhaps you choose IIS as your webserver.

Closing this thread innit ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum