Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
8192 "Function strftime() is deprecated" SOLVED
Have I got a new 8192 error? I’ve moved to Manjaro and PHP 8.1 is the default in the Lamp stack. Setting up a new localhost, I just altered the time in Preferences and got this error message repeated many times. There’s something about it on Stack Overflow so perhaps you already have it sorted?
8192 "Function strftime() is deprecated"
in /srv/http/mysite/textpattern/lib/txplib_misc.php at line 2787.
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/include/txp_admin.php:513 safe_strftime()
textpattern/include/txp_admin.php:64 author_list()
textpattern/index.php:230 include()
Last edited by zero (2022-11-10 08:20:22)
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Are you running Textpattern 4.8.8?
If yes, does the error message say anything else ? Usually that output is preceded by a message like “Error bla bla bla” that would provide some more context.
BTW – I can’t reproduce your error here.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Yes, running 4.8.8. The error message above is on some back end pages. For example, there are 29 variations of this in Preferences:
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/include/txp_prefs.php:631 safe_strftime()
textpattern/include/txp_prefs.php:376 dateformats()
textpattern/include/txp_prefs.php:282 pref_func()
textpattern/include/txp_prefs.php:153 prefs_list()
textpattern/include/txp_prefs.php:48 prefs_save()
textpattern/index.php:230 include()
2 like this in Articles (btw only using default Welcome to your site article):
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/lib/txplib_misc.php:352 safe_strftime()
textpattern/include/txp_list.php:437 gTime()
textpattern/include/txp_list.php:65 list_list()
textpattern/index.php:230 include()
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/lib/txplib_misc.php:352 safe_strftime()
textpattern/include/txp_list.php:440 gTime()
textpattern/include/txp_list.php:65 list_list()
textpattern/index.php:230 include()
1 like this in Users:
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/include/txp_admin.php:513 safe_strftime()
textpattern/include/txp_admin.php:64 author_list()
textpattern/index.php:230 include()
All those above have these 2 lines preceding each:
8192 "Function strftime() is deprecated"
in /srv/http/mysite/textpattern/lib/txplib_misc.php at line 2787.
——————————
FRONT END: from Welcome to your site I get these errors:
Tag error: <txp:posted /> -> 8192: Function strftime() is deprecated while parsing form default on page archive
textpattern/publish/taghandlers.php:2054 safe_strftime()
posted()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()
textpattern/lib/txplib_misc.php:3551 parse()
textpattern/publish.php:1162 parse_form()
textpattern/publish.php:1197 doArticle()
textpattern/publish.php:921 parseArticles()
article()
Tag error: <txp:comment_time /> -> 8192: Function strftime() is deprecated while parsing form comments on page archive
textpattern/publish/taghandlers.php:2054 safe_strftime()
posted()
textpattern/vendors/Textpattern/Tag/Registry.php:139 call_user_func_array()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()
textpattern/lib/txplib_misc.php:3551 parse()
textpattern/publish/taghandlers.php:2508 parse_form()
comments()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
Tag error: <txp:comment_time /> -> 8192: Function strftime() is deprecated while parsing form comments on page archive
textpattern/publish/taghandlers.php:2054 safe_strftime()
posted()
textpattern/vendors/Textpattern/Tag/Registry.php:139 call_user_func_array()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()
textpattern/lib/txplib_misc.php:3551 parse()
textpattern/publish/taghandlers.php:2508 parse_form()
comments()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
Tag error: <txp:if_comments_error>
<txp:comments_error class="error_message" wraptag="ol" break="li" />
</txp:if_comments_error> -> 8192: Function strftime() is deprecated while parsing form comment_form on page archive
textpattern/publish/comment.php:385 safe_strftime()
textpattern/publish/comment.php:505 comment_evaluation->__construct()
textpattern/publish/taghandlers.php:2462 get_comment_evaluator()
if_comments_error()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:559 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:409 processTags()
textpattern/lib/txplib_misc.php:3551 parse()
textpattern/publish/taghandlers.php:2255 parse_form()
comments_form()
p.
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
This most probably means that PHP Intl
extension is not enabled on your server. What date format are you using, btw?
The only thing we might do to avoid warnings in this case is switching all dates to English, but I’m not sure this would fit everyone.
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Thanks etc.
I’ve uncommented Intl
in php.ini like so:
extension=intl
There’s this further down and I’ve uncommented the last line like so:
[intl]
;intl.default_locale =
; This directive allows you to produce PHP errors when some error
; happens within intl functions. The value is the level of the error produced.
; Default is 0, which does not produce any errors.
;intl.error_level = E_WARNING
intl.use_exceptions = 0
Restarted Apache like so:
sudo systemctl restart httpd
But I’m still getting error messages.
(The Manjaro instructions I followed to setup my Lamp stack are different to what I’ve used previously and don’t use /etc/apache2/sites-available
but use httpd
with Apache, hence I haven’t used sudo service apache2 restart
or suchlike to restart Apache.)
BTW, I’ve tried various date formats and still get all errors and I’m on %Oe %B %Y
at the moment.
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Don’t know if this helps. In Write, I created a new article and when I clicked Publish I got this popup message:
8192 "Function strftime() is deprecated"
in /srv/http/mysite/textpattern/lib/txplib_misc.php at line 2787.
textpattern/lib/txplib_misc.php:2787 adminErrorHandler()
textpattern/include/txp_article.php:1368 safe_strftime()
textpattern/lib/txplib_admin.php:386 article_partial_author()
textpattern/include/txp_article.php:745 updatePartials()
textpattern/include/txp_article.php:363 article_edit()
textpattern/include/txp_article.php:116 article_save()
textpattern/index.php:230 include()
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Weird. Does your PHP info list intl
extension as enabled?
You can try to manually set the date format to jS F Y
. This should force txp to use date()
function instead of strftime()
.
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Thank you, Oleg. intl
is enabled. In a long list under Configure Command, here is part of it:
'--enable-gd=shared' '--enable-intl=shared' '--enable-mbstring'
I tried setting the date format to jS F Y but no joy. So I tried hours/days ago. No joy. Rebooted. No joy. Tried again with jS F Y. No joy. So rebooted again. Tried again. JOY!!! Very stubborn but so am I and your advice worked eventually :-)
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
So you now can use any date and time format? Without errors, that is…
I thought restarting the HTTP daemon would be enough, or is there some caching at work ?
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
Yes, I’ve tried most date formats and they all work without errors.
The one that brought on the error messages was %Oe %b %y
(10 Nov 22)
Oleg’s code of jS F Y
produces 10th November 2022.
Neither of those are listed in the default dropdown but both now work.
I’ve refreshed the cache after each one and no errors are shown. I refreshed the cache previously many times but Firefox seemingly doesn’t respond well to back end or background stuff. Actually Firefox caused me to move to Manjaro because I was tired of its quirks and constant updates (I can no longer see a way to stop updates) When I deleted it, to get a fresh installation, it wouldn’t go away completely. So I purged it, as you do with Linux, and it crashed the system and I was unable to get to a desktop again after trying all kinds of things. It had happened before but this time must have corrupted something, so I’d had enough and decided on a change. Lost some files. But that’s another story… Going to try Vivaldi again, cos allegedly Vivaldi has now solved its Gargoyle privacy incompatabilities. But that’s another story…
I’ll let you know if any similar errors appear in the future but it seemsintl
was the problem.
Offline
Offline
Re: 8192 "Function strftime() is deprecated" SOLVED
zero wrote #334103:
intl
is enabled. In a long list under Configure Command, here is part of it:
'--enable-gd=shared' '--enable-intl=shared' '--enable-mbstring'
Are you sure? This means you attempt to enable it, but what if the ICU library is missing or outdated?
You should see something like this in Diagnostics:
Intl extension: 8.1
Offline