View previous topic :: View next topic |
Author |
Message |
kin Smarty Rookie
Joined: 14 Nov 2016 Posts: 5
|
Posted: Mon Nov 14, 2016 8:52 am Post subject: Installed smarty and got error in Demo folder. |
|
|
Installed smarty in subfolder and put my own php.ini file in public_html folder explaining to system where it is located. Used DEMO folder which is included inSmarty installation but get this error:
Code: | Fatal error: require() [function.require]: Failed opening required '/home/XXXX/public_html/libs/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXXX/public_html/lt/demo/index.php on line 83 |
What could be the reason for that?
Replaced my data with "XXXX" in the code above.
PHP version 5.2 |
|
Back to top |
|
kin Smarty Rookie
Joined: 14 Nov 2016 Posts: 5
|
Posted: Tue Nov 15, 2016 2:20 pm Post subject: |
|
|
Missed one folder in the path. Now I have different error:
Code: | Warning: preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 4 in /home/XXXX/public_html/lt/libs/Smarty.class.php on line 1207
Fatal error: Uncaught --> Smarty: Unable to load template 'file:index.tpl' <-- thrown in /home/XXXX/public_html/lt/libs/sysplugins/smarty_internal_template.php on line 163 |
Here is the line 1207:
Code: | preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%',$path, $parts); |
Can't understand what is wrong with the preg_match and also the error regarding template file... |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Nov 15, 2016 4:30 pm Post subject: |
|
|
Your PHP version is several years old. Nobody know, what happenes there, anymore.
For me, Smarty works just fine on all supported PHP versions. |
|
Back to top |
|
kin Smarty Rookie
Joined: 14 Nov 2016 Posts: 5
|
Posted: Tue Nov 15, 2016 4:41 pm Post subject: |
|
|
But stuck on mine... |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Nov 15, 2016 4:51 pm Post subject: |
|
|
Well, update your PHP then. 5.2 is SIX YEARS old, soon. And that's only LAST release of 5.2.17. I wouldn't be surprised, if you are using some prehistoric version without critical fixes available in 5.2.17, not to mention all the security fixes and enhancements released in the last six years after it. |
|
Back to top |
|
kin Smarty Rookie
Joined: 14 Nov 2016 Posts: 5
|
Posted: Tue Nov 15, 2016 6:55 pm Post subject: |
|
|
I'm using "000webhost" free service for the tests. I have what I have with them |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Nov 16, 2016 3:16 am Post subject: |
|
|
kin wrote: | I'm using "000webhost" free service | Then don't complain. (Or, rather, complain to your hosting provider for providing an unusable and unsafe service, threatening the internet with their incompetency.)
You get what you're given, this is not our problem.
If you want working solution, pay for it. |
|
Back to top |
|
kin Smarty Rookie
Joined: 14 Nov 2016 Posts: 5
|
Posted: Wed Nov 16, 2016 6:54 am Post subject: |
|
|
I've used (couple of years ago) previous versions of Smarty without any problems. Also I can confirm that the version of PHP is 5.2.17. So it is the latest... Here is the link to phpinfo:
http://kin.az/phpinfo.php
And here is the error messages:
http://kin.az/lt/demo/
And I am not complaining, just trying to solve the issue I got. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Nov 16, 2016 3:25 pm Post subject: |
|
|
You can rewrite Smarty to not use features not available in a six years old PHP (or PerlRE, if it is using shared lib) version.
Namely, Smarty's using named placeholders here. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Nov 16, 2016 11:12 pm Post subject: |
|
|
Which makes me wonder. According to a quick google, named captures were available in PHP as far back as in 2007.
Even more reasons to complain to your support. If only you could have one for your "free" "hosting". |
|
Back to top |
|
|