ATK Installation
Credits/Acknowledgments
Most of this guide was a straight copy and paste from the ATK website ([1]) and the install file which comes with the download. I thought it would be handy to consolidate these two sources to the wiki and include some additional info. This was originally posted by "jamiet".
Prerequisites
-A webserver such as Apache (preferred) or IIS. -PHP running as a module for the webserver. -A database server (currently only MySQL, PostGreSQL and Oracle are supported by the DB abstraction layer).
Windows Users
To get an all in one package with all of the above installed in one go fire up your preferred search engine and type WAMP. This should give you a list of Windows, Apache, MySQL, PHP combined installation programs, most of them are free (as in beer).
Linux Users
You may already have all of the above installed (dependant on your distro installation options). Load up you distro's package manager and search for each of the packages (to see if installed else search available packages to install). Install each of them (including any dependencies) and follow any distro specific instructions.
In both cases the default configuration should work although you may need to do some config work on users etc for the db server.
Once you have installed all of the above and if you chose MySQL as the DB then consider getting and installing PHPMySQLAdmin. This is a PHP based db manager application for MySQL that is a lot easier to use for db management including the running of sql files etc. It usually comes as standard in a lot of the WAMP packages and with most distro's.
Installing ATK
Now you are ready to install. If this is your first time looking at ATK then install with the demo application. This will give you a chance of seeing how the framework performs with a real application. Once proficient you may want to install just the framework. Instructions for both are below:
Installing with Demo Application
The current version of the demo contains 5 lessons to get you started and show you some of the features of ATK. More lessons will be added soon. Be sure to check back here periodically to download new lessons.
The demo application, which includes the full ATK distribution, can be here.
The instructions to get the demo running can be found in the doc/ subdirectory, in the INSTALL file and below:
1. Install this demo somewhere into the document root of your PHP-enabled webserver.
2. If on a linux server the run ./setup.sh with the username of the webserver as parameter. This will make certain files writable by the webserver. If your webserver is running as user 'www', run the script like this:
./setup.sh www
If the script fails, you may not be allowed to chown the files in the atktmp directory. In this case, you may have to run the setup.sh script as root.
2. Install the install.sql file from the main directory, into a mysql database. (oracle demo structure will be added soon)
3. Enter the username/password for this database into the config.inc.php file. Leave all other config options to their default at first. When you viewed the demo, and want to experiment, you can change the settings, but first try to get a running demo.
4. Browse the directory where you installed the demo with a webbrowser. You can login using 'administrator' as username and 'demo' as password.
Installing without Demo Application (Just the library)
If you only want to download the ATK library, without the demo application, you can here.
Instructions to start your app based on ATK:
mkdir myapp cp atk-5.1.0.tar.gz myapp tar xzvf atk-5.1.0.tar.gz ln -s atk-5.1.0 atk cp -a atk/skel/* .
This copies a skeleton to your app dir. You can base your application on the skeleton, by adding modules to the modules/ subdir of your application.
Note that if you plan to use MySQL, you should also install the init_mysql.sql file into your database. This installs the table where ATK will retrieve its values for auto-incremented database columns. (for PostgreSQL and Oracle, this is not necessary as these database support the use of sequences natively)
Hints
Make use of the 'view source' links throughout the demo to find out how the features you see are accomplished.
If you have any questions, join the ATK mailinglist. See [2] for more information.
N.B. The mailing list has now been replaced by a forum. You can view the mailing list archive on the link above and subscribe to the list but the preferred method of discussion is use of the forums at [3].
Check http://www.achievo.org/atk/download on a regular basis. More lessons will continually be added to the demo. You can send requests for lessons on specific features to the mailinglist.
If you installed the demo but are getting a lot of undefined variable errors etc when you try to load the application in your browser then your PHP error reporting level is set too high. In your php.ini file, set error_reporting to E_ALL&~E_NOTICE, instead of the default E_ALL.