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

Installed smarty and got error in Demo folder.

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


Joined: 14 Nov 2016
Posts: 5

PostPosted: Mon Nov 14, 2016 8:52 am    Post subject: Installed smarty and got error in Demo folder. Reply with quote

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
View user's profile Send private message
kin
Smarty Rookie


Joined: 14 Nov 2016
Posts: 5

PostPosted: Tue Nov 15, 2016 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Nov 15, 2016 4:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
kin
Smarty Rookie


Joined: 14 Nov 2016
Posts: 5

PostPosted: Tue Nov 15, 2016 4:41 pm    Post subject: Reply with quote

But stuck on mine...
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Nov 15, 2016 4:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
kin
Smarty Rookie


Joined: 14 Nov 2016
Posts: 5

PostPosted: Tue Nov 15, 2016 6:55 pm    Post subject: Reply with quote

I'm using "000webhost" free service for the tests. I have what I have with them
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Nov 16, 2016 3:16 am    Post subject: Reply with quote

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
View user's profile Send private message
kin
Smarty Rookie


Joined: 14 Nov 2016
Posts: 5

PostPosted: Wed Nov 16, 2016 6:54 am    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Nov 16, 2016 3:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Nov 16, 2016 11:12 pm    Post subject: Reply with quote

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
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