Re: Newbie questions for the PHP5 experts in this ng



Josse Barrera wrote:
> i). Is it possible to have your "header" files (i.e. class
> implementation source code) stored in a directory location that is
> hidden in some way - the main goal is to thwart any hacker who may
> simply look at your include() method calls, casually navigate to the
> appropriate directories and peruse your source code at his/her leisure.

Yes, it's possible to store them in any directory for which your PHP
instance has read access (on the same local filesystem), for example a
directory in your homedir alongside public_html. PHP header or include
files are often called .inc or .inc.php. If your webserver is not
configured to treat .inc files the same as .php files, then naming them
..inc.php at least conceals the source of the file when requested directly
because that way they are parsed as php files. Whenever concealment is not
critical and include files are kept in the same dir as the php scripts, I
often prepend inc_ to their name for easier sorting (because they have the
same final extension .php).

--
E. Dronkert
.



Relevant Pages

  • Re: tools to scan source code
    ... I've been evaluate SWAAT and it is adequately meet my needs. ... I haven't try RATS, but I will try it soon. ... (but it's not dependable it just analyzes source code ... >> PHP is fairly C-like. ...
    (Pen-Test)
  • FW: [PHP] Re: Please hack my app
    ... My name is Jordan Forssman, I am representing a company called Armorize ... We have developed a source code analysis platform for PHP, ... Armorize Technologies ...
    (php.general)
  • Re: Python gets macros - now XML does too
    ... of PHP, which was originally a just simple HTML templating language. ... wanted to open the source of Metastorage in order to attract as many ... that are actual source code of the described classes in meta-programming ...
    (comp.lang.lisp)
  • Re: The Inquirer
    ... >>I could write a compiler for an arbitrary language and put this to open ... > Now go to the url with whatever web browser your using. ... PHP is open source. ... that the actual source code that makes ...
    (comp.os.vms)
  • Fw: [PHP] {ot}Extracting Source code from Binary Files(.dll,.exe.,class)
    ... I also troubled you because the PHP Scripting Language looks very similar to ... [PHP] Extracting Source code from Binary ... > Ha Ha Ha, Sorry for the Trouble Friend, This should not be on the php ...
    (php.general)