You are here: Re: [SMARTY] Upgrade to debian testing breaks smarty sites « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Upgrade to debian testing breaks smarty sites

Posted by Messju Mohr on 09/30/70 11:13

safe_mode enabled?
try

echo file_get_contents('/var/www/ioc3.unesco.org/www/apps/test/templates/index.tpl');

to see if the file is readable by php/apache in the first place.

On Thu, Apr 14, 2005 at 03:39:34PM +0200, Sims, Benjamin wrote:
> Thanks,
>
> I don't think it is an include problem, since the error is being thrown
> from smarty itself.
>
> I tried adding to the include path as you mention, but result is the
> same.
>
> Ben
>
> -----Original Message-----
> From: Riviere Informatique SARL [mailto:svdbeek@rivinfo.com]
> Sent: 14 April 2005 15:12
> To: Sims, Benjamin
> Cc: smarty-general@lists.php.net
> Subject: Re: [SMARTY] Upgrade to debian testing breaks smarty sites
>
>
> Ah. Maybe you should include the following line in your php.ini
> (/etc/php4/apache/php.ini)
> include_path = "/usr/share/php/smarty/libs"
>
> That way you don't need to add a complete path in your include but can
> just do
> include('Smarty.class.php')
>
> There's loads of other programs in that directory that Smarty probably
> needs.
> Don't forget to stop/start your apache after this.
>
> I'm running this on Debian unstable and it runs fine.
>
> Regards,
> Steven.
>
> Sims, Benjamin wrote:
>
> Thanks, it is www-data but this is what it was before. I have set up the
>
> following simple script as a test:
>
>
>
> //php code -----------------------------------------------------------
>
> <?php
>
> include('/usr/share/php/smarty/libs/Smarty.class.php');
>
>
>
> // create object
>
> $smarty = new Smarty;
>
>
>
> //config
>
> $smarty->template_dir =
>
> '/var/www/ioc3.unesco.org/www/apps/test/templates/';
>
> $smarty->compile_dir =
>
> '/var/www/ioc3.unesco.org/www/apps/test/templates_c/';
>
> $smarty->cache_dir = '/var/www/ioc3.unesco.org/www/apps/test/cache/';
>
> $smarty->config_dir = '/var/www/ioc3.unesco.org/www/apps/test/configs/';
>
>
>
> // display it
>
> $smarty->display('index.tpl');?>
>
> //end code -----------------------------------------------------------
>
>
>
> The index.tpl file contains only:
>
>
>
> 'This is a test'
>
>
>
> I have also executed (to be sure):
>
>
>
> Chown -R www-data /var/www/myserver.com/www/apps/test
>
> Chmod 777 -r /var/www/myserver.com/www/apps/test
>
>
>
>
>
> Still cannot read resource! Is there any way I can alter Smarty.class to
>
> get a full path/name for the template it is going for?
>
>
>
> Ben
>
>
>
>
>
>
>
> -----Original Message-----
>
> From: Riviere Informatique SARL [mailto:svdbeek@rivinfo.com]
>
> Sent: 14 April 2005 14:07
>
> To: Sims, Benjamin
>
> Cc: smarty-general@lists.php.net
>
> Subject: Re: [SMARTY] Upgrade to debian testing breaks smarty sites
>
>
>
>
>
> Hi Benjamin,
>
>
>
> Check the access rights on the template directories and files. The user
>
> running your apache server may have changed. Go to /etc/apache and check
>
> the values of 'User' and 'Group' in the
>
> httpd.conf file (I believe the default is www-data).
>
> (Or do a 'ps -ef | grep apache')
>
>
>
> Regards,
>
> Steven.
>
>
>
> Sims, Benjamin wrote:
>
>
>
>
>
> I've had a rather catastrophic failure upgrading from Debian stable to
>
> testing (ie to PHP 4.3.3 and Apache 1.3).
>
>
>
> I now receive a "Warning: Smarty error: unable to read resource:
>
> "index.tpl" in /usr/share/php/smarty/libs/Smarty.class.php on line
>
> 1088" when accessing the home page.
>
>
>
> The templates are in the same place as before, but it seems they can no
>
>
>
>
>
>
>
> longer be read.
>
>
>
> Any ideas much appreciated!
>
>
>
> Benjamin
>
>
>
>
>
>
>
>
>
>
>
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация