Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

blank page

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
kurtis123
Smarty n00b


Joined: 28 Jun 2007
Posts: 3

PostPosted: Thu Jun 28, 2007 7:26 pm    Post subject: blank page Reply with quote

hello, I did the example in the documentation, I had no error, but I got a blank page, but in view source, I can see this:
<?php
/* Created on: 2007-06-21 */
Hello, Ned
?>
I'm using Wamp5 1.7

thx
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Thu Jun 28, 2007 8:33 pm    Post subject: Reply with quote

Did you surround your template with <? ?> tags?
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
kurtis123
Smarty n00b


Joined: 28 Jun 2007
Posts: 3

PostPosted: Thu Jun 28, 2007 9:09 pm    Post subject: Reply with quote

Celeb wrote:
Did you surround your template with <? ?> tags?


DOH!, you're right, that was my mistake.

thank you.
Back to top
View user's profile Send private message
IceFire
Smarty n00b


Joined: 10 Jul 2007
Posts: 1

PostPosted: Tue Jul 10, 2007 8:09 pm    Post subject: same problem Reply with quote

Hello, experts, I have the same problem.

I just took example from distr Smarty 2.6.18 and uploaded it to my host. Then I fix index.php. I wrote next lines:

Code:

require '/home/u70709/XXXX.ru/www/libs/Smarty.class.php';

$smarty = new Smarty;

$smarty->compile_check = true;
$smarty->debugging = true;

$smarty->error_reporting=E_ALL;
$smarty->error_reporting(E_ALL);

$smarty->template_dir = '/home/u70709/XXXX.ru/www/templates/';
$smarty->compile_dir = '/home/u70709/XXXX.ru/www/templates_c/';
$smarty->cache_dir = '/home/u70709/XXXX.ru/www/cache/';
$smarty->config_dir = '/home/u70709/XXXX.ru/www/configs/';
....


And, of course, I set up "'SMARTY_DIR" and "include_path". Like that:
Code:

define('SMARTY_DIR', '/home/u70709/XXX.ru/www/smarty/');
ini_set("include_path","/home/u70709/XXX.ru/www/smarty/");


All lib-files was uploaded to the host.

But, then I open index.php, I see the blank page!

Please, give me advice. Thanks.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jul 11, 2007 3:36 pm    Post subject: Reply with quote

Do make sure to set PHP's error reporting level to E_ALL and to have it display errors (or failing the last part, to have access to the error logs).
Back to top
View user's profile Send private message
neuropharm
Smarty n00b


Joined: 09 Sep 2011
Posts: 1

PostPosted: Fri Sep 09, 2011 10:21 pm    Post subject: Reply with quote

here's my problem.

When I submit a page to a function it stops executing the function and I get blank page.

This is where the function stops

Code:
 $smarty->assign("email_name", $email_name);


Here is the full function
Code:

     function NEICertEnroll($POST,$smarty) {
        $email_name            =   trim(addslashes($POST['name']));
        $email_companyname       =   trim(addslashes($POST['companyname']));
        $email_emailaddress    =   trim(addslashes($POST['emailaddress']));
        $email_loginname       =   trim(addslashes($POST['loginname']));
        $email_masid         =   trim(addslashes($POST['masid']));
      
       $emailAdmin   = 'blocked@spam.com';
       
       // MAIL FUNCTION
         
        $mail1=   new PHPMailer();
        $mail1->IsHTML(true);
        $mail1->From = GLOBAL_ADMIN_EMAIL;
        $mail1->Sender = GLOBAL_ADMIN_EMAIL;
        $mail1->FromName  =   'Website';
        $mail1->Subject   =   "Your Enrollment Request";
    
           // ASSIGN SMARTY VARIABLES FOR EMAIL TEMPLATE
            $smarty->assign("email_name", $email_name);
           $smarty->assign("email_companyname", $email_companyname);
           $smarty->assign("email_emailaddress", $email_emailaddress); 
           $smarty->assign("email_loginname", $email_loginname);
           $smarty->assign("email_masid", $email_masid);

           // ASSIGN LOGO URL
           $smarty->assign("global_logo_path", GLOBAL_SITE_URL.'/content/skins/admin/images/logo_big.jpg');
                              
           $email_html = $smarty->fetch("email_templates/email_template.tpl");
          
           $mail1->Body      =  $email_html;
           $mail1->AddAddress($emailAdmin);
           $send   =   $mail1->Send();
      
           if ($send) {
               return 1; // IF MAIL SENT
            } else {
                 return 2; // IF NOT SEND   
            }   
      
     }


PHP Version 5.3.2-1ubuntu4.9
Smarty v2? idk, how do you find out what version of smarty
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP