View previous topic :: View next topic |
Author |
Message |
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Wed Feb 27, 2019 4:49 am Post subject: Smarty 3.1.33 with php 7.3 not working |
|
|
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.
Pls anyone tell me, how can i do this.
Thanks, |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Feb 27, 2019 10:07 am Post subject: |
|
|
"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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Wed Feb 27, 2019 5:40 pm Post subject: when i running my project showing this errors |
|
|
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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Wed Feb 27, 2019 5:44 pm Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Feb 27, 2019 7:32 pm Post subject: |
|
|
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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Fri Mar 01, 2019 6:57 am Post subject: |
|
|
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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Fri Mar 01, 2019 6:59 am Post subject: |
|
|
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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Fri Mar 01, 2019 7:13 am Post subject: Post subject: Smarty 3.1.33 with php 7.3 not working |
|
|
Pls clear me Smarty 3 has any issues with PHP 7. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Mar 01, 2019 6:20 pm Post subject: |
|
|
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 |
|
asgupta2019 Smarty Rookie
Joined: 27 Feb 2019 Posts: 7 Location: Bangalore, India
|
Posted: Sat Mar 02, 2019 4:00 am Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Mar 02, 2019 11:13 am Post subject: |
|
|
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 |
|
|