Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Smarty 3.1.30 and PHP 7.0.26

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
jkail
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Tue Dec 05, 2017 9:33 pm    Post subject: Smarty 3.1.30 and PHP 7.0.26 Reply with quote

Hi. I've spent most of the day working on this. Time to cry UNCLE!

I have Smarty 3.1.30 and PHP 7.2.0 working great on my dev box. However, when I deploy to my production server running PHP 7.0.26, fetch() returns an empty string. I tried about everything I could think of, all to no avail.

Is 3.1.30 compatible with PHP 7.0.26? If so, any idea why fetch() would return ""?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1147

PostPosted: Tue Dec 05, 2017 10:35 pm    Post subject: Reply with quote

There's a couple of points you should account for.
1. Your dev. server should be as close as possible to deployment.
At the very least, the major PHP version (X.Y) should match.
2. If template output is blank, this often means errors. All errors should be logged. Look in your logs.
3. Programming is no magic. If you don't do anything, nothing happens. If anything happened, YOU made it happen.
Back to top
View user's profile Send private message
jkail
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Tue Dec 05, 2017 10:48 pm    Post subject: Reply with quote

Thanks for your reply.

My dev box and the production environment are very close (same code, etc.). The one difference is that the production server is 7.0.26 and my dev box is 7.2. Because of the VC runtime differences, I have not been able to downgrade to 7.0.26 (I would have to downgrade Apache to that VC runtime, etc.)

I've been looking at logs all day. Nothing seems to end up logged with this issue. I have added try/catch blocks around fetch(), but no error is being thrown.

I have verified all directory structures are present with appropriate attributes. The smarty test all comes back clean.
Back to top
View user's profile Send private message
jkail
Smarty n00b


Joined: 05 Dec 2017
Posts: 3

PostPosted: Wed Dec 06, 2017 5:17 pm    Post subject: Reply with quote

Update: host got 7.2.0 installed on the server so the php version on dev and the server are identical. `fetch` is still failing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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