- To: Matthew Palmer <mpalmer@xxxxxxxxxxx>
- Subject: Re: [SLUG] Symlinks and PHP4
- From: O Plameras <oscarp@xxxxxxxxxxx>
- Date: Thu, 02 Sep 2004 20:44:09 +1000
- Cc: slug@xxxxxxxxxxx
- User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)
Matthew Palmer wrote:
On Thu, Sep 02, 2004 at 08:26:37PM +1000, O Plameras wrote:
Matthew Palmer wrote:
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.
Programmers have their styles. I follow PHP programming conventions
that I know works and practised by many.
Just because lots of people do it doesn't make it any less retarded. If
everyone stacks their own app's directory in php.ini, sooner or later you're
going to end up with filename collision. Soon after that, someone is going
to take a header off a building.
That's the reason for having 'php.ini'.
It's not only that it's the convention, it's neater, less claterry, and
cleaner.
But more importantly, the designer intended the 'include_path'
declaration statement in 'php.ini'
to handle the 'includes' which includes the 'requires'.
Also, learning how to do things when you 0wn the box is nice, but one day
you're not going to be able to fiddle with php.ini on a whim, and an
inability to work effectively without having gratuitous r00t is not going to
win you any friends at any hosting company I've ever interacted with.
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).
In /etc/php.ini the correct syntax is semi-colon ( ; ) and not colon (:).
Only if you want to comment something out. Take a look at your php.ini file
sometime. I'll even do it for you:
; UNIX: "/path1:/path2" Windows: "\path1;\path2"
include_path = ".:/usr/share/pear:/usr/share/php"
OK, you are right here. My mistake. In UNIX the separator is colon (:).
Oh, and drop the Cc. Of course I'm subscribed to the list, how else did I
reply to the original message?
- Matt