On Thu, Sep 02, 2004 at 07:08:20PM +1000, O Plameras wrote:
> Matthew Davidson wrote:
> >Here's a really elementary question about symlinks that's taxing my 
> >limited mental capacity:
> >
> >I want to write some php apps to be made available to a number of 
> >virtual hosts on a web server.  It seems to me that you should be able 
> >to put the apps themselves somewhere outside the web root, for 
> >instance '/usr/share/phpapp', and have a symlink from the virtual 
> >hosts web root, i.e.:
> >
> >/var/www/host.domain.tld/phpapp => /usr/share/phpapp
> 
> You rename directories for httpd access using the 'Alias Directory'
> command.  Renaming with 'ln -s' does not work.

But that's not a web thing, it's just that symlinks are often followed
to their end before applying the '..', so you go to the place you didn't
intend.

> But there is a conventional way to access PHP modules or include
> files. This is done by declaring the directory from where to get the PHP
> scripts to be included in your /etc/php.ini. Look for a line that says,

Or, better still, use
ini_set('include_path', '.:/usr/share/php:/usr/share/phpapp'); at the top of
your entry point, and all will be well.  Fiddling with include_path in
php.ini shouldn't be done for one application -- imagine if I wanted to
include something that also happened to be in /usr/share/phpapp... A train
wreck could result.

> include_path = "/path1;,/path2; etc.............."
> 
> It will look like so,
> 
> include_path = ".;/usr/share/phpapp"

Those should be colons, not semi-colons, unless you're running PHP in
windows, in which case you've got bigger problems (like not having real
symlinks).

- Matt

-- 
"You keep using that word.  I do not think it means what you think it means."
        -- Inigo, The Princess Bride

Attachment: signature.asc
Description: Digital signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to