I’m not pretty sure if that’s an issue, but after some investigation related with this topic, here is reproduction of the “defect”:
-
Download latest Yii release (1.6).
-
go to /demos/blog and
- edit /protected/views/layouts/main.php with adding these two lines:
<?php
$_SESSION['cn'] = ($_SESSION['cn']+1);
echo $_SESSION['cn'];
?>
- edit /protected/views/layouts/column2.php with adding these line:
<?
echo CHtml::image("test.jpg");
?>
As a result from this, open blog home page and make couple of impressions and see that $_SESSION[‘cn’] increments with 1.
Now navigate to "Welcome!" link.
See incrementing of $_SESSION[‘cn’] when refresh this page.
In my test, it increments with 2.
I’m not sure where is the problem, but in my Yii powered site this looks pretty f***d up, coz one of my sitewide methods are called >10 times per impression.
I hope someone to confirm this and to say is this really an issue.
Thanks.