problemas com o smarty, estranh pq ta só na web !!!

7 views
Skip to first unread message

PHP_MASTER

unread,
Dec 11, 2009, 10:25:32 AM12/11/09
to php-brasil


bom galera como vcs sabem eu estou começando no smarty, fiz uma página
funcionou numa boa aki no pc usando o wamp como servidor, resolvi
testar na net(localweb) postei todos os arquivos da pasta www(ja que
só estavam as necessarias para smarty) e deu varios erros


Warning: include(smarty/libs/Smarty.class.php) [function.include]:
failed to open stream: No such file or directory in /home/storage/c/
93/24/profissionet/public_html/site/incluiSmarty.php on line 2

Warning: include(smarty/libs/Smarty.class.php) [function.include]:
failed to open stream: No such file or directory in /home/storage/c/
93/24/profissionet/public_html/site/incluiSmarty.php on line 2

Warning: include() [function.include]: Failed opening 'smarty/libs/
Smarty.class.php' for inclusion (include_path='.:/usr/share/pear') in /
home/storage/c/93/24/profissionet/public_html/site/incluiSmarty.php on
line 2

Fatal error: Class 'Smarty' not found in /home/storage/c/93/24/
profissionet/public_html/site/incluiSmarty.php on line 4

alguem já passou por isso

muito estranho pq na minha maquina ta 100% !!!!

Ninetails - Carlos Kazuo

unread,
Dec 11, 2009, 10:56:01 AM12/11/09
to php-b...@googlegroups.com
esse teu incluiSmarty.php está apontando errado o endereço 'físico' do
arquivo Smarty.class.php

tenta ver se existe o arquivo dentro de:
/home/storage/c/93/24/profissionet/public_html/site/smarty/libs/Smarty.class.php
(se não entendeu, ignore o '/home/storage/c/93/24/')
--------------------------------------------------
/**
* @author Ninetails - Carlos Kazuo <ninetails.nine [at] gmail.com>
*/



2009/12/11 PHP_MASTER <arc.c...@gmail.com>:
> --
>
> Você está recebendo esta mensagem porque se inscreveu no grupo "php-brasil" dos Grupos do Google.
> Para postar neste grupo, envie um e-mail para php-b...@googlegroups.com.
> Para cancelar a inscrição nesse grupo, envie um e-mail para php-brasil+...@googlegroups.com.
> Para obter mais opções, visite esse grupo em http://groups.google.com/group/php-brasil?hl=pt-BR.
>
>
>

PHP_MASTER

unread,
Dec 11, 2009, 12:03:58 PM12/11/09
to php-brasil
o caminho está correto dos 2...

eu fui verefcar, só pra ter certesa...

esta na mesma pasta do index.php(página onde dá o erro)

eu copiei a pasta toda e eu não uso caminhos completos como "c:/
wamp..." vou mandar o script da págia incluiSmarty.php

index.php

<?php
include 'incluiSmarty.php';

$smarty->assign('nome', 'Allan da Rocha');
$smarty->assign('seg_nome', ' no electra');

$smarty->display('index.tpl');
?>

fim index.php

incluiSmarty.php

<?php
include 'smarty/libs/Smarty.class.php';

$smarty = new Smarty;

$smarty->compile_check = true;

$smarty->template_dir = "smarty/templates/";
$smarty->compile_dir = "smarty/templates_c/";
$smarty->config_dir = "smarty/configs/";
$smarty->cache_dir = "smarty/cache/";

$smarty->left_delimiter = "-{";
$smarty->right_delimiter = "}-";

?>

fim incluiSmarty.php

Elton Schivei Costa

unread,
Dec 11, 2009, 1:51:19 PM12/11/09
to php-b...@googlegroups.com
A grande maioria dos servidores web, já possuem o Smarty pré instalado, retira seu "autoload" e apenas chame o smarty, sem chamar a página de inclusão.

2009/12/11 PHP_MASTER <arc.c...@gmail.com>
Reply all
Reply to author
Forward
0 new messages