|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jkail Smarty n00b
Joined: 05 Dec 2017 Posts: 3
|
Posted: Tue Dec 05, 2017 9:33 pm Post subject: Smarty 3.1.30 and PHP 7.0.26 |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Dec 05, 2017 10:35 pm Post subject: |
|
|
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 |
|
jkail Smarty n00b
Joined: 05 Dec 2017 Posts: 3
|
Posted: Tue Dec 05, 2017 10:48 pm Post subject: |
|
|
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 |
|
jkail Smarty n00b
Joined: 05 Dec 2017 Posts: 3
|
Posted: Wed Dec 06, 2017 5:17 pm Post subject: |
|
|
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 |
|
|
|
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
|