Is the last error is for the main application ?
What is the complete folder structure for each application?
You should have your Ci system and applications above the root folder for better security.
So lets take this as your root folder /home/cmihub/public_html/
to keep it nice and tidy
/home/cmihub/ci <- all CodeIgniter files
/home/cmihub/ci/system <- CodeIgniter system folder & sub-folder
/home/cmihub/ci/main <- Copy of CodeIgniter application folder for the main application
/home/cmihub/ci/accounts <- Another copy of CodeIgniter application folder for the sub-domain application
/home/cmihub/public_html/ <- index.php and htaccess for main application
$system_path = '../ci/system';
$application_folder = '../ci/main';
/home/cmihub/public_html/subdomains/accounts <- index.php and htaccess for accounts application
$system_path = '../../../ci/system';
$application_folder = '../../../ci/accounts';
The htaccess can be the same for both domain
with this you should be able to access your applications with
<- Main application
<- Accounts application
providing the sub-domain has been set up for accounts it should work.
If the sub-domain does not work access it with the folder