Welcome Guest, Not a member yet? Register   Sign In
How do you relocate a C.I. app from local host to a webserver?
#5

[eluser]John_Betong[/eluser]
 
From bitter experience I find that it is far easier to have an exact duplicate (oxymoron?) of all files both on my localhost and webserver. I can confidently upload files without overwriting a localhost version and server version.

To achieve this I define a LOCALHOST constant that I can check and modify data and variables such as config, database, profiler, ini_set('display_errors', 'On'), etc. The list gets bigger on a daily basis Sad

Code:
define('LOCALHOST', 'localhost' === $_SERVER['SERVER_NAME']);

  $config['base_url']    = 'http://' .$_SERVER['SERVER_NAME'] .'/';

  $config['log_threshold'] = LOCALHOST ? 1 : 0;

  $db['default']['database'] = LOCALHOST ? "dbname_localhost" : "dbname_online";
 
To install onto your webserver I would temporarily set your PHP error_reporting level to E_ALL and also to display all errors.
 
 
 


Messages In This Thread
How do you relocate a C.I. app from local host to a webserver? - by El Forum - 12-04-2009, 09:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB