diff --git a/BUGS b/BUGS new file mode 100644 index 00000000..c39c6b52 --- /dev/null +++ b/BUGS @@ -0,0 +1,12 @@ +There are no known bugs with Smarty, although there are some bugs in PHP that +cause problems with Smarty. preg_replace() had a parameter added in 4.0.2 that +is needed for Smarty. preg_grep() previous to 4.0.4 has a bug which Smarty has +a built-in workaround for. PHP 4.0.4 has a bug with user callbacks which would +cause this syntax in Smarty to crash PHP: {$varname|@modname} Use PHP 4.0.4pl1 +to fix this, or avoid using the "@" with modifiers. To be absolutely safe, use +4.0.4pl or later with Smarty. + +Also be sure to include the path to the PEAR libraries in your php +include_path. Config_file.class.php uses the PEAR library for its error +handling routines. PEAR comes with the PHP distribution. Unix users check +/usr/local/lib/php, windows users check C:/php/pear. diff --git a/FAQ b/FAQ index 977856c6..4417cbfa 100644 --- a/FAQ +++ b/FAQ @@ -17,10 +17,9 @@ A: preg_replace had a parameter added in PHP 4.0.2 that Smarty Q: I get the following error when running Smarty: Fatal error: Failed opening required 'PEAR.php' - (include_path='c:\inetpub\wwwroot\intra\php') in Config_File.class.php on - line 3 -A: The pear libraries come bundled with PHP. In Unix, the default location - is in /usr/local/lib/php/. On Windows, it is under - the directory you installed PHP, probably c:/php/pear/. - Locate these files and add this directory to your php_include path. + (include_path='') in Config_File.class.php on line 3 +A: Smarty uses the PEAR libraries for some of its error handling routines. + PEAR libraries come with the distribution of PHP. Be sure that the path to + these libraries is included in your php include_path. Unix users check + /usr/local/lib/php. Windows users check C:/php/pear. diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..2dfb7729 --- /dev/null +++ b/INSTALL @@ -0,0 +1,24 @@ +REQUIREMENTS: + + Smarty requires PHP 4.0.4pl1 or later to fix all known problems Smarty has + with PHP. Smarty was developed and tested with 4.0.4pl1. See the BUGS file + for more info. + + Smarty uses the PEAR libraries for some of its error handling routines. + PEAR libraries come with the distribution of PHP. Be sure that the path to + these libraries is included in your php include_path. Unix users check + /usr/local/lib/php. Windows users check C:/php/pear. + +INSTALLATION: + +* copy the Smarty.class.php, Smarty.addons.php and Config_File.class.php + scripts to a directory that is in your PHP include path. + +* in the same directory as your php application, create a "templates" + directory, "configs" directory and a "templates_c" directory. Be sure the + "templates_c" directory is writable by your web server user (usually nobody). + You can also chmod 777 this directory, but be aware of security issues for + multi-user systems. + +* setup your php and template files. A good working example is included to get + you started. diff --git a/README b/README index a32a27fa..ca347592 100644 --- a/README +++ b/README @@ -47,36 +47,6 @@ DESCRIPTION: * it is possible to imbed PHP code right in your template files, although not recommended and doubtfully needed since the engine is so customizable. - - -REQUIREMENTS: - - Smarty requires PHP 4.0.2 or later. Smarty was developed and tested - with 4.0.4pl1. See the BUGS section below. - -INSTALLATION: - -* copy the Smarty.class.php, Smarty.addons.php and Config_File.class.php - scripts to a directory that is in your PHP include path. - -* in the same directory as your php application, - create a "templates" directory and a "templates_c" directory. - Be sure the "templates_c" directory is writable by your - web server user (usually nobody), or chmod 777 the directory if - you are not sure. - -* setup your php and template files. A good working example is - included to get you started. - -BUGS: - - There are no known bugs with Smarty, although there are some bugs in PHP - that cause problems with Smarty. preg_replace() had a parameter added in - 4.0.2 that is needed for Smarty. preg_grep() previous to 4.0.4 has a bug - which Smarty has a built-in workaround for. PHP 4.0.4 has a bug with user - callbacks which would cause this syntax in Smarty to crash PHP: - {$varname|@modname} Use PHP 4.0.4pl1 to fix this, or avoid using the "@" - with modifiers. To be absolutely safe, use 4.0.4pl or later with Smarty. COPYRIGHT: Copyright(c) 2000,2001 ispi. All rights reserved. diff --git a/doc.sgm b/doc.sgm index ed765827..0fe2f338 100644 --- a/doc.sgm +++ b/doc.sgm @@ -1733,34 +1733,40 @@ is the first week that has at least 4 days in the current year, and with Monday