After a PHP Upgrade to version 5.4.x the openx statistics page won’t display anymore. You only get a white page. No errors are displayed anywhere.

Solution:

vi openx-2.8.10/lib/OA/Admin/Statistics/Delivery/CommonEntity.php

Line 292:

            if (array_search('ad_id', $aggregates) !== false) {
                $this->childrendata['ad_id'] = Admin_DA::fromCache('getAds', $aParams);
                // Plugins can set their own ads in the array
                foreach ($this->aPlugins as $oPlugin) {
                  /* replaced by teslina
                    $oPlugin->mergeAds(&$this->childrendata['ad_id']);
                  */
                    $oPlugin->mergeAds($this->childrendata['ad_id']);
                  // eof teslina
                }
            }

Also on line 322:

                // Plugins can set their own zones in the array
                foreach ($this->aPlugins as $oPlugin) {
                  /* replaced by teslina
                    $oPlugin->mergeZones(&$this->childrendata['zone_id']);
                  */
                    $oPlugin->mergeZones($this->childrendata['zone_id']);
                  // eof teslina
                }
            }

And also in this file:

vi lib/OA/Admin/Statistics/Delivery/CommonHistory.php 

Line 160:

    function prepare(&$aParams, $link = '')
    {
/* replaced by teslina
        parent::prepare(&$aParams);
*/
        parent::prepare($aParams);
// eof teslina

Finally… the stats page is running again 🙂 Read the full article on here.

Flattr this!