TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-10-2007, 11:04 PM   #1 (permalink)
The Acquainted
 
obolus's Avatar
 
Join Date: Oct 2007
Location: florida
Posts: 110
Thanks: 36
obolus is on a distinguished road
Default Trouble with Smarty

Note: I removed the dir names from the file paths below. They are replaced with '--'

I keep getting this error when I try to load my index.php file...

Quote:
Warning: Smarty error: unable to read resource: "news.tpl" in /--/--/lib/php/smarty/Smarty.class.php on line 1095
I'm not sure why I get this error. Everything has the right chmod perms, all the file paths are correct, I haven't touched any of the coding in the class file.

The code for my index.php file is as follows:

PHP Code:
<?php

require('/--/--/lib/php/smarty/Smarty.class.php');

$smarty = new Smarty();

$smarty->template_dir '--/--/inc/smarty/templates';
$smarty->compile_dir '--/--/inc/smarty/templates_c';
$smarty->cache_dir '--/--/inc/smarty/cache';
$smarty->config_dir '--/--/inc/smarty/configs';

$smarty->display('news.tpl');

?>
yea, I'm a newb
obolus is offline  
Reply With Quote
Old 10-11-2007, 02:59 AM   #2 (permalink)
The Acquainted
 
obolus's Avatar
 
Join Date: Oct 2007
Location: florida
Posts: 110
Thanks: 36
obolus is on a distinguished road
Default

Nevermind! I fixed it.

The problem was that some of the filenames in the all important 'internals' dir have extra long filenames. I run an older version of OSX on this computer, and while most of the time I don't have this problem- it pops up sometimes and I don't even realize it. Basically, old versions of OSX (and any Mac OS previous to that), will cutoff long filenames and stick numeric characters at the end. So instead of "really_long_long_long_long_name.php", I'll end up with "really_long_long_lon2392841.php". If you're a mac user, check your filenames!

Last edited by obolus : 10-11-2007 at 03:00 AM. Reason: I can't spell!
obolus is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:33 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design