Skip to content

tranphuoctien/CodeIgniterQuickStart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

CodeIgniter PHP QuickStart on OpenShift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.9%
  • Shell 0.1%