PHPackages                             gilleswittenberg/apps - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. gilleswittenberg/apps

ActiveCakephp-plugin[Framework](/categories/framework)

gilleswittenberg/apps
=====================

CakePHP Apps Plugin

1211PHP

Since Nov 3Pushed 12y agoCompare

[ Source](https://github.com/gilleswittenberg/CakePHP_Apps)[ Packagist](https://packagist.org/packages/gilleswittenberg/apps)[ RSS](/packages/gilleswittenberg-apps/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

CakePHP Apps plugin [![Build Status](https://camo.githubusercontent.com/85f3b91ac9546aa42f21852efcd4e953a2fede62f4d91535f462388bc7363fb2/68747470733a2f2f7472617669732d63692e6f72672f67696c6c657377697474656e626572672f43616b655048505f417070732e706e67)](https://travis-ci.org/gilleswittenberg/CakePHP_Apps)
==============================================================================================================================================================================================================================================================================================================

[](#cakephp-apps-plugin-)

CakePHP plugin to manage multiple applications, domains and databases running on same APP and CORE codebase.

Requirements
------------

[](#requirements)

- CakePHP 2.0+
- PHP 5.3.0
- This Plugin is written for Debian/Linux running Apache2 and MySQL

Installation
------------

[](#installation)

- Install using Composer ()
    - add `require: {"gilleswittenberg/apps": "dev-master"}`
- Install copying or cloning to Plugin/Apps
- Add `CakePlugin::load('Apps', array('bootstrap' => true, 'routes' => true));` to Config/bootstrap.php

Setup Debian
------------

[](#setup-debian)

- Install sudo (as root) `apt-get install sudo`
- Add Apache user (www-data) to sudoers `sudo adduser www-data sudo`
- Allow Apache user (www-data) to passwordless execute the following commands (apachectl, a2ensite, a2dissite)
    - run `visudo`
    - add `www-data ALL = NOPASSWD: /usr/sbin/apachectl`
    - add `www-data ALL = NOPASSWD: /usr/sbin/a2ensite`
    - add `www-data ALL = NOPASSWD: /usr/sbin/a2dissite`
- Make sure {APACHE\_DIR}/sites-available is writable by user running Apache (www-data)

Setup
-----

[](#setup)

- Set database config for database Apps in Config/database.php
- Run `cake schema create -p Apps`
- Grant the user of database Apps the following privileges: create, drop, create user, grant user, new databases
- Create dumpDir ({TMP} by default) and make sure it is writable by user running Apache (www-data)
- Add all your document\_roots at /apps/document\_roots/
- create dir {APP}/Config/applcations for all your document\_roots
- Append the following code to all document\_root/{APP}/Config/bootstrap.php files

```
if (isset($_SERVER['SERVER_NAME'])) {
	$bootstrap = APP . Configure::read('Apps.configDir') . DS . $_SERVER['SERVER_NAME'] . '.php';
} elseif (count($_SERVER['argv'])) {
	$bootstrap = APP . Configure::read('Apps.configDir') . DS . 'current_application';
}
if (file_exists($bootstrap)) {
	require($bootstrap);
}
```

- Add the following constructor method to all document\_root/{APP}/Config/database.php DATABASE\_CONFIG classes

```
public function __construct () {
	$config = Configure::read('Database.config');
	if (is_array($config)) {
		$this->default = $config['default'];
	}
}
```

- Create your base schema.php and snapshots for each document\_root and make sure the classname is AppSchema
- Open /apps/applications/check\_config in your browser and check for warnings
- Create some apps at /apps/applications/add to see if everything is working fine

ToDo
----

[](#todo)

- Give Application.status titles instead of integers
- Slim down privileges of database Apps user
- Add counter-cache to DocumentRoot for applications

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/41184f56cbe4766c9826303e36afc0639f8b58a9b912ff6a925ed7c8628a532f?d=identicon)[gilleswittenberg](/maintainers/gilleswittenberg)

### Embed Badge

![Health badge](/badges/gilleswittenberg-apps/health.svg)

```
[![Health](https://phpackages.com/badges/gilleswittenberg-apps/health.svg)](https://phpackages.com/packages/gilleswittenberg-apps)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M836](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
