phpAdsNew   Home  

 

 

 

  2.3 Configuration  

 

phpAdsNew can be configured by using Settings section of the Administrator interface. Some settings are stored inside the config.inc.php file, other settings are stored inside the database. Only settings stored in the database can always be edited. The settings which are stored in the config.inc.php file can only be edited if the config.inc.php file is writable by the webserver.

 
   
  2.3.1 Locking and unlocking the config.inc.php file  

 


Before you can edit the settings stored inside the config.inc.php file you need to unlock the file and allow the webserver to make changes to it. By default the webserver is not allowed to make changes to the file for security reasons. If you are finished editing the settings you need to make sure the file is locked, because otherwise it would be possible other users on the same webserver would be able to edit the settings.


Unlocking the config.inc.php file
If you are using a Windows webserver check the properties of the file and make sure the read-only flag is not set. If you are using a Linux or Unix webserver you can alter the write permissions with the chmod command from the command prompt:

chmod a+w config.inc.php

If you do not have command line access to your web server then your FTP client should be able to change file permissions.


Locking the config.inc.php file
If you are using a Windows webserver check the properties of the file and make sure the read-only flag is set. If you are using a Linux or Unix webserver you can alter the write permissions with the chmod command from the command prompt:

chmod a-w config.inc.php

If you do not have command line access to your web server then your FTP client should be able to change file permissions.

 

 
   
  2.3.2 Database configuration  

 


Before you can use phpAdsNew you need to tell phpAdsNew which database to use and which username and password to use.

Database hostname
Specify the hostname of the database server.


Database username

Specify the username which phpAdsNew must use to gain access to the database server.


Database password

Specify the password which phpAdsNew must use to gain access to the database server.


Database name

Specify the name of the database.


Use persistent connections

If you want to use persistent connections to the database server check this option. The use of persistent connection can speed up phpAdsNew considerably and may even decrease the load on the server. There is a drawback however, on sites with a lot of visitors the load on the server can increase and become larger then when using normal connections. Whether you should use regular connections or persistant connections depends on the number of visitors and the hardware your are using. If phpAdsNew is using too many resources, you should take a look at this setting first. Persistent connections are turned off by default.


Use delayed inserts

MySQL locks the table when it is inserting a row. If have many visitors to your site, it could be possible phpAdsNew must wait before inserting a new row, because the database is still locked. When you use insert delayed, you don't have to wait and the row will be inserted at a later time when the table is not in use by any other thread. Another major benefit of using insert delayed is that inserts from many clients are bundled together and written in one block. This is much faster than doing many separate inserts, but could cause data corruption when the database server should crash. This option is turned off by default.

 

 
   
  2.3.3 Invocation and delivery settings  

 


Banner retrieval method
phpAdsNew can use four different types of banner retrieval: Random banner retrieval (default), Normal sequential banner retrieval, Weight based sequential banner retrieval and Full sequential banner retrieval.

For example, you have set 4 banners in phpAdsNew and the second banner is weight 2 (rest of the banners is weight 1):

Random banner retrieval: 1312312331231231231232312314121312
Normal sequential banner retrieval: 1234 3214 4213 2314 3241
Weight based sequential banner retrieval: 12324 43122 31221 21342 42321
Full sequential banner retrieval: 1234 1234 1234 1234 1234

If you are using Zones, phpAdsNew will always use random banner retrieval and this setting will be ignored.


Use conditional keywords
phpAdsNew includes a powerful banner retrieval system. For more information, please read the API section. With this option, you can activate conditional keywords. This is turned on by default.


Use multiple keywords
For each banner, you can specify one or more keywords. This option is needed if you want to specify more than one keyword. This is turned on by default.


Use display limitations

If you are not using display limitations you can disable limitation checking altogether with this parameter, this will speed up phpAdsNew. If you have disabled display limitations with this parameter you can't modify any existing limitations from the admin interface.


Cache zones
If you are using zones this setting allows phpAdsNew to store the banner information inside a cache which will be used later on. The will speed up phpAdsNew a bit, because instead of retrieving the zone information and retrieving the banner information and selecting the right banner, phpAdsNew only needs to load the cache. This feature is turned on by default.


Time between cache updates
If you are using cached zones, the information inside the cache can become outdated. Once in a while phpAdsNew needs to rebuild the cache, so new banners will be included in the cache. This setting lets you decide when a cached zone will be reloaded, by specifing the maximum lifetime of the cached zone. For example: if you set this setting to 600, the cache will be rebuild if the cached zone is older than 10 minutes (600 seconds).

