phpAdsNew  Home 

 

 

 

  2.3Upgrading from a previous version 

 

Updates, Upgrades, and changes should never be performed in a production environment without careful testing on a staging server.

 
  
  2.3.1phpAdsNew 2 beta 3 to beta 4 

 


One column was added to the clients table for support of campaigns. You can add this column to an existing installation of phpAdsNew by using this query:

ALTER TABLE clients ADD COLUMN parent mediumint(9) DEFAULT '0' NOT NULL;

The mail.php script is replaced by maintenance.php which is located in the maintenance directory. This script should be schedule to run EVERY day. If you are using a UNIX based system, you can do this by adding it to your cronfile. This script is needed to automatically sent reports to clients and to activate
campaigns on a certain date. If this script does not run, campaigns will not be automatically activated!

In order for the new maintenance.php script to work correctly 4 new columns were added to the client table.

ALTER TABLE clients ADD COLUMN report enum('true','false') NOT NULL;
ALTER TABLE clients ADD COLUMN reportinterval mediumint(9) DEFAULT '7' NOT NULL;
ALTER TABLE clients ADD COLUMN reportlastdate date DEFAULT '0000-00-00' NOT NULL;
ALTER TABLE clients ADD COLUMN reportdeactivate enum('true','false') NOT NULL;

The files remotehtmlview.php, click.php and phpads.php were renamed to adjs.php, adclick.php and adview.php, which should describe their function much more clearly. The old files are still available for backwards compatibility, but could be depreciated in future versions of phpAdsNew.


Important
After upgrading you should move all banners without a campaign to a new campaign. You can do this in the admin interface. If you don't move these banners to a new campaign the banner could be deactivated.

 

 
  
  2.3.2phpAdsNew 2 beta 2 to beta 3 

 


There are no big changes between beta 2 and beta 3 and no changes are needed to the database structure. Beta 3 is mainly a bugfix release and does not introduce many new features.

 

 
  
  2.3.3phpAdsNew 2 beta 1 to beta 2 

 


Three columns were added to the client table in order to keep track of active clients, the activation date and client weight. You can add these table to an existing installation of phpAdsNew 2 beta 1 by using the below queries:

ALTER TABLE clients ADD COLUMN active enum('true','false') NOT NULL;
ALTER TABLE clients ADD COLUMN weight tinyint(4) default '1' NOT NULL;
ALTER TABLE clients ADD COLUMN activate date DEFAULT '0000-00-00';

One column was modified to allow webserver stored banners:

ALTER TABLE banners MODIFY COLUMN format enum('gif','jpeg','png','html','url','web') DEFAULT 'gif' NOT NULL;

 

 
  
  2.3.4phpAdsNew 1.9.2 to 2 beta 1 

 


Two new columns were added to the client table in order to allow permissions and client specific language settings. When upgrading to this version you need to manually add these to columns, for example:

ALTER TABLE clients ADD COLUMN permissions mediumint(9);
ALTER TABLE clients ADD COLUMN language varchar(64);

In addition to this config.inc.php has a few new parameters you should set.

 

 
  
  2.3.5phpAdsNew 1.9 to 1.9.2 

 


I removed the config2.inc.php support. It caused too much confusion. A better database-config mechanism is in planning stages.

Also, the stats database changed from 1.9.0 because "when" is not an allowed field name in mySQL 3.23.

 

 
  
  2.3.6phpAdsNew 1.8 to 1.9 

 


config.inc.php has a few new parameters you should set. For easier upgrades in the future, you can now use config2.inc.php to store your customizations to the config.

There is a new statistics table in mysql. The new config DEFAULTS to using this new statistics model. Some information is lost in the new stats model that was saved before (eg. the host IP or address of everyone who ever saw or clicked on any ad). You probably won't notice, but if you do care, turn off compact stats in config.inc.php.

Also, the new stats table must be added to your mysql database. See the definition of the adstats table in all.sql.

One include file can now replace the three includes which were required before. See the documentation and the comments in phpadsnew.inc.php

The new $phpAds_path is required for proper operation. It should be set automatically and will not require customization. If you have problems with missing include files, though, this may be the culprit.

 

 
   
  2.3.7phpAdsNew 1.6 or 1.7 to 1.8 

 


config.inc.php has a few new parameters you should set.

 

 
   
  2.3.8phpAdsNew 1.4 or 1.5 to 1.6 

 


phpAdsNew 1.6 has a slightly modified acl table. You are advised to either reinstall your tables or make these changes manually :

ALTER TABLE acls MODIFY COLUMN acl_type enum('clientip','useragent','weekday', 'domain','source','time') not null default 'clientip';

 

 
   
  2.3.9phpAds 1.4 to phpAdsNew 1.5 

 


phpAdsNew is not 100% compatible with phpAds. You are advised to upgrade to phpAds 1.4.0 before attempting to upgrade to phpAdsNew 1.5. The view() call is not compatible with phpAds. It now has a different 4th parameter. Anyone using the withtext or context parameters should add an empty parameter in between.

New fields have been added in the current tables. You are advised to make these changes :

ALTER TABLE banners ADD COLUMN weight tinyint(4) default '1' NOT NULL;
ALTER TABLE banners ADD COLUMN seq tinyint(4) default '0' NOT NULL;
ALTER TABLE banners ADD COLUMN target varchar(8) default '' NOT NULL;

The best way to upgrade the php files is to completely erase your previous phpAds directory (as always, keep a backup until the new version works fine) and untar the current release. You will notice files have changed extensions from php3 to php, so make sure your webserver understands the php-extension as either php3 or php4 files.

Don't forget to edit your new config.inc.php because there are quite some changes !

 

 
   
  2.3.10phpAds 1.3 to phpAds 1.4 

 


Version 1.4.0 is not 100% compatible to version 1.3.0.

The syntax of the view() call in local mode is downwards compatible. With remote invocation, a new argument ("n") was introduced to allow multiple remote banners. The syntax with remote invocation remains downwards compatible to 1.3.0, though.

New tables and new fields in existing tables have been introduced. It is recommended to reinstall the tables completely, and to add your banners from scratch.

If you want to preserve your old banners, you may be able to do the necessary changes manually:
The table clients has one new field, which you'll need to add manually:
expire date DEFAULT '0000-00-00'. The table acls is new.

Please don't go this path on a production environment without further testing.