I am having an issue getting a simple controller to run as a shell command.
The controller is simply:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Check_C extends CI_Controller {
// Fire up the new controller, make sure to extend the parent
public function __construct(){
parent::__construct();
}
public function runcheck(){
echo 'HI'; //$this->input->is_cli_request();
}
}
?>
and the command I am running from the root of the app is:
php index.php check_c runcheck
The output is:
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
Now, I did a little searching and see that it could be the way my php install is compiled, and/or configured.
I have verified, this is a default install of PHP on Ubuntu Server 13.10...so I do not know if mysql is complied with PHP. I do know that the extension is loaded in my php.ini file, on top of this, I do not get this Warning on any page in the site.
How to do I fix it?
php -mPHP_EOLwhich you don't, but that's not the issue. Something is loadingmysql.sotwice. colekcolek.com/2011/12/16/… and see @kevindeleon's answer.