cvs: smarty / FAQ QUICKSTART /docs programmers.sgml

From: Date: Fri, 26 Apr 2002 14:08:17 +0000
Subject: cvs: smarty / FAQ QUICKSTART /docs programmers.sgml
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-69@lists.php.net to get a copy of this message
mohrt Fri Apr 26 10:08:17 2002 EDT Modified files: /smarty FAQ QUICKSTART /smarty/docs programmers.sgml Log: update FAQ, QUICKSTART, small doc syntax fix Index: smarty/FAQ diff -u smarty/FAQ:1.35 smarty/FAQ:1.36 --- smarty/FAQ:1.35 Thu Apr 11 16:27:04 2002 +++ smarty/FAQ Fri Apr 26 10:08:17 2002 @@ -19,6 +19,9 @@ Q: Smarty doesn't work. Q: I get the following error when running Smarty: + Warning: Smarty error: problem creating directory "templates_c/239/239105369" + in /path/to/Smarty.class.php on line 542 +Q: I get the following error when running Smarty: Warning: Wrong parameter count for preg_replace() in Smarty.class.php on line 371 Q: I get this error when passing variables to {include}: @@ -147,8 +150,20 @@ past 2.0.1. Read the BUGS file for more info. Q: I get the following error when running Smarty: - Warning: Wrong parameter count for preg_replace() in - Smarty.class.php on line 371 + Warning: Smarty error: problem creating directory "templates_c/239/239105369" + in /path/to/Smarty.class.php on line 542 +A: Your web server user does not have permission to write to the templates_c + directory, or is unable to create the templates_c directory. Be sure the + templates_c directory exists in the location defined in Smarty.class.php, + and the web server user can write to it. If you do not know the web server + user, chmod 777 the templates_c directory, reload the page, then check the + file ownership of the files created in templates_c. Or, you can check the + httpd.conf (usually in /usr/local/apache/conf) file for this setting: + User nobody + Group nobody + +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.6 to fix all known PHP issues with Smarty. Index: smarty/QUICKSTART diff -u smarty/QUICKSTART:1.20 smarty/QUICKSTART:1.21 --- smarty/QUICKSTART:1.20 Sat Mar 2 12:34:42 2002 +++ smarty/QUICKSTART Fri Apr 26 10:08:17 2002 @@ -13,13 +13,13 @@ INSTALLATION ------------ -Unpack the Smarty tarball. You will see four class files: Smarty.class.php, -Smarty_Compiler.class.php and Config_File.class.php and a -"plugins" directory. You will need to have all four of these files somewhere in -your PHP include path, so when you call require("Smarty.class.php") from within -your application, it can find the class. Alternatively, you can set the -SMARTY_DIR constant in your application, and Smarty will use that directory as -the path to the Smarty class files. Be sure the path ends with a slash! +Unpack the Smarty tarball. You will see some files: Smarty.class.php, +Smarty_Compiler.class.php, Config_File.class.php and a "plugins" directory. You +will need all of these files somewhere in your PHP include path, so when you call +require("Smarty.class.php") from within your application, it can find the +class. Alternatively, you can set the SMARTY_DIR constant in your application, +and Smarty will use that directory as the path to the Smarty class files. Be +sure the SMARTY_DIR path ends with a slash! Now change directories somewhere inside of your web server document root. For this guide, we'll create a directory under the document root named "Smarty", @@ -37,9 +37,10 @@ Smarty needs to be able to write to the templates_c directory. It is recommended that you change the ownership and write permissions such that the -web server user (usually nobody) has write access to this directory. You can -chmod 777 the directory, but be aware of security concerns on multi-user -systems. See the documentation for more info on this. +web server user (usually "nobody:nobody", Mac OS X uses "www:www") has write +access to this directory. You can chmod 777 the directory, but be aware of +security concerns on multi-user systems. See the documentation for more info on +this. $> chown nobody:nobody templates_c $> chmod 700 templates_c @@ -243,7 +244,7 @@ values internal to the template. Notice that when printing variables inside of the section, the section name must be referenced in the name of the variable being displayed. This lets Smarty understand that you want to print the value -in the array postion indexed by the current loop value. There are also internal +in the array position indexed by the current loop value. There are also internal template variables available within the section that display the loop iteration and the total number of times the section is looped. Also note the {sectionelse}. This would have been displayed if looped array $FirstName was Index: smarty/docs/programmers.sgml diff -u smarty/docs/programmers.sgml:1.9 smarty/docs/programmers.sgml:1.10 --- smarty/docs/programmers.sgml:1.9 Wed Apr 24 10:46:02 2002 +++ smarty/docs/programmers.sgml Fri Apr 26 10:08:17 2002 @@ -1,4 +1,4 @@ - <part id="smarty.for.programmersr"> + <part id="smarty.for.programmers"> <title>Smarty For Programmers</title> <chapter id="api.variables"> <title>Variables</title>

« previous php.smarty.cvs (#69) next »