The all zone caches will be automatically rebuild when a banner is deleted or deactivated from the admin interface. Also changes to the zone settings will result in a rebuild of the zone cache.
If you want to manually rebuild the zone cache you can do so in the Admin Interface.


Use P3P Policies
Internet Explorer 6 is the first browser to implement the W3C P3P standard. The P3P standard is created to protect the privacy of your users. By default Internet Explorer will reject thirth-party cookies, unless a valid privacy policy header is also sent, together with the cookies. These setting will allow you send these privacy policies headers together with the cookies which are being sent by phpAdsNew.
If you want to enable phpAdsNew' P3P Privacy Policies you must turn this option on.

For more information about P3P and Policies: http://www.w3.org/P3P/


P3P Compact Policy
The compact policy which is sent together with cookies. The default setting is: 'CUR ADM OUR NOR STA NID', which will allow Internet Explorer 6 to accept the cookies used by phpAdsNew. If you want you can alter these settings to match your own privacy statement.


P3P Policy Location
If you want to use a full privacy policy, you can specify the location of the policy.

 

 
   
  2.3.4 Banner settings  

 


Automatically change HTML banners in order to force click logging
If this option is turned on phpAdsNew will automatically alter HTML banners in order to allow the clicks to be logged. However even if this option is turned it will be possible to disable this feature on a per banner basis.


Allow PHP expressions to be executed from within a HTML banner

It is possible to let phpAdsNew execute PHP code embedded inside HTML banners. This feature is turned off by default.


Storing method

If you want to use banners stored on the web server, you need to configure this setting. If you want to store the banners in a local directory set this option to 'local mode'. If you want to store the banner on an external FTP server set this option to 'FTP mode'. On certain web servers you may want to use the FTP option even on the local web server.

This option doesn't need any special extensions, but phpAdsNew will try to use the FTP extension if it is available, otherwise phpAdsNew will use sockets to provide the same functionality.


Public URL of local directory / FTP server
If you store banners on a web server, phpAdsNew needs to know which public URL corresponds with the directory you specified above. Do not specify a trailing slash (/).


Local mode Web banner directory

Specify the directory where phpAdsNew needs to copy the uploaded banners to. This directory needs to be writable by PHP, this could mean you need to modify the UNIX permissions for this directory (chmod). The directory you specify here needs to be in the web server' document root, the web server must be able to serve the files directly. Do not specify a trailing slash (/).
You only need to configure this option if you have the storing method to 'local mode'.


FTP server, FTP directory, FTP username and FTP password

Specify the FTP server where phpAdsNew needs to copy the uploaded banners to. The directory you specify here needs to be in the web server' document root, the web server must be able to serve the files directly. If you don't specify a directory phpAdsNew will upload the banner to the root directory of the FTP server. If you don't specify a username and password phpAdsNew will try to login as an anonymous user with the administrators e-mail address. It is not recommended to store you banners on an FTP server, which can be accessed by anonymous users!!! Do not specify a trailing slash (/).
You only need to configure this option if you have set $phpAds_type_web_mode to 'FTP mode'.


Default Banner URL and Default Banner Target

If phpAdsNew can't connect to the database server, or can't find any matching banners at all, for example when the database crashed or was deleted, it won't display anything. Some users may want to specify a default banner, which will be displayed in these situations. The default banner specified here will not be logged and won't be used if there are still active banners left in the database. Be aware this default banner should only be used as a failsafe, not as a regular banner. This is turned off by default.

 

 
   
  2.3.5 Statistics settings  

 


Use Compact Stats
Traditionally phpAdsNew used rather extensive logging, which was very detailed but was also very demanding on the database server. This could be a big problem on sites with a lot of visitors. Since version 1.9 phpAdsNew uses a new kind of statistics, the compact statistics, which is less demanding on the database server, but also less detailed. The compact statistics only logs daily statistics, if you need hourly statistics you can turn the compact statistics off.


Log Adviews
Usually all AdViews are logged, but if for some reason you don't want to gather statistics about AdViews you can turn this off.


Log Adclicks
Usually all AdClicks are logged, but if for some reason you don't want to gather statistics about AdClicks you can turn this off.


Mail Headers

You can alter the e-mail headers used by the e-mails which phpAdsNew sends.


