Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Did anyone notice PHP CLI xcart script

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-03-2017, 07:21 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,095
 

Default Did anyone notice PHP CLI xcart script

As it says in the title - did anyone notice "xcart" script in root of their XC installation?

I wonder if this again is one of this scripts we are not supposed to see and it was added to the stock package by mistake (just like the Modules.php one)

Modules.php was not supposed to be in the installation pack but it was there for many versions and taken out in 5.3.3.4

"xcart" one was never in the package but it is in 5.3.3.4

It works only from command line and it seems to perform internal tasks as well as some of what used to be in the SDK.

Seems pretty easy / straightforward to use

Run it from command line in the XC installation directory as
Code:
php xcart
to see list of options, commands, etc.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #2  
Old 11-03-2017, 08:07 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,013
 

Default Re: Did anyone notice PHP CLI xcart script

Quote:
Originally Posted by cflsystems
As it says in the title - did anyone notice "xcart" script in root of their XC installation?
Yes... the overall attention to fine detail / QA checks / 100% verification pre-upgrade release processes, are all lagging behind the actual XC5 releases, on quite a few different things now. We've said it before a few times, but sorting this area properly is far MORE important than yet more, repetitive marketing waffle and hype for things that are not quite ready. The Modules.php one (and others) we posted about on here previously (and raised a linked bug ticket on). This is THAT script:
PHP Code:
#!/usr/bin/env php
<?php
// vim: set ts=4 sw=4 sts=4 et:

/**
 * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
 * See https://www.x-cart.com/license-agreement.html for license details.
 */

use XLite\Console\Application;

if (
'cli' != PHP_SAPI) {
    exit (
1);
}

define('LC_INCLUDE_ADDITIONAL'true);
require_once (
dirname(__FILE__) . DIRECTORY_SEPARATOR 'top.inc.php');

$header = <<<HEAD
██╗  ██╗      ██████╗ █████╗ ██████╗ ████████╗
╚██╗██╔╝     ██╔════╝██╔══██╗██╔══██╗╚══██╔══╝
 ╚███╔╝█████╗██║     ███████║██████╔╝   ██║   
 ██╔██╗╚════╝██║     ██╔══██║██╔══██╗   ██║   
██╔╝ ██╗     ╚██████╗██║  ██║██║  ██║   ██║   
╚═╝  ╚═╝      ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝   

X-Cart
HEAD;

$application = new Application($header, \XLite::XC_VERSION);
$application->run();

\
XLite\Logger::getInstance()->executePostponedLogs();

echo 
PHP_EOL;

exit (
defined('CLI_RESULT_CODE') ? CLI_RESULT_CODE 0);
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 20.04.4 LTS (HWE 5.13.0.51.58 Kernel)) / Plesk Obsidian
Nginx 1.20.2.1 / Apache 2.4.41 (Ubuntu Backported) / MariaDB 10.5.16 / PHP 7.4.30
Reply With Quote
  #3  
Old 11-09-2017, 12:11 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Did anyone notice PHP CLI xcart script

http://devs.x-cart.com/en/misc/command_line_tool.html

The only thing is that in earlier versions of X-Cart the script is named "xcart", not "xc5"
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
Triple A Racing (11-09-2017)
  #4  
Old 11-09-2017, 12:56 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,013
 

Default Re: Did anyone notice PHP CLI xcart script

Quote:
Originally Posted by qualiteam
...in earlier versions of X-Cart the script is named "xcart", not "xc5"
It's not in the changelog....Another "non-documented until well after the event - if at all..." style change? This style is a current XC5 issue
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 20.04.4 LTS (HWE 5.13.0.51.58 Kernel)) / Plesk Obsidian
Nginx 1.20.2.1 / Apache 2.4.41 (Ubuntu Backported) / MariaDB 10.5.16 / PHP 7.4.30
Reply With Quote
  #5  
Old 11-09-2017, 11:05 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Did anyone notice PHP CLI xcart script

I believe one of release announcements mentioned the tool.

Anyway, this tool is still being tested, plus it is aimed at developers, not end users. I guess this might be the reason it wasn't included into changelogs.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
Triple A Racing (11-09-2017)
  #6  
Old 11-09-2017, 05:49 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,013
 

Default Re: Did anyone notice PHP CLI xcart script

Quote:
Originally Posted by qualiteam
...this tool is still being tested, plus it is aimed at developers, not end users. I guess this might be the reason it wasn't included into changelogs.
This is useful to know. Thank you. The irony is the logic behind "..release tools aimed at developers into normal store owners upgrades..." Why? Any tools like this should surely be provided in a separate process / separate release? A simple, very well proven, working example of this logic for comparison? Apple Software

In addition and FWIW, on the subject of releasing developer tools to all store owners that are still "not finished" This was covered in another thread about the inconsistent workings / failings of the "Consistency Check" tool. This was in the changelog (!) but again, had no documentation. Consistency? Not XC5's finest hour...

