Jump to content

BaliDave

Approved members
  • Posts

    18
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    BaliDave got a reaction from andrewatfornax in 4.1.4 Exceeding max execution times   
    OK, I found the problem -- one way out in left-field: the new RevAds no longer returns the same indication from my PHP call, that there are no more ads meeting my criteria. So an obscure page of mine wound up in an infinite loop! I found a new way now to detect a "no more ads" condition (not the same as previous RevAds) and changed the criteria, so that all works OK now.  So no more timeouts in Rev Ads are occurring.
    I retrieve ad information via a PHP call to a RevAds fucntion, and all my ads are "local" ads.  This gives me the html needed. which I display.  This code came from many years ago when I first started using OpenX, as it was called then. There's a very brief mention of this I found now on https://documentation.revive-adserver.com/display/DOCS/Tag+Variables
    But I didn't find any more documentation on this now, and don't have access to the old OpenX one.  If you know, please tell me where there's more documentation on this available now. 
    Anyhow my basic invocation to retrieve ad data has a call to the view_local function defined in alocal.php:
    $ad[$i] = view_local('', $zoneNum, 0, 0, '', '', '0', $phpAds_context, '');
    And I do this in a loop, bumping $phpAds_context each time I find a valid ad.  Previously in RevAds (last version prior to 4.1.4 I used was 3.0.2) the 'html' array element of this would return an empty value if no more ads met the criteria, and I'd break out of the loop.  My fix now is to check that this element has some sensible value (e.g. there's an 'href=' in it).  It'd be nice to have something more definitive -- let me know if you know of such.
    Anyhow all seems to be working OK now.  I'll report back later if something's still amiss.  Thanks again Andrew for all your efforts here, and my apologies for not finding this sooner.   I hope this saves someone else's time.
     
     
×
×
  • Create New...