path/to/smarty in include_path, package.xml
| From: | Roman Neuhauser | Date: | Fri, 26 Sep 2003 17:06:30 +0000 |
| Subject: | path/to/smarty in include_path, package.xml | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-1879@lists.php.net to get a copy of this message | ||
Hi there,
I've searched the archives @ marc.theaimsgroup.com for package.xml,
which returns 0 hits, and searches for include_path return too many hits
to be any useful, so I'm here.
I've always wondered why Smarty assumes to be in the include_path. Not
that it wouldn't work flawlessly when it's in a subdir of a directory
in include_path, but the manual contains e. g.
// Edit your php.ini file, add the Smarty library
// directory to the include_path and restart web server.
// Then the following should work:
require('Smarty.class.php');
$smarty = new Smarty;
The text itself admits in a subtle way that the procedure being
recommended is lame.
// Install the Smarty library in a subdir of directory that's in
// the include_path. Then the following should work:
require('Smarty/Smarty.class.php');
$smarty = new Smarty;
Users do tend to follow bad advice given them in a manual. :)
We've been using 2.1.0 here until a couple of days ago, including Smarty
exactly as above without any problems, I recently upgraded one
development machine to 2.5.0, with the contents of lib/ in
/usr/local/lib/php/Smarty, and the rest in the default locations
(/usr/local/share/examples/smarty etc.), and it just works.
And here we get to the package.xml file: if Smarty had an official
package.xml file, it could be installed and upgraded with pear(1),
which would be a good thing in itself, but would also fix a real problem
this would create otherwise: Smarty works on Windows, and presence of
make(1) on a win32 box cannot be possibly assumed. pear(1) does run on
windows, so this is IMO a non-issue.
What do you think? BTW, Alan Knowles posted a package.xml file for
Smarty 2.4.2 to smaty-general@ in February. I don't see any followup to
his message, isn't this an interesting thing?
--
FreeBSD 4.8-STABLE
6:45PM up 1 day, 19:40, 19 users, load averages: 0.16, 0.08, 0.02