interpim Posted April 14, 2006 Share Posted April 14, 2006 Hi all... I have a question, every once in a while I get an internal server error on my website, and to be quite honest I am a complete PHP newbie. I read that sometimes PHP errors can cause this, so I looked into my scripts.log file and found a re-occuring error there. Can someone help me decipher it and help me out with what I need to change? here is the error...[14-Apr-2006 02:40:55] PHP Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /fenrisguild/mainfile.php on line 565and here is the code for that area of the php file.Website is [a href=\"http://fenrisguild.com\" target=\"_blank\"]http://fenrisguild.com[/a] and I am using phpnuke for it. Actual physical location of the site is [a href=\"http://fenrisguild.interpim.com\" target=\"_blank\"]http://fenrisguild.interpim.com[/a] if the forwarded address doesn't work.[code]559 /*********************************************************/ 560 /* formatting stories */ 561 /*********************************************************/ 562 563 function formatTimestamp($time) { 564 global $datetime, $locale; 565 setlocale ("LC_TIME", "$locale"); 566 ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); 567 $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); 568 $datetime = ucfirst($datetime); 569 return($datetime); 570 }[/code]Thanks to anyone that can help :) Link to comment https://forums.phpfreaks.com/topic/7375-php-errors-causing-internal-server-error/ Share on other sites More sharing options...
jworisek Posted April 14, 2006 Share Posted April 14, 2006 have you looked here?[a href=\"http://us3.php.net/manual/en/function.setlocale.php\" target=\"_blank\"]http://us3.php.net/manual/en/function.setlocale.php[/a] Link to comment https://forums.phpfreaks.com/topic/7375-php-errors-causing-internal-server-error/#findComment-26846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.