Question

In my PHP file Using

$smarty->config_load('en.conf');

I am getting the following :

Notice: function call 'config_load' is unknown or deprecated. in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_wrapper.php on line 57

I am then changing the statement to @$smarty->config_load('en.conf'); and the error is hidden.

However all my ajax scripts are failing at this point and in the ajax response using firebug, I can see a fatal error this time :

<b>Fatal error</b>:  Uncaught exception 'SmartyException' with message 'Unable to load config file &quot;en.conf&quot;' in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php:90
Stack trace:
#0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(39): Smarty_Internal_Config-&gt;buildConfigFilepath()
#1 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(117): Smarty_Internal_Config-&gt;getConfigFilepath()
#2 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php(108): Smarty_Internal_Config-&gt;readConfigSource(Object(Smarty_Internal_Config))
#3 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config_file_compiler.php(44): Smarty_Internal_Config-&gt;getConfigSource()
#4 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_in in <b>C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ex\libs\sysplugins\smarty_internal_config.php</b> on line <b>90</b><br />

Any idea why I am getting the first warning (e.g if the syntax has changed) and also why am I getting the fatal error ?

(Smarty version 3.0.8)

Thanks

Was it helpful?

Solution

configLoad is all one word so$smarty->configLoad('en.conf'); seems to be solving the first error , it seems that the function has been renamed in version 3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top