RE: [PHP] Site Structure

2001-04-23 Thread Martin Gottlieb


Or better yet:  

include( "$DOCUMENT_ROOT/includes/header.inc" );

Martin Gottlieb


-Original Message-
From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:56 AM
To: 'Jordan Elver'; PHP General Mailing List
Subject: RE: [PHP] Site Structure


try 


include('../includes/header.inc');



Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A



> -Mensaje original-
> De:   Jordan Elver [SMTP:[EMAIL PROTECTED]]
> Enviado el:   lunes 23 de abril de 2001 11:56
> Para: PHP General Mailing List
> Asunto:   [PHP] Site Structure
> 
> Hi,
> I have a site structure like:
> 
> -> root
> ---> includes
> ---> admin
> ---> images
> 
> I'm using headers and footers and they are in the includes directory. My 
> pages in the root directory include the files like:
> 
> include('includes/header.inc');
> 
> Thats woprks fine, but i want to be able ti use the same headers and
> footers 
> in the admin directory but, of course, the paths are going to be wrong.
> 
> How can i get around this?
> 
> Any ideas,
> 
> Jord
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] Site Structure

2001-04-23 Thread Martin Gottlieb


You could always:

include( "$DOCUMENT_ROOT/../includes/whatever.inc" );

or better yet, define include_path and then just:

include(  "whatever.inc" );

This give you the best of both worlds.  You never need to worry about
different
dir. structures on dev, staging, and production servers, AND you can keep
your includes out of a web server accessible directory.

Martin Gottlieb


-Original Message-
From: Toby Miller [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 3:44 PM
To: indrek siitan
Cc: PHP General Mailing List
Subject: Re: [PHP] Site Structure


While it is true that you don't have to put your files in the web directory
at all and it is a more secure option there is still one very large
inconvenience that prevents me from going with that option. You lose the
usefulness of just including "$DOCUMENT_ROOT/yourfolder/yourfilename". This
is the main reason that I do put my files in the root web directory. So how
do you tell all of your files where your included content is? Do you hard
code the path in every page? If so, do you also have development, stage, and
live environments that mimic the exact same directory structures? If not, do
you always change the include strings by hand every time you move from one
environment to another? Do you run into these problems? What kind of
solutions/workarounds have you implemented?

I have always used this style of including documents because it enables me
to do my mockup ideas on my Windows machine with PWS. Then I can move onto
my Linux test box and try the site in my home account. Then I can push the
exact same code to the dev server which uses www as the root web directory.
Then I can push the exact same code to the staging server for clients to see
which has wwwroot as the root web directory and the live environment mimics
the stage environment so that move makes little to no difference. Now if
someone else was working on the same project and checked the files out of
CVS they would have to tweak their copy to work in their special environment
instead of just running and developing the files. This just seems like a
whole lot of extra work to me. Correct me if I'm wrong, but the only way
anyone can see the source code of a php file if the extension is associated
with the PHP interpreter is if you provide a phps file that they can see or
if someone uninstalls the PHP interpreter (which bypasses the situation
because the first condition is no longer being met).

I'm really curious to see how other developers handle these kind of
development situations.

- Original Message -
From: "indrek siitan" <[EMAIL PROTECTED]>
To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
<[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 1:22 PM
Subject: RE: [PHP] Site Structure


> Hi,
>
> > Also, it's not a good idea to use the .inc extension unless you've
> > associated it with PHP. The reason is if I type the URL directly to
> > /includes/header.inc I will get the source code for that file in text
> > format.
>
> you don't have to keep your .inc files in the web server document
> root folder at all...
>
>
> Rgds,
>   Tfr
>
>  --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
>==--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] php install issues on IIS

2001-04-23 Thread Martin Gottlieb


You probably need to go into the IIS console ( mmc ) and go to 
properties on the directory in question and make sure either the
"execute" or "script" checkbox is checked.  You may also need to
verify the actual file permissions, but I believe this is more of
a configuration issue.

Martin Gottlieb

-Original Message-
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 5:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php install issues on IIS


Some of my co-workers are trying to install
php and when I run
phpinfo() I get this error, any ideas ?
I've only setup php on unix systems, so I am
at a loss here.

HTTP Error 403
403.1 Forbidden: Execute Access Forbidden

This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed.

Please contact the Web server's administrator if the problem persists.

Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]