Twisted Posted March 30, 2003 Posted March 30, 2003 I got this error. How do I fix it? I have tried erasing it and doing it over but I keep getting the same error. Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /home/twisted/public_html/main/mainfile.php on line 565 It is on this page. http://twistedweb.net/main/index.php Quote
TCH-Rick Posted March 30, 2003 Posted March 30, 2003 If you click on the function.setlocale link you jump to this page (click on this link to see it.) About half way down I found this message: if you have the warning message : Warning: Passing locale category name as string is deprecated. Use the LC_* -constants instead. Delete simple or double quotes on 'category' variable. For example use : setlocale(LC_TIME,"fr_FR"); instead of : setlocale("LC_TIME","fr_FR"); Not sure if it will fix your problem but can't hurt to try. I would back up the mainfil.php and then edit line 565 and see if that makes a difference. Quote
Twisted Posted March 30, 2003 Author Posted March 30, 2003 If you click on the function.setlocale link you jump to this page (clink on this link to see it.) About half way down I found this message: if you have the warning message : Warning: Passing locale category name as string is deprecated. Use the LC_* -constants instead. Delete simple or double quotes on 'category' variable. For example use : setlocale(LC_TIME,"fr_FR"); instead of : setlocale("LC_TIME","fr_FR"); Not sure if it will fix your problem but can't hurt to try. I would back up the mainfil.php and then edit line 565 and see if that makes a difference. uh i'm not sure what all that means, I never messed with php nuke to much before. I have had it before but didn't do much with it. Quote
TCH-Rick Posted March 30, 2003 Posted March 30, 2003 I editted the mainfile.php and attached it to this message. Try uploading it to your nuke directory and see if it fixes the problem. All I did was delete the first two quotation marks in line 565. Quote
TCH-Rick Posted March 30, 2003 Posted March 30, 2003 Glad it works. It works fine on my site with the file as it was. Not sure why yours had problems but I have seen that on other sites as well. Quote
Twisted Posted March 30, 2003 Author Posted March 30, 2003 One more question. Do you know how to customize it so I don't have to use that stupid php nuke icon in my posts? I want to totally rid it of that so I can post any type of image that I may decide to use. Quote
TCH-Rick Posted March 30, 2003 Posted March 30, 2003 Look through the images folder in either the main directory or the theme you are using. You should be able to replace those image files with whatever you want to use. You might want to check out http://www.nukeforums.com/ for more information on Nuke and how to customize it. Quote
Twisted Posted March 30, 2003 Author Posted March 30, 2003 ah the error is back, I get it with both the links and downloads page http://www.twistedweb.net/main/modules.php...?name=Web_Links Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /home/twisted/public_html/main/modules/Web_Links/index.php on line 772 http://www.twistedweb.net/main/modules.php...?name=Downloads Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. This is getting frustrating Quote
TCH-Rick Posted March 30, 2003 Posted March 30, 2003 PhpNuke is a big program with lots of modules that in some cases have been hacked together by different people. As a result you are finding that it is not always easy to get everything working correctly. The site I mentioned in a previous post is a good place to refer to in order to get solutions to some of the common problems. This forum, on the other hand, is designed to support hosting with TCH and the options provided in the cPanel, etc. The problem you are having is apparently a common problem. Doing a quick scan on the phpnuke forum I found several posts concerning the same type of problem. The mainfile.php is only one module that uses the function.setlocale command. Other modules use it as well and you need to edit them as well. I use a free program called HTML-Kit that can be found at http://www.chami.com/html-kit/ to edit HTML, PHP, and other files. The nice thing about it is that it includes line numbers so it was pretty easy to make the change needed by using the info in the error message to find the problem. If you load the index.php file from the main/modules/Web_Links folder you can find line 772 and take out the two quotation marks surrounding the LC_TIME statement then upload it back to your web site. If you are determined to use phpNuke, I would go to the www.nukeforums.com site and do some reading there before doing much more with it. Good luck. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.