Page 1 of 1

cmscli - first look

Posted: Wed Aug 30, 2017 11:45 am
by PinkElephant
Hi

Just giving the new cmscli v0.1 -- looks like a great addition, thanks.

The first run gave a Fatal as it doesn't support use of include files in config.php (to keep sensitive data [db, 'admin' location] in a non world-readable location).

Code: Select all

Could not find database connection key "dbms" in the config file
Perhaps not surprising as I'm not sure whether CMSMS core supports it (and I have a feeling I saw code that tests the file size, somewhere) but it's something I've been doing on all sites for a long time without apparent issue.

The only commands showing against a 2.2.2 site (run from its root) are 'about', 'cmsms-download' and 'cmsms-latestversion' which all run fine. The same applies after upgrading the site to 2.2.3.1.

Should I be expecting to see more at this point?

Re: cmscli - first look

Posted: Wed Aug 30, 2017 1:54 pm
by calguy1000
I have uploaded a v0.1.2 version that should solve that issue.

http://dev.cmsmadesimple.org/projects/cmscli

Re: cmscli - first look

Posted: Wed Aug 30, 2017 2:45 pm
by PinkElephant
Hi
calguy1000 wrote:v0.1.2
... and thanks.

I'm still seeing the issue because the config.php include takes the form;

Code: Select all

include($_SERVER['DOCUMENT_ROOT'] . '../private/site-config.inc');
When the path is hardcoded the problem disappears -- and I'm now seeing a full range of commands. :)

Re: cmscli - first look

Posted: Wed Aug 30, 2017 2:47 pm
by calguy1000
Revert your config.php to the standard.

There is no $_SERVER['DOCUMENT_ROOT'] in a CLI environment.