Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:54:13+00:00 2026-06-18T14:54:13+00:00

I am using Smarty 2.6.9 and I am finding that I experience issues with

  • 0

I am using Smarty 2.6.9 and I am finding that I experience issues with the following block of code.

Copyright © {$smarty.now|date_format:'%Y'} CRMPicco. All rights reserved

The date generated by Smarty seems to be random, sometimes it’s 8780, sometimes it’s 1872…as I say, completely random.

What I am finding is this seems to be an environmental issue too, as it works in my development environment (CentOS 5.6) but is broken in a testing environment. Now, I realise this would point to a config issue on the testing environment but I am using PHP date functions all through the codebase and if it wasn’t working i’d soon know about it.

I appreciate I may get suggestions along the lines of “if PHP date function works then send that through to your Smarty template”, but there must be a way to do it in Smarty too?

Is this a bug in Smarty or a config issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:54:14+00:00Added an answer on June 18, 2026 at 2:54 pm

    It’s a somewhat-known configuration issue, caused by $smarty->plugins_dir not being set correctly (or some other problem preventing access to that directory).

    date_format is the name of a Smarty plugin, but it’s also the name of a PHP function. If Smarty cannot locate its plugin it falls back to calling the PHP function, which expects a completely different set of arguments. The resulting breakage is what you see.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following codes using smarty template engine In php file: $smarty->assign('SITE_URL', 'http://localhost/mis/'); In
I found that using Smarty with PHP, sometimes extra time will need to be
I'm using Smarty templates which call object methods. I've put the code on a
I'm using the last version of Smarty, I'm tring to register a block but
I am using Code Igniter, The HMVC library , and Smarty with this library
I understand that when we add a new word in the template using smarty
I'm using Smarty with CodeIgniter. Here's my code: <!doctype html> <html lang=en-gb> <head> <title>Frustrating
I'm developing a PHP-based application that requires internationalization (i18n) support. I'm using Smarty 3
How do you include Javascript from a CDN source using Smarty? We have code
I am using smarty and creating a dynamic html table that has radio buttons

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.