Warn Limit

When the number of views left in a campaign hits this limit phpAdsNew will try to send a warning e-mail to the administrator and client. You can disable this feature for each type of user with the settings below. The default limit is 100 AdViews.


Warn Admin

phpAdsNew can sent you e-mail if a client has only a limited number of clicks or views left. This is turned on by default.


Warn Client
phpAdsNew can sent the client e-mail if he has only a limited number of clicks or views left. This is turned on by default.


Ignore Hosts
If you don't want to count clicks and views from certain computer you can add these to this setting. You will have place each host on a new line. If you have enabled reverse lookup you can add both domain names and IP addresses, otherwise you can only use IP addresses. You can also use wildcards (i.e. '*.altavista.com' or '192.168.*').


Reverse DNS Lookup
phpAdsNew logs the IP address of each visitor by default. If you want phpAdsNew to log domain names you should turn this on. Reverse lookup does take some time; it will slow everything down.


Proxy Lookup

Some user are using a proxy server to access the internet. In that case phpAdsNew will log the IP address or the hostname of the proxy server instead of the user. If you enable this feature phpAdsNew will try to find the IP address or hostname of the user behind the proxy server. If it is not possible to find the exact address of the user it will use the address of the proxy server instead. This option is not enable by default, because it will slow logging down.

 

 
   
  2.3.6 Administrator settings  

 


Admin's username
The administrator username, you can specify the username that you can use to log into the administrator interface.


Password
The administrator password, you can specify the password that you can use to log into the administrator interface. If you want to change the password you need to enter the old password first and then enter the new password twice to avoid typos.


Admin's full name
Specify the administrator's full name. This used when sending statistics via email.


Admin's email address
The administrator's e-mail address. This is used as from-address when sending statistics via email.


Company Name

This name is used in the e-mail sent by phpAdsNew.


Language
Specify the default language phpAdsNew should use. This language will be used as a default for the admin and client interface. Please note: you can set a different language for each client from the admin interface and allow clients to change their language themselves.

phpAdsNew currently supports a large number of languages, including:
brazilian-portuguese, chinese (big5), danish, dutch, english, flemish, french, german, indonesian, italian, norwegian, polish, portuguese, romanian, russian (cp1251), russian (koi8r), spanish, swedish and turkish.


Admin's delete actions need confirmation for safety

If you want to recieve a warning before deleting clients, campaigns or banners; enable this option.

 

 
   
  2.3.7 User interface settings  

 


Application Name

Specify the name you want to use for this application. This string will be displayed on all pages in the admin and client interface. If you leave this setting empty (default) a logo of phpAdsNew will be displayed instead.

My header and My Footer
You should put here the path to the header files (e.g.: /home/login/www/header.htm) to have a header and/or footer on each page in the admin interface. You can put either text or html in these files (if you want to use html in one or both of these files do not use tags like <body> or <html>)


Enable client welcome message
If you turn this feature on a welcome message will be displayed on the first page a client will see after loggin in. You can personalize this message by editing the 'welcome.html' file location in the 'admin/templates' directory. Things you might want to include are for example: Your company name, contact information, your company logo, a link a page with advertising rates, etc..

Client Welcome text
Instead of editing the 'welcome.html' file you can also specify a small text here. If you enter a text here, the 'welcome.html' file will be ignored. It is allowed to use HTML tags.


 
   
  2.3.8 Interface defaults  

 


Begin of Week
For most people a week starts on a Monday, but if you want to start each week on a Sunday you can.


Percentage Decimals
Specifies how many decimal places to display on statistics pages.


Default banner weight
If you want to use a higher default banner weight you can specify the desired weight here.
This settings is 1 by default.


Default campaign weight

If you want to use a higher default campaign weight you can specify the desired weight here.
This settings is 1 by default.


Allow SQL stored banners,
Allow Webserver stored banners,
Allow URL banners and
Allow HTML banners
phpAdsNew can use different types of banners and store them in different ways. The first two options are used for local storage of banners. You can use the admin interface to upload a banner and phpAdsNew will store the banner in the SQL database (option 1) or on a web server (option 2). You can also use a banner stored on a different web server (option 3) or use html to generate a banner (option 4). You can disable any one of these types by altering these settings. By default all banner types are turned on.

If you disable a certain banner type while there are still banners available of the this type, phpAdsNew will allow the use of these banners, but will not allow the creation of new banners of this type.