From 2c66d422d415b8cf567e52c467c9895472791782 Mon Sep 17 00:00:00 2001 From: mohrt Date: Sun, 21 Jan 2001 22:17:28 +0000 Subject: [PATCH] updates to FAQ and docs --- FAQ | 18 ++++++++++++++++-- doc.sgm | 4 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/FAQ b/FAQ index 9c6e58f3..977856c6 100644 --- a/FAQ +++ b/FAQ @@ -1,12 +1,26 @@ TROUBLESHOOTING --------------- +Q: Smarty doesn't work. +A: You must be using PHP 4.0.4pl1 or later to fix all known problems + Smarty has with PHP. Read the BUGS section of the documentation. + Q: Smarty is recompiling my templates on every invocation. -A: This is a bug that was fixed, grab the latest tarball. +A: This is a bug that was fixed in 1.0a, grab the latest tarball. Q: I get the following error when running Smarty: Warning: Wrong parameter count for preg_replace() in Smarty.class.php on line 371 A: preg_replace had a parameter added in PHP 4.0.2 that Smarty - requires. Upgrade to at least 4.0.4pl to fix all PHP issues with + requires. Upgrade to at least 4.0.4pl to fix all known PHP issues with 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. + diff --git a/doc.sgm b/doc.sgm index 81107ded..ed765827 100644 --- a/doc.sgm +++ b/doc.sgm @@ -796,7 +796,7 @@ Intro = """This is a value that spans more parameters #banner_location_id# and #site_id#. Smarty will look for a function named insert_getBanner() in your PHP application, passing the values of #banner_location_id# and #site_id# as the first argument - in an indexed array. All insert function names in + in an associative array. All insert function names in your application must be prepended with "insert_" to remedy possible function name-space conflicts. Your insert_getBanner() function should do something with the passed values and return the results. These results @@ -1429,7 +1429,7 @@ OUTPUT: All attributes passed to custom functions are passed into the - first argument as an indexed array. One way to get to those + first argument as an associative array. One way to get to those values is to call extract(func_get_arg(0)); at the top of your function. Anything that the function returns gets displayed in place of the tag in the template.