MySQL table_open_cache size unusually small

https://bugzilla.redhat.com/show_bug.cgi?id=1080547
Users do not have the ability to change table_open_cache to values other
than 4 (and have them stick).  The set value seems too low to allow
database operations to remain efficient.  For example, in my app I have
18 tables that are constantly being written to from a single persistent
connection, but can only have four tables cached at a time.  This leads
to tables having to be re-opened which causes fairly significant disk
I/O.
Both env OPENSHIFT_JBOSSEAP_MODULE_PATH and OPENSHIFT_JBOSSAS_MODULE_PATH exist in jbosseap/as

https://bugzilla.redhat.com/show_bug.cgi?id=1080794
Make restarts resilient to missing/corrupt pidfiles

Resolve bug https://bugzilla.redhat.com/show_bug.cgi?id=1081901
Merge pull request #5063 from bparees/config_mysql_table_cache

Merged by openshift-bot
Postgresql still can be accessed via DB driver after postgresql stop
for jboss app

https://bugzilla.redhat.com/show_bug.cgi?id=1081796
Create one jboss app(e.g., myjbosseap6), embedded with postgresql-8.4 db
cartridge and add postgresql.jsp into src/main/webapp of local repo, ant
then git push. Access
http://$appname-$domainname.int.rhcloud.com/postgresql.jsp after
postgresql stop, found it still can be accessed, restart jbosseap app,
found it still works.
Merge pull request #5098 from bparees/switchyard_modules

Merged by openshift-bot
Bug 1081869 - Console needs a oo-admin-console-cache command. Remove the
--console flag from the oo-admin-broker-cache command.
Merge pull request #5104 from ironcladlou/restart-fixes

Merged by openshift-bot
Merge pull request #5107 from bparees/postgresql_pid

Merged by openshift-bot
Merge pull request #5108 from jwforres/bug_1081869_console_needs_cache_clear_command

Merged by openshift-bot
Copy PHP extensions INI files to the cartridge code for maintainability

- Copy RHEL PHP 5.3 RPM /etc/php.d/*.ini files
- Copy RHEL PHP 5.4 SCL /opt/rh/php54/root/etc/php.d/*.ini files
- Lock all the INI files by default (not editable in userspace)

Motivation:
- We want to be able to enable/disable PHP extensions in gears
- We want to be able to edit PHP extensions settings in gears
- We want consistency for all the INI files across all nodes.
  Currently, the INI files are marked %config(noreplace) in RPMs
  and may theoretically differ from node to node.

PHP_INI_SCAN_DIR (PHP/PECL extensions):
- Set PHP_INI_SCAN_DIR env var to scan customized INI files
  from ${OPENSHIFT_PHP_DIR}etc/php.d/ directory
  instead of the default system's scan dir (eg. /etc/php.d/)

https://trello.com/c/lbjDOA6S - origin_cartridge_20
https://trello.com/c/1VcpoZTf - origin_cartridge_140
https://trello.com/c/iDrhIUof - origin_cartridge_136
https://bugzilla.redhat.com/show_bug.cgi?id=1001400 - bug 1001400
Enable mcrypt for PHP 5.4

https://trello.com/c/iDrhIUof - origin_cartridge_136
PHP - Remove duplicated files on gears & Leverage use of usr/ shared dir

Changes in PHP gears:
- remove extra directory php/versions/ that was duplicated
  on every PHP gear without any reason

Changes in PHP cartridge source directory:
- move the php/versions/ directory into the shared usr/
  directory and simplify it's structure as follows:

└── usr
    ├── 5.3
    │   └── etc
    │       ├── php.d
    ├── 5.4
    │   └── etc
    │       ├── conf.d
    │       ├── php.d
    ├── shared
    │   └── etc
    │       ├── conf
    │       ├── conf.d
    │       ├── php.ini.erb
PHP APC configurable per gear size / env var

- APC is enabled by default
- Users can enable/disable APC by running
  `rhc env-set OPENSHIFT_PHP_APC_ENABLED=false --app <app>`
  and `rhc app-restart <app>` commands

APC shared memory size:
- Formula: GEAR_MEMORY/8
  - 64M on Small gears by default
  - 128M on Medium gears by default
  - 256M on Large gears by default
- Users can change the APC shared memory size by running
  `rhc env-set OPENSHIFT_PHP_APC_SHM_SIZE=128M --app <app>`
  and `rhc app-restart <app>` commands

New environment variables:
- $OPENSHIFT_PHP_APC_ENABLED=true/false
- $OPENSHIFT_PHP_APC_SHM_SIZE={64,128,256}M
PHP - Development/Production mode

- Expose new environment variable to choose application mode:
  APPLICATION_ENV=development/production (production by default)

- Users must restart their app for the PHP to pick-up the updated values!

Production environment:
- disables Xdebug (can be overriden by `OPENSHIFT_PHP_XDEBUG_ENABLED=true`)
- disables APC stats (for better performance)
- sets error_reporting level to `E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR|E_PARSE`
- disables display_errors, display_startup_errors, track_errors, html_errors

Development environment:
- enables Xdebug (can be overriden by `OPENSHIFT_PHP_XDEBUG_ENABLED=false`)
- sets Xdebug max_nesting_level = 200
- enables APC stats
- sets error_reporting level to `E_ALL|E_STRICT`
- enables display_errors, display_startup_errors, track_errors, html_errors
Fix php file permissions cucumber tests
fix php upgrade
Merge pull request #5112 from VojtechVitek/php_fix_upgrade

Merged by openshift-bot
Merge pull request #5024 from VojtechVitek/php_extensions

Merged by openshift-bot
Fix formatting