Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Al

I wasn't clear before.  The problem I'm having, and most of the others 
folks who commented, with include is really with include_path.

A good bit of the problem seems to be my virtual host's environment. 
Most things I've tried with directives in an htaccess don't work and the 
  error log says not allowed etc.

I appreciate your help.

Rasmus Lerdorf wrote:
 What does include have to do with DirectoryIndex?  And what exactly is
 your problem with include?  The only trick is setting the include_path
 which doesn't seem all that obtuse to me.
 
 -Rasmus
 
 On Sun, 11 Aug 2002, Al wrote:
 
 
The problem may be due to the fact that my environment is Apache Unix.

I spent about two hours today pouring over the php on-line manual
include spec and trying dozens of combinations.
http://www.php.net/manual/en/function.include.php

There must be at least 20 user contributed notes at the bottom.

It is incredible that such a basic php function should be so obtuse and
ill defined.

I'm going to give your other suggestion a try tomorrow.

Thanks again

Analysis  Solutions wrote:

On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:


The .htaccess approach appears to fit my situation best; but, I've not
been able to get it to work.


I wondered about the DirectoryIndex directive's ability to utilize files
in other directories, so did a little test, which is what you indicated
you tried in your initial email:

   DirectoryIndex ../index.htm

Worked fine.  Apache 1.3.26.  Windows NT.

So, your problem could be a web server configuration thing, as Rasmus
hinted at.

Beyond the things already discussed, I'm at a loss.

Good luck,

--Dan



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Rasmus Lerdorf

As mentioned a couple of times on that include page, you can just use
ini_set() directly in your application to set include_path.

eg.

?
ini_set(include_path,.:..:../..:/usr/local/lib/php);
include foo.inc;
?


That will run through each directory listed in your include path.  That
is, it will check for:

 ./foo.inc
 ../foo.inc
 ../../foo.inc
 /usr/local/lib/php/foo.inc

in that order.

-Rasmus

On Mon, 12 Aug 2002, Al wrote:

 I wasn't clear before.  The problem I'm having, and most of the others
 folks who commented, with include is really with include_path.

 A good bit of the problem seems to be my virtual host's environment.
 Most things I've tried with directives in an htaccess don't work and the
   error log says not allowed etc.

 I appreciate your help.

 Rasmus Lerdorf wrote:
  What does include have to do with DirectoryIndex?  And what exactly is
  your problem with include?  The only trick is setting the include_path
  which doesn't seem all that obtuse to me.
 
  -Rasmus
 
  On Sun, 11 Aug 2002, Al wrote:
 
 
 The problem may be due to the fact that my environment is Apache Unix.
 
 I spent about two hours today pouring over the php on-line manual
 include spec and trying dozens of combinations.
 http://www.php.net/manual/en/function.include.php
 
 There must be at least 20 user contributed notes at the bottom.
 
 It is incredible that such a basic php function should be so obtuse and
 ill defined.
 
 I'm going to give your other suggestion a try tomorrow.
 
 Thanks again
 
 Analysis  Solutions wrote:
 
 On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:
 
 
 The .htaccess approach appears to fit my situation best; but, I've not
 been able to get it to work.
 
 
 I wondered about the DirectoryIndex directive's ability to utilize files
 in other directories, so did a little test, which is what you indicated
 you tried in your initial email:
 
DirectoryIndex ../index.htm
 
 Worked fine.  Apache 1.3.26.  Windows NT.
 
 So, your problem could be a web server configuration thing, as Rasmus
 hinted at.
 
 Beyond the things already discussed, I'm at a loss.
 
 Good luck,
 
 --Dan
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Al

Appreciate the feedback, but.

The .htaccess approach appears to fit my situation best; but, I've not 
been able to get it to work.

I have a folder with a php script and that folder has several 
sub-folders each with a small configuration script.  I'd like the entry 
point to be a subfolder and main script [in the parent folder] to be 
symbolically executed.

I'm familiar with the DirectorIndex and use it often, but only for 
defining the default file for the particular folder.

Could I be doing something wrong? Or is there another htaccess directive 
  that may work?

Thanks.

Analysis  Solutions wrote:
 On Sat, Aug 10, 2002 at 01:12:38PM -0400, Al wrote:
 
I'm on a virtual host without a shell account and need execute a UNIX 
command.

ln -s ../afile.php index.php
 
 
 In a PHP script, you can do this -- if permissions are favorable:
 
exec('ln -s ../afile.php index.php');
 
 
 
Is there some way to do this [e.g., with a htaccess file]?
 
 
 In an .htaccess file, you can put this
 
 DirectoryIndex afile.php
 
 
 
What happens when you execute UNIX commands like the one above?  Does it 
make a file, change the config?
 
 
 It makes a link in the file system.  -s makes the link symbolic.
 http://www.tac.eu.org/cgi-bin/man-cgi?ln++NetBSD-current
 
 --Dan
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf

Does your AllowOverride include Indexes?  If it doesn't, you can't put
DirectoryIndex in a .htaccess.

