469,653 Members | 1,819 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,653 developers. It's quick & easy.

setlocale() kills site

Last night I had a web site. This morning it was returning nothing. I traced
it to a call to setlocale(). It appears that something has happened that
means that any call to setlocale completely kills the site, including
dumping anything that is in the output buffer.
Take a look at http://www.osg-uk.com/st.php and
http://www.osg-uk.com/sts.php the contents of which are shown below.

Anyone got any ideas?

st.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
echo '1';
//setlocale(LC_TIME, "C");
echo '<br>'.strftime("%A");
//setlocale(LC_TIME, "fi_FI");
echo '<br>'.strftime(" in Finnish is %A,");
//setlocale(LC_TIME, "fr_FR");
echo '<br>'.strftime(" in French %A and");
//setlocale(LC_TIME, "de_DE");
echo '<br>'.strftime(" in German %A.\n");
?>
</body>
</html>

sts.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
echo '1';
setlocale(LC_TIME, "C");
echo '<br>'.strftime("%A");
//setlocale(LC_TIME, "fi_FI");
echo '<br>'.strftime(" in Finnish is %A,");
//setlocale(LC_TIME, "fr_FR");
echo '<br>'.strftime(" in French %A and");
//setlocale(LC_TIME, "de_DE");
echo '<br>'.strftime(" in German %A.\n");
?>
</body>
</html>
May 10 '06 #1
0 1234

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dariusz | last post: by
3 posts views Thread by transam | last post: by
3 posts views Thread by Ksenia Marasanova | last post: by
3 posts views Thread by Damien Elmes | last post: by
3 posts views Thread by J Trauntvein | last post: by
3 posts views Thread by Schraalhans Keukenmeester | last post: by
7 posts views Thread by Steven Woody | last post: by
5 posts views Thread by yogeshmk | last post: by
reply views Thread by bestbikeever | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.