Jump to content


PHP errors causing "Internal Server Error"

  • Please log in to reply
1 reply to this topic

#1 interpim

  • Members
  • PipPipPip
  • Advanced Member
  • 303 posts
  • LocationSan Diego

Posted 14 April 2006 - 02:54 AM

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 565

and 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.

559 /*********************************************************/
 560 /* formatting stories                                    */
 561 /*********************************************************/
 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 }

Thanks to anyone that can help :)

#2 jworisek

  • Members
  • PipPipPip
  • Advanced Member
  • 112 posts

Posted 14 April 2006 - 03:29 AM

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]

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users