httpd -L is your friend.

-Rasmus

On Sun, 11 Aug 2002, Al wrote:

 Appreciate the feedback, but.

 The .htaccess approach appears to fit my situation best; but, I've not
 been able to get it to work.

 I have a folder with a php script and that folder has several
 sub-folders each with a small configuration script.  I'd like the entry
 point to be a subfolder and main script [in the parent folder] to be
 symbolically executed.

 I'm familiar with the DirectorIndex and use it often, but only for
 defining the default file for the particular folder.

 Could I be doing something wrong? Or is there another htaccess directive
   that may work?

 Thanks.

 Analysis  Solutions wrote:
  On Sat, Aug 10, 2002 at 01:12:38PM -0400, Al wrote:
 
 I'm on a virtual host without a shell account and need execute a UNIX
 command.
 
 ln -s ../afile.php index.php
 
 
  In a PHP script, you can do this -- if permissions are favorable:
 
 exec('ln -s ../afile.php index.php');
 
 
 
 Is there some way to do this [e.g., with a htaccess file]?
 
 
  In an .htaccess file, you can put this
 
  DirectoryIndex afile.php
 
 
 
 What happens when you execute UNIX commands like the one above?  Does it
 make a file, change the config?
 
 
  It makes a link in the file system.  -s makes the link symbolic.
  http://www.tac.eu.org/cgi-bin/man-cgi?ln++NetBSD-current
 
  --Dan
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Analysis Solutions

On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:
 
 The .htaccess approach appears to fit my situation best; but, I've not 
 been able to get it to work.

I wondered about the DirectoryIndex directive's ability to utilize files 
in other directories, so did a little test, which is what you indicated 
you tried in your initial email:

   DirectoryIndex ../index.htm

Worked fine.  Apache 1.3.26.  Windows NT.

So, your problem could be a web server configuration thing, as Rasmus 
hinted at.

Beyond the things already discussed, I'm at a loss.

Good luck,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Al

The problem may be due to the fact that my environment is Apache Unix.

I spent about two hours today pouring over the php on-line manual 
include spec and trying dozens of combinations. 
http://www.php.net/manual/en/function.include.php

There must be at least 20 user contributed notes at the bottom.

It is incredible that such a basic php function should be so obtuse and 
ill defined.

I'm going to give your other suggestion a try tomorrow.

Thanks again

Analysis  Solutions wrote:
 On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:
 
The .htaccess approach appears to fit my situation best; but, I've not 
been able to get it to work.
 
 
 I wondered about the DirectoryIndex directive's ability to utilize files 
 in other directories, so did a little test, which is what you indicated 
 you tried in your initial email:
 
DirectoryIndex ../index.htm
 
 Worked fine.  Apache 1.3.26.  Windows NT.
 
 So, your problem could be a web server configuration thing, as Rasmus 
 hinted at.
 
 Beyond the things already discussed, I'm at a loss.
 
 Good luck,
 
 --Dan
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf

What does include have to do with DirectoryIndex?  And what exactly is
your problem with include?  The only trick is setting the include_path
which doesn't seem all that obtuse to me.

-Rasmus

On Sun, 11 Aug 2002, Al wrote:

 The problem may be due to the fact that my environment is Apache Unix.

 I spent about two hours today pouring over the php on-line manual
 include spec and trying dozens of combinations.
 http://www.php.net/manual/en/function.include.php

 There must be at least 20 user contributed notes at the bottom.

 It is incredible that such a basic php function should be so obtuse and
 ill defined.

 I'm going to give your other suggestion a try tomorrow.

 Thanks again

 Analysis  Solutions wrote:
  On Sun, Aug 11, 2002 at 12:33:55PM -0400, Al wrote:
 
 The .htaccess approach appears to fit my situation best; but, I've not
 been able to get it to work.
 
 
  I wondered about the DirectoryIndex directive's ability to utilize files
  in other directories, so did a little test, which is what you indicated
  you tried in your initial email:
 
 DirectoryIndex ../index.htm
 
  Worked fine.  Apache 1.3.26.  Windows NT.
 
  So, your problem could be a web server configuration thing, as Rasmus
  hinted at.
 
  Beyond the things already discussed, I'm at a loss.
 
  Good luck,
 
  --Dan
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie question about UNIX command-line directives

2002-08-10 Thread Analysis Solutions

On Sat, Aug 10, 2002 at 01:12:38PM -0400, Al wrote:
 I'm on a virtual host without a shell account and need execute a UNIX 
 command.
 
 ln -s ../afile.php index.php

In a PHP script, you can do this -- if permissions are favorable:

   exec('ln -s ../afile.php index.php');


 Is there some way to do this [e.g., with a htaccess file]?

In an .htaccess file, you can put this

DirectoryIndex afile.php


 What happens when you execute UNIX commands like the one above?  Does it 
 make a file, change the config?

It makes a link in the file system.  -s makes the link symbolic.
http://www.tac.eu.org/cgi-bin/man-cgi?ln++NetBSD-current

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php