function smarty_function_sitename() not found double slashes [solved]

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
lemkepf
Forum Members
Forum Members
Posts: 163
Joined: Tue Oct 18, 2005 8:30 pm

function smarty_function_sitename() not found double slashes [solved]

Post by lemkepf »

This is just a helpful little post on an issue i found today.

The hosting company says the path for the websites was "\\fileshare\home\user\www\". When i put that into the site_root in the config.php file for some reason smarty was throwing errors left and right:

Code: Select all

string(207) "Smarty error: [in template:17 line 9]: [plugin] function smarty_function_sitename() not found in \fileshare\home\user\www\cmsms/plugins\function.sitename.php (core.load_plugins.php, line 75)"
Notice that the path it listed only had one of those slashes? In my root_url i change the "\\fileshare" to "\\\\fileshare" and that solved the issue.

I believe the double slashes were being replaced by either smarty or another piece of code. Anyways, thanks Ted and SJG for the help!

Paul
Wiedmann
Forum Members
Forum Members
Posts: 233
Joined: Wed Mar 26, 2008 1:49 am
Location: Stuttgart / Germany

Re: function smarty_function_sitename() not found double slashes [solved]

Post by Wiedmann »

In my root_url i change the "\\fileshare" to "\\\\fileshare" and that solved the issue.
That's normal PHP behaviour (read the PHP manual how single quoted strings are working).
--> In a  double of backslashs, the first  backslash always escapes the following backslash to have one literal. Thus a '\\' results in '\' and for '\\' you must use '\\\\'.

BTW:
For filepaths it's better to use allways "/" (with every OS).
Last edited by Wiedmann on Wed May 28, 2008 2:04 am, edited 1 time in total.
Locked

Return to “[locked] Installation, Setup and Upgrade”