...

View Full Version : Could not work on Fedora3



hanpedro
09-05-2005, 06:36 PM
Works fine on win xp sp2 apm.
But not works on fedora3.


<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}

// 투표한 사람만 결과가 보임
if (get_cookie("ck_{$bo_table}_{$wr_id}") == "{$bo_table}_{$wr_id}")
$is_poll = true;
else
$is_poll = false;

$max = 1;
$total = 0;
$tmp = explode(",", $view[wr_1]);
for ($i=0; $i<count($tmp); $i++)
{
$total += (int)$tmp[$i];
if ((int)$tmp[$i] > $max)
$max = (int)$tmp[$i];
}

echo "<table>";
$ans = explode("\n", $view[wr_content]);
for ($i=0; $i<count($ans); $i++)
{
echo "<tr>";
echo "<td>";
echo "<input type=radio name='ans' id='ans$i' value='$i'><label for='ans$i'>";
echo $ans[$i];
echo "</label>";

if ($is_poll)
{
if ($total > 0)
$rate = ((int)$tmp[$i] / $total) * 100;
$bar = (int)((int)$tmp[$i] / $max * 100);

echo "</td>";
echo "<td width=200>";
echo "<table width=100% height=10 cellspacing=0 cellpadding=0 border=0>";
echo "<tr><td><div style='width:100%;height:10px;border:1px solid #8E959B;background-color:#ffffff'><img src='$board_skin_path/img/poll_bar.gif' width='{$bar}%' height='8' title='' border='0'></div></td></tr>";
echo "</table>";
echo "<td width=50 align=right>".number_format($tmp[$i])."명 &nbsp;</td>";
echo "<td width=70 align=right>".number_format($rate,2)."% &nbsp;</td>";

}
echo "</td></tr>";
}
if ($is_poll)
{
echo "<tr>";
echo "<td></td>";
echo "<td align=right>퀴즈참여자 총 &nbsp;</td>";
echo "<td align=right>".number_format($total)."명 &nbsp;</td></tr>";
// explanation
echo "<tr>";
echo "<td width='8%'>설명</td>";
echo "<td width='92%' style='border: 1px solid #0099FF'>";
echo $view[wr_2];
echo " </td>";
echo "</tr>";
}
echo "</table>";
?>

The last code "//explanation " should be shown after get the "$is_poll = true;".


What is wrong?
Any comment would be appreciated.

firepages
09-06-2005, 01:23 AM
what version of PHP on fedora ? + what browser on fedora ? (+ what browser on win32)

hanpedro
09-06-2005, 05:24 AM
what version of PHP on fedora ? + what browser on fedora ? (+ what browser on win32)

Dear firepages,

Fedora3 has apache 2.0.54, php 4.3.11, mysql 4.1.11, and win xp sp2 has same versions.
The browser is ms internet explorer and slimbrowser.

If u want, I'll copy my php.ini here.

firepages
09-06-2005, 03:13 PM
Hi , OK then I guess that only leaves the browser or how the cookies are being accessed , I have never used slimbrowser so I cant help much there.

I am guessing that the cookie is not getting set in slimbrowser OR the get_cookie() function is being affected by the register_globals directive in the php.ini

can you post the get_cookie() function here ?

also try PRINT_R($_COOKIE); and see what cookies are actually set.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum