Jump to content

Invocation code not showing / Error 500

Recommended Posts

Hi guys,

I'm new to revive-adserver, but I'm excited about it, I did a successful installation on my local machine,  v4.1.3, tested with multi sites at localhost, everything working fine, i like it a lot!

Then when I went to upload on the live server, (it runs php 5.6, and I'm using HTTPS), installation in a subfolder was ok (https://mydomain.com/reviveadserver/), plugins were installed and enable. I can create advertisers, campaigns, websites and banners ... but I am not able to have the "invocation code" display: when I click the "invocation code" tab, it shows a blank tab, and the browser reports a 500 error (500 Internal Server Error). There is nothing on the logs and my host support says that it's nothing on their side. Pop-ups are allowed on my browser, and I can see the banner preview ok when editing the banner.

I did a google search, read various topics on this forum but after a entire day I'm exhausted. Does anyone had a similar issue in recent times?

Any comment will be very welcome guys, thank you a lot!

Link to comment
Share on other sites

Alas, a 500 internal server error means exactly that - something went wrong internally with the server.

That could be a web server problem, or it could be that there was a fatal PHP error. Either way, the logs on the server (both webserver and PHP logs) are where you need to look. If there's nothing there, you may need to increase the logging level.


Link to comment
Share on other sites

Hi @andrewatfornax ,

When you said "increase logging level" something "clicked" to me: after reading this I found an option on the "php.ini" at server setup, where I can enable debug to front-end. I did it and in fact it gave me a message (user/domain edited by me):

 Fatal error: Call to a member function getZoneForInvocationForm() on boolean in /home/USERNAME/DOMAIN.COM/adserver/www/admin/zone-invocation.php on line 58

Line 58 I put here below with underline. Is "$zoneid" being a boolean for some reason? What could be causing that? Unfortunately I don't see where to go from here.

/* Main code                                             */

$dalZones = OA_Dal::factoryDAL('zones');
if ($zone = $dalZones->getZoneForInvocationForm($zoneid)) {
    $extra = array('affiliateid' => $affiliateid,
                   'zoneid' => $zoneid,
                   'width' => $zone['width'],
                   'height' => $zone['height'],
                   'delivery' => $zone['delivery'],
                   'website' => $zone['website']
    // Ensure 3rd Party Click Tracking defaults to the preference for this agency
    if (!isset($thirdpartytrack)) {
        $thirdpartytrack = $GLOBALS['_MAX']['CONF']['delivery']['clicktracking'];
    $maxInvocation = new MAX_Admin_Invocation();
    echo $maxInvocation->placeInvocationForm($extra, true);


Link to comment
Share on other sites

Yes the plugin part seems ok. But I did the double check just to make sure (uninstall/reinstall all / enable), no changes, same behavior.

Another symptom I can see is that when I click the left menu "campaigns" it shows a blank tab with just the title "Campaigns of..." . The php error in this case is the message:

Fatal error: Call to a member function getClientCampaigns() on boolean in /home/user/mydomain/adserver/www/admin/advertiser-campaigns.php on line 116


Edited by King of Ads
Link to comment
Share on other sites

More information, after re-reading this topic now:


I face a similar issue, see below my pc localhost installation (working fine) vs the webhost server installation (error). "Banners.php", "Campaigns.php", "Zones.php" are not present on the web server installation. (at folder  /lib/max/dal/admin/).

Also it's like they are not allowed on the server, any folder where I try to upload them, they are gone in seconds.



Edited by King of Ads
Link to comment
Share on other sites

Hi guys,

Good news, I believe I was able to overcome this issue. First let's say my host company didn't help at all, unfortunately I'm alone on this.

The problem: we will look at 3 files that when put on the server are being rejected (deleted in a matter of seconds or latter):

  • yourdomain.com\adserver\lib\max\Dal\Admin\Campaigns.php
  • yourdomain.com\adserver\lib\max\Dal\Admin\Banners.php
  • yourdomain.com\adserver\lib\max\Dal\Admin\Zones.php

The solution: I removed the following lines of those files:


CAMPAIGNS.PHP - remove it to enable campaign tab display

LINES 617/618

        $rsCampaigns = DBC::NewRecordSet($query);

        $aCampaigns = $rsCampaigns->getAll(array('campaignid', 'clientid', 'campaignname', 'status', 'priority', 'revenue'));

LINES 655/656

        $rsCampaigns = DBC::NewRecordSet($query);
        $aCampaigns = $rsCampaigns->getAll(array('campaignid', 'clientid', 'campaignname', 'status', 'priority', 'revenue'));



I removed the entire function starting at line 301:

function getBannersCampaignsClients($filterMarketBanners = true)
        $prefix = $this->getTablePrefix();
        $oDbh = OA_DB::singleton();
        $tableB  = $oDbh->quoteIdentifier($prefix.'banners',true);
        $tableC  = $oDbh->quoteIdentifier($prefix.'campaigns',true);
        $tableCl = $oDbh->quoteIdentifier($prefix.'clients',true);

        $query = "
                {$tableB} AS b,
                {$tableC} AS c,
                {$tableCl} AS cl
                AND cl.clientid=c.clientid
        if ($filterMarketBanners) {
            $query .= " AND (b.ext_bannertype <> ". DBC::makeLiteral(DataObjects_Banners::BANNER_TYPE_MARKET) . " OR b.ext_bannertype IS NULL)";
        return DBC::NewRecordSet($query);



function _linkZonesToCampaign at LINE 449, remove this part:

           $rsCampZones = DBC::NewRecordSet($query);
            if (PEAR::isError($rsCampZones)) {
                return $rsCampZones;
            $aCampZones = $rsCampZones->getAll();



Everything seems to be working fine until now, I tested with an external call to banner and it shows ok. I'll post any updates here.

Thank God I make it work, I was almost giving up for a plan B. But now my question, are those lines/functions essential for the software? Do I have to keep something in mind because of doing that?

Thanks you guys for this very helpful forum here.


Edited by King of Ads
Link to comment
Share on other sites

Hi @King of Ads,

As a general rule, I would say yes, most of the code is required. If you go changing things, then who know what will work or won't work.

I hate giving this advice, because it always seems a little lame and unhelpful, but honestly, if your hosting provider cannot give you a host where you can upload files and they files you put in place actually stay there, then you're wasting your money. There are plenty of other hosting companies out there who actually deliver the service that you pay for.

Link to comment
Share on other sites

Hi Andrew,

You are totally right, I'll keep this in mind for the future. Here the answer I received from the hosting provider:

"This would appear to be an issue with the content you are adding. If the content is corrupt, it could be rejected by the server however, we do not have way to provide guidance on whether code or function is not able to be uploaded. You would want to consult a web developer for further assistance with getting your site code to function on our hosting server."

Well, luckily the adserver is delivering ok, geotargeting ok. I'll probably try to dig deeper into this issue as soon as I have more time, but for now I'll leave as it is. My demands are small scale so I'm not risking too much trouble for now.

The Revive is great, I'm enjoying working with it, it's simple and direct, very intuitive. Hopefully as I grow into this world of digital advertisement (I'm new to advertisement in general) I'll come back here to learn and share more with the community.

Thank you for taking time to follow the topics,

Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

Some updates to share here. As a final solution, now I have all the installation files working on the server. The issue seems to be the hosting provider blocking the words BannerCampaigns/rsCamp or something like that.

In summary, the solution for me was to rename some script terms as follows:



REPLACE "getBannersCampaignsClients"
WITH    "getBannersXampaignsClients"



REPLACE "$rsCamp"
WITH    "$rsXamp"


Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...

How funny is it that after so much time I needed to start another fresh install (not update/upgrade), using the current 5.0.5 and come into the same issue. What a shame to lose 1 hour just to find my own answer! =D

At least it still works thank God!

Edited by King of Ads
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...