We use command line (and it's vast range of tools) via SSH every day on our own server, but this access and usage are also in a different release / access segment than than normal end users. Current confidence levels of XC5 upgrades and their immediate usability, verified effectiveness, bug free status etc are still low, so whilst positively welcoming them, we ourselves would avoid using any tools like this on XC5, until XC actually give this area the attention it urgently needs and deserves.
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 20.04.4 LTS (HWE 5.13.0.51.58 Kernel)) / Plesk Obsidian
Nginx 1.20.2.1 / Apache 2.4.41 (Ubuntu Backported) / MariaDB 10.5.16 / PHP 7.4.30
Reply With Quote
  #7  
Old 11-10-2017, 12:29 AM
 
xim xim is offline
 

X-Cart team
  
Join Date: Nov 2004
Posts: 677
 

Default Re: Did anyone notice PHP CLI xcart script

this tool is fully tested and ready to use for developers. We have plans to improve it in the future, so it is not the final version. This tool replaces the legacy SDK

The full documentation is presented in kb here - http://devs.x-cart.com/misc/command_line_tool.html and in the utility help as well:
PHP Code:
php xc5 help 

About the security. It could be used only if you have access to the server. So, if a hacker has an access to the server, he doesn't need this utility to harm your store. However, we will implement the ability deny updating this file during the upgrade procedure. As a result, you will be able to remove this file forever.

We decided to include into the default package since it is more flexible for the developers, webmasters and our support team to use this toll instead downloading it separately.
__________________
Sincerely yours, Max Vydrin
Reply With Quote

The following user thanks xim for this useful post:
Triple A Racing (11-10-2017)
  #8  
Old 11-10-2017, 07:50 AM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,013
 

Default Re: Did anyone notice PHP CLI xcart script

Quote:
Originally Posted by xim
....this tool is fully tested and ready to use for developers
That's fine, but the previous XC post "...this tool is still being tested" was different. You can see the inconsistency... Possibly more speed / less haste is needed.
Quote:
Originally Posted by xim
The full documentation is presented in kb here - http://devs.x-cart.com/misc/command_line_tool.html
It's a strange approach to have non-technical store owners (and there are many) being forced to wade through developers documents, simply to find our what they have been provided with, as part of a new upgrade... especially when they will never normally use these additions anyway. That's not normally the case elsewhere?
Quote:
Originally Posted by xim
About the security. It could be used only if you have access to the server. So, if a hacker has an access to the server, he doesn't need this utility to harm your store. However, we will implement the ability deny updating this file during the upgrade procedure. As a result, you will be able to remove this file forever
We didn't mention security. FWIW using a domain-name/xcart url will download the file by default... So if hackers were looking for clues, they're right there, but we do appreciate they do then need command line access to go further, so yours was good point, well made.
Quote:
Originally Posted by xim
We decided to include into the default package since it is more flexible for the developers, webmasters and our support team to use this toll instead downloading it separately.
This is the bit that's most irksome for us. Common sense and industry standards are being ignored here. XC5 should NOT be everything for everyone all rammed into one bloated package. Surely a normal set of different packages i.e. Free / Business / Multi Vendor / Ultimate / and then a separate specific Developer package which would add-on to Business / Multi Vendor / Ultimate packages is better, clearer, more accurate and more preferable for all? The size of our business packages has grown and grown and grown since we started with XC5, all it seems, for the convenience of XC, not us and/or any other 'normal package' paying customers? We do NOT want unfinished. non verified, still being tested developer tools being forced upon us by default (which has been the case several times now) unless of course we ask for them (^^^ see above) and... we certainly do NOT want all the ancillary files / processes and other clap trap of a Multi-Vendor package being forced upon us by default either, unless we have purchased that package by choice. Apologies if that sound harsh, but we need to say things exactly as they are, as opposed to being 'worried' about any fallout. We've stated several times that we are big XC5 supporters (we still are and still happy that we switched from XC4) but it's currently feeling (for us anyway) quite disjointed, inconsistent, confusing, unclear and just plain random sometimes to be fair. In fairness, we'll re-visit that line after upgrading to XC 5.3.3.5 then XC 5.3.4.*
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 20.04.4 LTS (HWE 5.13.0.51.58 Kernel)) / Plesk Obsidian
Nginx 1.20.2.1 / Apache 2.4.41 (Ubuntu Backported) / MariaDB 10.5.16 / PHP 7.4.30
Reply With Quote
  #9  
Old 11-10-2017, 08:39 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Did anyone notice PHP CLI xcart script

Quote:
Originally Posted by Triple A Racing
That's fine, but the previous XC post "...this tool is still being tested" was different. You can see the inconsistency...

I haven't received a reply from the XC5 dev team by that time, so it was my guess. My bad
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following user thanks qualiteam for this useful post:
Triple A Racing (11-10-2017)
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:11 AM.

   

 
X-Cart forums © 2001-2020