DynAds
| Sample Testimonial
|
Thank you. By the way, I think that your script is superb and a steal for
the price you are selling it. Good work.
G. Cam, saexplorers.org
More...
|
|
Installation of DynAds MySQL Fast CGI Version 2.13
DynAds fast CGI can be used as either standard CGI program or fast CGI
program. If the web server does not provide fast CGI functionality, then DynAds runs as a standard CGI
script. If your server is fast CGI enabled, then DynAds runs as a fast CGI application.
We suggest using fast CGI server for very fast responses.
Requirements
DynAds fastCGI variant can be used as either standard CGI program or fastCGI
program. If the web server does not provide fastCGI, then DynAds runs as a standard CGI
script. If your server is fastCGI enabled, then DynAds runs as a fastCGI application.
We suggest using fastCGI server for lighting fast responses.
In order to run DynAds MySQL fast CGI V2.13, you need these features on your server.
- Right to run Perl or CGI programs (i.e. cgi-bin directory)
- MySQL database server. MySql is a free product that you can download and install from
mysql.com.
- The following Perl modules are required. These modules come with the standard Perl installation.
Any missing module can be installed from cpan.org
for free.
- CGI module
- DBI and DBD::MySQL module
- Fcntl module
- HTTP and LWP modules for some operations
- Perl CGI::Fast and FCGI modules.
- fast CGI compliant web server for fast CGI access (see http://www.fastcgi.com/).
Upgrading
From V.2.05
Database structure of DynAds MySQL V2.13 is different from the database of V2.05.
On the other hand, CGI interface of ad.pl (ad delivery engine) is completely down compatible
with MySql (fastcgi/mod perl) V2.05 or TDB 2.05. Therefore, for a seamless upgrade from
V2.05 (either mysql or Text database versions), first install V2.13 in a different directory
at the same level with the old one. For example, if V2.05 was installed on /cgi_bin/dads, then
install V2.13 in /cgi-bin/dadsnew. Then, transfer the old database to V2.13 via the setup.pl
program. Test the new installation by some examples.
Then rename the old installation directory to another name (eq. to /cgi-bin/dadsold), and
rename the new installation to the old name (eq, to /cgi-bin/dads). Now, the new version
should start to serve your ads. Do not delete the old installation until you are convinced
that the new version is working properly.
From V.2.10
- Copy all the new files to the install directory.
- Assign execute permission to "archive.pl"
- Run setup.pl and go to "Database Connectivity Settings Menu" and
click to "Save Changes" button to make it update the associated configuration file.
- Go back to main menu and enter to "Database Table Management" menu.
Click to "Create All Not Existing Tables" button to create the new missing tables.
- Read the Database Archive section for more info.
Installation
Installation of DynAds is very easy. DynAds V2.13 comes with a setup program
to configure database and program specific options.
Installing DynAds as a CGI script.
- For Unix/Linux systems, you must know the exact path to the perl interpreter
installed on your server. The default on the scripts is /usr/bin/perl. If your path
is different from this (ask to your hosting provider, if you don't know it),
open setup.pl, archive.pl, ad.pl and dynadmin.pl in a text editor and replace the first
line with #!YourServerPerlPath. Do not put any spaces at the line beginning.
- For Windows servers, make sure that your server associates '.pl' extension
with the Perl interpreter installed.
- Some servers require that the CGI file extensions should be '.cgi'. If your server
does not accept '.pl' as CGI application then change the file names of
'setup.pl' to 'setup.cgi', 'archive.pl' to 'archive.cgi', 'ad.pl' to 'ad.cgi' and
'dynadmin.pl' to 'dynadmin.cgi' (other file extensions should not be changed).
In this document, we still refer to perl files with a '.pl' extension.
- Upload all of the files to your server. Always upload perl files in ASCII mode.
Make sure that, your server allows you to run CGI scripts under the directory
you put DynAds files (most servers require CGI scripts be under cgi-bin directory).
Again make sure that you give write and execute permission to the scripts directory (777 will do).
Give execute permissions to the script files (755 or more restrictive one of your choice),
'setup.pl', 'archive.pl', 'ad.pl', and 'dynadmin.pl'. And give write permission (777 will do) to configuration
files 'da210adcfg.pl', 'da210admincfg.pl', and 'da210sharedcfg.pl'.
- Run setup.pl from your browser. For example, if your domain is
'http://www.YourDomain.net', and you installed DynAds at the directory (relative to URL)
'cgi-bin/dads' then type in your browsers address bar:
http://www.YourDomain.net/cgi-bin/dads/setup.pl
If every thing is OK, you should see the main setup screen. One by one, enter the
menus and set the configuration options. Setup program is self explanatory.
- When you finished configuring DynAds, run dynadmin.pl from your browser.
For example, if your domain is
'http://www.YourDomain.net', and you installed DynAds at the directory (relative to URL)
'cgi-bin/dads' then type in your browsers address bar:
http://www.YourDomain.net/cgi-bin/dads/dynadmin.pl
If every thing is OK, you should see a Login page. Enter the admin user name and
password you have set in the setup program. Make sure that the cookies on your
browser are enabled. 'dynadmin.pl' requires cookies for user tracking.
- If the scripts are not functioning correctly, first check the file permissions.
Then make sure that the first lines of executable files are set correctly
to the Perl interpreter. If you can not find the problem, contact RobustHost for assistance.
Installing DynAds as a fastCGI script.
- Install DynAds like a CGI script as outlined in the steps 1-7 above.
- Configure your web server to run ad.pl and dynadmin.pl scripts under the DynAds installation directory
as fastCGI scripts. Ask your hosting service provider how to do it. Especially, configure
the server to re-load a fastCGI script if it exits.
- Under fastCGI, scripts are persistent in memory. When a request is made to a script
it is compiled only for the first time and then kept in the memory. That is why fastCGI
scripts run very fast. However, persistent Perl interpreter may pollute the memory in time.
Therefore, 'ad.pl' and 'dynadmin.pl' scripts exit after 100 services by default.
Then the fastCGI server should re-load the script. If you want to change the number of
services before exit, edit the $ExecCount variable in files 'ad.pl line 64',
'dynadmin.pl line 74' to the value you want. If you set it to -1, then it will take the
maximum amount of time before exit.
Archiving Database
Since DynAds stores every view and click entry in the log table, as the database
grows, it starts to become time consuming to generate the reports. During the
report generation phase, incoming impression and click requests are not served
by MySQL server and the pending connections fill up the connection pool of MySQL
causing it to hang up.
To solve this problem, we have to keep the number of records in the log table
small such as 1 or 2 months of data. And old records must be archived as daily
sums and be deleted from the Log tables regularly.
The "archive.pl" file is for this functionality.
You must run this file regularly to automatically archive the new record in the
Log table and delete the old records before the time window you specify. First,
decide how many days of data you want in the detailed Log tables. Lets say you
decided to retain the last 60 days of data in the Log reports and delete the
records older than 60 days automatically. You must create a cron job to run this
file regularly. You must decide the frequency of the archives. Typically you can
run it one or twice a day. Set your cronjob to run
/usr/bin/perl YourPathFileToDynAdsInstalDirectory/archive.pl daywindow=60
This will archive the new data in Log table and delete the records older than 60
days.
When you first run this command, it may take some time to complete because there
are many rows in the Log table initially. So maybe it is better to run the above
command from manually. If you like you can activate the archive.pl from your
browser too:
http://YourDomain/Path/archive.pl?daywindow=60
After the archive operation is done successfully, go to dynadmin.
You will see an archive sub-menu in the Reports section. By using that menu, you
can obtain the reports for the records in the archive file. Still you can use
the old report menus to obtain detailed reports from the Log table.
RobustHost.com wishes you a happy DynAds experience.
|
|