Friday, September 23, 2011

Cannot find codeigniter spark path at sparks

1st issue:
sparks not installed successfully.
reinstall sparks


    Steps:
  1. Via the shell, navigate to the root of your CodeIgniter application
  2. Copy and paste the following into the command line:
php -r "$(curl -fsSL http://getsparks.org/go-sparks)"
  1. Press enter. If all goes well, move on to Get Sparks. If not, try the normal installation below.



2nd issue:
if you use public folder for index.php, CI application cann't find sparks.


Steps:
go to the site_root/application/core/MY_Loader.php

Default constructor

function __construct() { 
   if(!defined('SPARKPATH')) 
   { 
      define('SPARKPATH', 'sparks/'); 
   } 
   parent::__construct(); 
}


modify highlighted row to

define('SPARKPATH', '../sparks/');


1 comment:

Machaven said...

Thanks, ended up doing:

define('SPARKPATH', APPPATH.'sparks/');