tpl, installation

From: Date: Mon, 01 Jul 2002 19:55:36 +0000
Subject: tpl, installation
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5132@lists.php.net to get a copy of this message
Hi, I'm new to php, so I apologize in advance for the newbie question. I am working on a website that is housed on a unix server that I am not allowed very many privileges to. I was able to copy the Smarty files to the server, and I didn't place them in the public_html folder but in a smarty folder at the same level as the public_html. I gave the smarty directory read, write and execute privileges. I made a test page in public_html and inserted code calling the smarty class. Here's that code: <?php ini_set("include_path",".:/users2/hro/smarty/"); require 'Smarty.class.php'; $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = true; $smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill"); $smarty->assign("FirstName",array("John","Mary","James","Henry")) ; $smarty->assign("LastName",array("Doe","Smith","Johnson","Case")) ; $smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"), array("I", "J", "K", "L"), array("M", "N", "O", "P"))); $smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"), array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234"))); $smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX")); $smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas")); $smarty->assign("option_selected", "NE"); $smarty->display('index.tpl'); ?> ******** I get these errors when I try to view this page in my browser: Warning: Smarty error: unable to read template resource: "index.tpl" in /users2/hro/smarty/Smarty.class.php on line 546 Warning: Smarty error: unable to read template resource: "file:debug.tpl" in /users2/hro/smarty/Smarty.class.php on line 546 ******** I've never used the extension ".tpl" before. I wonder if that has anything to do with the above error or if it's a permission error or possibly even a location-of-files error. I'm not an experienced unix person. I'm also afraid that if I ask the systems administrators who own the unix if they can help, that they would quickly tell me that this is above and beyond what they will allow. I have read chapter 2 of your installation guide and made the appropriate directories (or so I think): Here's what my directory looks like: . .. public_html smarty . .. .cvsignore -rw-r-r- AUTHORS -rw-r-r-- BUGS -rw-r-r- COPYING.lib -rw-r-r- CREDITS -rw-r-r- ChangeLog -rw-r-r- Config_File.class.php -rw-r-r- FAQ -rw-r-r- INSTALL -rw-r-r- NEWS -rw-r-r- QUICKSTART -rw-r-r- README -rw-r-r- RELEASE_NOTES -rw-r-r- RESOURCES -rw-r-r- Smarty.class.php -rw-r-r- Smarty_Compiler.class.php -rw-r-r- TESTIMONIALS -rw-r-r- TODO -rw-r-r- Cache drwx----- I don't see "nobody" as an owner. The lines generally read like this: * rw-r-r-- 1 hro provider 473 Mar 1 13:26 RESOURCES So, if I'm deciphering correctly, hro is the owner and provider is the group. You said in the installation instructions: "...there are a few things to be aware of. Smarty creates PHP scripts from the templates. This usually means allowing user 'nobody' (or whomever the web server runs as) to have permission to write the files." I'm definitely not sure how to do that here. I tried the chown command but couldn't seem to get it to work. I know this is one hulkin' email and question but I just thought that if I never asked, I'd never have a chance of getting an answer. Thanks so much for lending your awesome program to the world!!!! Sincerely, Patti

« previous php.smarty.general (#5132) next »