Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Richard Lynch
Adam Hubscher wrote: > From within the application, I use one page to include > classes/variables and so on. Is there a way (I may have been missing it > in the documentation for PHP, however I didnt see anything related) to > prevent a user from directly accessing/executing *.php by the file > ma

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Thomas Goyne
On Thu, 13 Jan 2005 16:25:30 -0600, Adam Hubscher <[EMAIL PROTECTED]> wrote: 1 (the preferred way): user accesses http://www.example.org/index.php?function=Join, this loads the class NewUser and begins its implementation. Because of the __autoload, it includes class.join.php, in order to u

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Josh Whiting
> as per PHP5 example > > 1 (the preferred way): user accesses > http://www.example.org/index.php?function=Join, this loads the class > NewUser and begins its implementation. Because of the __autoload, it > includes class.join.php, in order to utilize the class. > > 2 (the wrong way): user acc

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Jacek Blech
Adam Hubscher wrote: I am trying to prevent 2 from even occuring, utilizing a piece of code that would check if index.php had included it, or not. This code would be in the beginning of all the class files, at the top, before any other code was to be executed. use the 2 constants/variables avai

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Adam Hubscher
Thomas Goyne wrote: On Thu, 13 Jan 2005 16:25:30 -0600, Adam Hubscher <[EMAIL PROTECTED]> wrote: 1 (the preferred way): user accesses http://www.example.org/index.php?function=Join, this loads the class NewUser and begins its implementation. Because of the __autoload, it includes class.joi

RE: [PHP] Preventing execution without inclusion

2005-01-14 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm > -Original Message- > From: Adam Hubscher > Sent: 13/01/05 22:25 > > From within the application, I use one page to include > classes/variables and so on. Is there a way

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Marek Kilimajer
Adam Hubscher wrote: From within the application, I use one page to include classes/variables and so on. Is there a way (I may have been missing it in the documentation for PHP, however I didnt see anything related) to prevent a user from directly accessing/executing *.php by the file making s

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread David Green
How about setting a variable before calling the include (eg $fromIndex=true)? In class.join.php you could include, for example, at the top of the file Adam Hubscher wrote: From within the application, I use one page to include classes/variables and so on. Is there a way (I may have been missing

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Stan F
- Original Message - From: "Adam Hubscher" <[EMAIL PROTECTED]> To: Sent: Friday, January 14, 2005 1:25 AM Subject: [PHP] Preventing execution without inclusion > From within the application, I use one page to include > classes/variables and so on. Is there

Re: [PHP] Preventing execution without inclusion

2005-01-14 Thread Jochem Maas
Adam Hubscher wrote: From within the application, I use one page to include classes/variables and so on. Is there a way (I may have been missing it in the documentation for PHP, however I didnt see anything related) to prevent a user from directly accessing/executing *.php by the file making s

[PHP] Preventing execution without inclusion

2005-01-13 Thread Adam Hubscher
From within the application, I use one page to include classes/variables and so on. Is there a way (I may have been missing it in the documentation for PHP, however I didnt see anything related) to prevent a user from directly accessing/executing *.php by the file making sure taht it was only i