Karakas Online

3.9.7. Warning: setlocale(): Passing locale category name as string is deprecated

All of a sudden, you get tons of warnings like this one:

Warning: setlocale(): Passing locale category name as string is deprecated. 
Use the LC_* -constants instead. 
in /home/chris/public_html/nuke/mainfile.php on line 565

The problem comes suddenly after your ISP has upgraded to a newer version of PHP (without telling you, of course! frown

To fix this, remove the quotes that are around "LC_TIME" in the line/file mentioned in the error message displayed (see Warning: setlocale(): Passing locale category name as string is deprecated and News article: Warning: setlocale(): Passing locale category name as string is deprecated.).

Caution Attention: repetitious error!
 

You may get this error again and again. You will have to do the above change in *all* occurences of the LC_something constants! I once counted 17 of them, scattered all around the PHP-Nuke files...

Last updated Sun Aug 7 21:14:12 CEST 2005 Permalink: http://www.karakas-online.de/EN-Book/warning-setlocale.html All contents © 2004 Chris Karakas, Claudio Erba