Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
CodeIgniter PHP QuickStart on OpenShift
branch: master

This branch is 21 commits ahead of gshipley:master

README.md

CodeIgniter on OpenShift

The easiest way to install this application is to use the OpenShift Instant Application. If you'd like to install it manually, follow these directions.

OpenShift Considerations

These are some special considerations you may need to keep in mind when running your application on OpenShift.

Database

By default, your application is configured to use a MySQL database on OpenShift.

Handling Multiple Environments

By default, CodeIgniter on OpenShift comes with the ENVIRONMENT constant set to 'production'. At the top of php/index.php, you will see:

define('ENVIRONMENT', 'production');

In production mode, your application will:

  • Disable all error output (for security reasons)

When you develop your CodeIgniter application locally, you can change the environment by setting the ENVIRONMENT variable in php/index.php to 'development':

define('ENVIRONMENT', 'development');

If you do so, CodeIgniter will run your application under 'development' mode. In development mode, your application will:

  • Show more detailed errors in browser
  • Load development-specific configuration files

We strong advise you to not run your application in this mode in production.

Visit the CodeIgniter User Guide for more details on using multiple CodeIgniter development environments.

Modified Configuration Settings
File Config Setting Value
php/index.php ENVIRONMENT production
php/application/config/config.php log_path
cache_path
encryption_key
proxy_ips
$_ENV['OPENSHIFT_LOG_DIR']
$_ENV['OPENSHIFT_TMP_DIR']
$_ENV['OPENSHIFT_SECRET_TOKEN']
$_ENV['OPENSHIFT_HAPROXY_IP']
php/application/config/database.php hostname
port
username
password
database
$_ENV['OPENSHIFT_MYSQL_DB_HOST']
$_ENV['OPENSHIFT_MYSQL_DB_PORT']
$_ENV['OPENSHIFT_MYSQL_DB_USERNAME']
$_ENV['OPENSHIFT_MYSQL_DB_PASSWORD']
$_ENV['OPENSHIFT_APP_NAME']

Manual Installation

  1. Create an account at https://www.openshift.com/

  2. Create a PHP/MySQL application

    rhc app create codeigniterapp php-5.4 mysql-5.5 --from-code=https://github.com/openshift/CodeIgniterQuickStart.git
    

    Note: This QuickStart was configured for MySQL

  3. That's it! Enjoy your new CodeIgniter application!

Something went wrong with that request. Please try again.