Agentless Backup is Not a Myth
A database.ini database configuration file gets created in the config directory. Modify the database.ini file for the MySQL database. We shall be using the development mode as follows:
[development]
phptype = mysql
database = test
hostspec = localhost
username = root
password =
persistent = true
Modify the config/environment.php directory to set the PHP directory, the trax root directory, and the trax environment mode. Define variables PHP_LIB_ROOT, TRAX_ROOT, and TRAX_ENV.
define("PHP_LIB_ROOT", "C:/PHP/PEAR");
define("TRAX_ROOT", "C:/Apache/htdocs/catalog");
define("TRAX_ENV", "development");
The public/.htaccess file specifies configuration directives for the Apache HTTP server. The configuration directives in the .htaccess file apply to the directory in which the .htaccess file is placed and the sub-directories of the directory. Modify the public/.htaccess file. Replace the following line with the subsequent line:
php_value include_path .:C:\Apache\htdocs\catalog/config php_value include_path .;C:\Apache\htdocs\catalog/config
The include_path directive specifies a list of directories and is used to locate files. Access the Trax application console with the URL http://localhost/catalog/public.
Modify the C:\Apache\conf\httpd.conf file so the directives in the .htaccess file may override earlier access information. Activate the mod_rewrite module by removing the '#' before the following line:
LoadModule rewrite_module modules/mod_rewrite.so
The mod_rewrite module provides a rules-based rewriting engine to rewrite requested URLs. Also set all the AllowOverride directives to All.
AllowOverride All
The AllowOverride directive specifies which directives in the .htaccess may override earlier access information. Modify the DocumentRoot directive and <Directory> setting in httpd.conf to the following:
DocumentRoot "C:/Apache/htdocs/catalog/public" <Directory "C:/Apache/htdocs/catalog/public">
Reboot time
Restart the Apache server. We shall generate a model class and the scaffolding for the model class, which models a database table, with the scaffold generator. Create a scaffold.bat file in the C:\Apache\htdocs\catalog directory. Copy the following code to the scaffold.bat file:
php ./script/generate.php scaffold %1 %2
Before creating the scaffolding, build a database table catalogs in the MySQL database with the SQL script catalog.sql. The primary key field should be "id" and of type INT. Create a scaffolding for the "catalogs" table with the following command:
C:\Apache\htdocs\catalog>scaffold catalog catalog
A model class catalog.php gets generated in the models directory.
<?php
class Catalog extends ActiveRecord {
}
?>
Regcast training : Hyper-V 3.0, VM high availability and disaster recovery
COMMENTS
Wheres the 3rd generation rails?
My problem with these CRUDy things is they are all so naive. After years of writing DB's I practically never access it unless thru procedures that almost never access one table alone.
All you need is a few clever naming trix and a matching form handling library and you can knock a front end up via the DB itself - and move the DB to any provider changing a connection string.
@annoying - if you'd used MVC you may have stayed coding
What we're finding is that using Zend framework and Smarty based MVC means that the code is kind of folding in on itself and getting easier and easier.
Say we are producing a bespoke solution. I.e. there is no existing web app like SQL-Ledger, RT, Twiki, Moodle etc etc etc which fulfils the requirements.
OK - So we're going to build a web based application - after all - coders have changed from 4GL, VB, Delphi, to web based like a herd of wildebeest thundering over the plain.
Let's get the framework in place - by which I mean the DEV/TEST/LIVE LAMP servers, backups logins for developers, Twiki page etc, etc.
Now we put in place a basic MVC based app.
Once we are up and running the development gets easier and easier - we just concetrate on getting the clients specs correct - and building a DB structure which will be able to hold the data.
Actually implementing the interface (using Smarty) becomes very easy.
It's difficult to fully explain - but it feels as if after all the different ways of implementing PHP based applications and everybody re-inventing the wheels we are finally closing in on a standard.
Code Igniter
I also like Code Igniter.
I'd rather have these examples on a UNIX platform though: there's something so retarded about c:\php as an installation directory.

IT infrastructure monitoring strategies
Agentless Backup is Not a Myth
Top 10 SIEM implementer’s checklist
Steps to Take Before Choosing a Business Continuity Partner
Enabling efficient data center monitoring