Re: exploring include_path options for pecl/phar

From: Date: Tue, 04 Mar 2008 19:43:11 +0000
Subject: Re: exploring include_path options for pecl/phar
References: 1 2 3 4 5  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5160@lists.php.net to get a copy of this message
Steph Fox wrote: >> Maybe we should have a different name for files that need such >> special consideration - .pharx or something - and keep plain .phar >> for less complicated stuff. (Not pharts - you already said that was >> for bugs ;) Would that make the concept harder to grasp for the end >> user? I don't know, but I know for sure that _not_ marking files that >> need the extension in a very obvious way is likely to be problematic. > > ... unless it's possible for the default stub to 'know' when it's > being faced with stuff it can't cope with and die with an explanation > on its lips. In which case, ignore my earlier musings. > > - Steph (really not thinking straight today) Hi again, Actually, to tell the truth, on further reflection, I can't see how this will be a problem. Why? Most applications use set_include_path()/ini_set() with either 1) some form of dirname(__FILE__) to locate stuff 2) "." to refer to the current directory. Those using #1 will work because when executed inside a phar, it will use phar://<path/to/phar>, and those using #2 will work because . is always set to the right location if we started inside a phar. In truth, only application start points rely upon ".", and so only the most poorly written apps would need modification to work in or outside of a phar without change. I think I've found the magic bullet. Greg

« previous php.pecl.dev (#5160) next »