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

Smarty 3.1.33 with php 7.3 not working

 
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
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Wed Feb 27, 2019 4:49 am    Post subject: Smarty 3.1.33 with php 7.3 not working Reply with quote

Hi,

Currently My project in Smarty 2.6.26 with php 5.4, It's working fine.
Now i want to upgrade php 7 and smarty Smarty 3.

I have configured all things but It's not running. Crying or Very sad

Pls anyone tell me, how can i do this.

Thanks,
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Feb 27, 2019 10:07 am    Post subject: Reply with quote

"It's not running" is not a useful measurement.
Please explain clearly, what's not working, what error messages, if any, you receive.
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Wed Feb 27, 2019 5:40 pm    Post subject: when i running my project showing this errors Reply with quote

Fatal error: Uncaught Error: Call to a member function _callExternalMethod() on null in D:\smarty-3.1.33\libs\sysplugins\smarty_internal_data.php:290 Stack trace: #0 D:\xampp\htdocs\entrar\view\application.php(7): Smarty_Internal_Data->__call('Smarty', Array) #1 D:\xampp\htdocs\entrar\model\session.php(5): Application->__construct() #2 D:\xampp\htdocs\entrar\controller\controller.php(7): require_once('D:\\xampp\\htdocs...')
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Wed Feb 27, 2019 5:44 pm    Post subject: Reply with quote

I am using this code in application.php

require_once SMARTY_CLASS;
class Application extends Smarty
{
public function __construct()
{
parent::Smarty();

$application = new Application();
$application->setTemplateDir(TEMPLATE_DIR);
$application->setCompileDir(COMPILE_DIR);
$application->setConfigDir(CONFIG_DIR);
$application->setCacheDir(CACHE_DIR);

$application->plugins_dir[1] = VIEW_DIR . 'smarty_plugins';
//$this->debugging=true;
}
}
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Feb 27, 2019 7:32 pm    Post subject: Reply with quote

parent::__construct(), to begin with, and inheriting from Smarty, especially - inherinting your framework main class, is a bad idea.
And why do you create a new object within its constructor? Tha'ts an infinite loop.
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Fri Mar 01, 2019 6:57 am    Post subject: Reply with quote

I am also used this code:

require_once SMARTY_CLASS;
class Application extends Smarty
{
public function __construct()
{
parent::Smarty();
$this->template_dir = TEMPLATE_DIR;
$this->compile_dir = COMPILE_DIR;
$this->config_dir = CONFIG_DIR;
$this->plugins_dir[1] = VIEW_DIR . 'smarty_plugins';
//$this->debugging=true;
}
}
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Fri Mar 01, 2019 6:59 am    Post subject: Reply with quote

what should i do for this?

parent::__construct(), to begin with, and inheriting from Smarty, especially - inherinting your framework main class, is a bad idea.
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Fri Mar 01, 2019 7:13 am    Post subject: Post subject: Smarty 3.1.33 with php 7.3 not working Reply with quote

Pls clear me Smarty 3 has any issues with PHP 7.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Mar 01, 2019 6:20 pm    Post subject: Reply with quote

No, Smarty do not have issues with PHP7. But your code do.
What you write is not PHP code.
Please learn PHP first. Smarty is a library written in PHP and knowing the language is a required prerequisite to work with Smarty at programming level.
Back to top
View user's profile Send private message
asgupta2019
Smarty Rookie


Joined: 27 Feb 2019
Posts: 7
Location: Bangalore, India

PostPosted: Sat Mar 02, 2019 4:00 am    Post subject: Reply with quote

dear,

my project is running in Smarty 2 with php 5.4, but here up gradation issue.
what's wrong with my code.


Last edited by asgupta2019 on Mon Nov 18, 2019 5:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Mar 02, 2019 11:13 am    Post subject: Reply with quote

asgupta2019 wrote:
dear i know php,

what's wrong with my code.

One does not match the another.
Either you know PHP, or you are asking, what's wrong with your code. And I've already explained, "what".
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