View previous topic :: View next topic |
Author |
Message |
queen Smarty n00b
Joined: 13 Aug 2010 Posts: 1
|
Posted: Fri Aug 13, 2010 11:42 am Post subject: Instalation and setup |
|
|
This is what seems to be happening to me. I'm using windows with apache/php/mysql. I've had no real issues getting smarty going on linux and mac os x, however, we're pulling our hair out. It should be noted that we aren't windows people, but have opened up permissions on the directories. |
|
Back to top |
|
brusley Smarty n00b
Joined: 16 Aug 2010 Posts: 1
|
Posted: Mon Aug 16, 2010 7:03 am Post subject: Instalation and setup |
|
|
This is what seems to be happening to me. I'm using windows with apache/php/mysql. I've had no real issues getting smarty going on linux and mac os x, however, we're pulling our hair out. It should be noted that we aren't windows people, but have opened up permissions on the directories. |
|
Back to top |
|
tong Smarty n00b
Joined: 16 Aug 2010 Posts: 1
|
Posted: Mon Aug 16, 2010 10:18 am Post subject: Instalation and setup |
|
|
you can verify that this is setup properly: create a php script to write a file into the directory you specified for templates_c (and/or cache). This should always work if the directory is writable by the script owner. The trick is to then try to read that file from your php script -- safe mode restricts reads, not writes. If that throws an error, you have a permission settings issue. |
|
Back to top |
|
fillcraft Smarty n00b
Joined: 03 Oct 2010 Posts: 3
|
Posted: Sun Oct 03, 2010 3:38 pm Post subject: |
|
|
Ok, what user is apache using by default? Was won created during apache install? |
|
Back to top |
|
vlad277qipru Smarty n00b
Joined: 02 Mar 2011 Posts: 1
|
Posted: Wed Mar 02, 2011 10:05 am Post subject: |
|
|
I used the quick manual below, but I copied Smarty/ into public_html/ not into php/
http://www.smarty.net/quick_install
URL: http://boromax.net23.net//Smarty/docs/myapp/
Quote: |
Warning: require() [function.require]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/Smarty/libs/Smarty.class.php) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a5993328/public_html/Smarty/docs/myapp/index.php on line 5
|
index.php:
[code=nocolor]
<?php
// put full path to Smarty.class.php
echo($_SERVER['DOCUMENT_ROOT'].'/Smarty/libs/Smarty.class.php');
require($_SERVER['DOCUMENT_ROOT'].'/Smarty/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->setTemplateDir('Smarty/templates');
$smarty->setCompileDir('Smarty/templates_c');
$smarty->setCacheDir('Smarty/cache');
$smarty->setConfigDir('Smarty/configs');
$smarty->assign('name', 'Ned');
$smarty->display('index.tpl');
?>
[/code]
I use a free hosting 000webhost.
What is wrong? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
indy80s Smarty n00b
Joined: 07 Feb 2009 Posts: 3
|
Posted: Mon Jan 16, 2012 10:23 pm Post subject: |
|
|
I changed compile_dir permissions to 777 and works.
for security we can change the name of the dir to the fancy one like smartycompile9a6dbdy
cheers _________________ Always for hire. Freelance till die |
|
Back to top |
|
hakq12 Smarty n00b
Joined: 21 May 2015 Posts: 1
|
Posted: Thu May 21, 2015 10:09 am Post subject: reply |
|
|
im getting the same error too how do i solve it? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri May 22, 2015 7:00 am Post subject: |
|
|
Have you created the working directories withe the right permissions
If you are using Smarty 3 you can run
Code: | $smarty->testInstall(); | to check your installation. |
|
Back to top |
|
|