PHP 5.x - and the following extensions installed
Optional PHP extensions
Important:
Your httpd.conf must include:
<Directory />AllowOverride None</Directory>
If you have trouble getting it to resolve to your page try replacing the following line in .htaccess at root level.
[remove]RewriteRule ^(.*)$ index.php [QSA,L]
[add] RewriteRule ^(.*)$ index.php?REQUESTPAGE=/$1 [QSA,L]
To set up a Corelib site, you need a distribution of Corelib and a web server, you can get it in the download section. Corelib requires mod_rewrite, therefore Apache is way to go.
$ tar xvzf corelib.<your-version>.tar.gz
Now put the corelib folder some where outside you web root. In this guide we will assume your are using the following directory structure:
corelib/ www/ - the folder accessible by the webserver, in this case it will translate into this url http://www.example.org/
The next step is to setup a new project. This is a fairly easy task to complete. Simply just copy the content of the Dummy folder into your web root. The dummy folder is located in corelib/Base/share/Dummy
$ cp -R corelib/Base/share/Dummy www
Next you need to create a config file. the Dummy comes with a default config file which is located in the dummy config directory, in our case www/etc, from now on just the “etc folder”, etc/dist/config.php.dist, copy the file to www/etc/config.php, from now on just the “config file”, after the config file have been created, you need to declare some basic configuration constants:
/** * Define path to corelib. * * This configuration constants defines the location of corelib. * * @var string path to corelib directory */ define('CORELIB', '../corelib/');
If the corelib dummy not is running at your webroot or your servername doesn't match the domain name you should uncomment to BASE_URL constant as well
/** * Define the base url. * * The base url should be defined in corelib has problems resolving base url * usually you should define this constant if the website runs in another folder * then the root of your domain, or the apache servername is something else then * your domain name. * * @var string url * @ignore */ // define('BASE_URL', 'http://path.to/site/');
and you also need to change the RewriteBase in the .htaccess file:
# # If the base directory for which the Corelib dummy is installed # differs from the webroot, change RewriteBase to match, se example below. # # if the dummy is at http://www.example.org/dummy/ the rewrite base should # be: RewriteBase /dummy # RewriteBase /
After setting up the dummy, you change permissions on the entire www/var, from now on just the “var folder”, making it writable to the user running your webserver.
chmod -R uga=+rwX www/var/
When the “var folder” have the correct permissions you should be able to point your browser at the website and see the corelib welcome page. more information about the dummy directory hierachy
Start creating features using the corelib codegenerator. Start by reading the Codegenerator Howto
Discussion
Write section on the “Big Picture”, add windows install guide and detailed information on model classes and code generator.