1. betterlead
  2. RO CSVI
  3. Wednesday, 28 October 2015
  4.  Subscribe via email
Would the following command be correct to run an export?
/usr/local/lib/php /home/xxxxxxxxxx/public_html/administrator/components/com_csvi/helper/cron.php --key="#########" --template_id="5"

I can't see the destination file getting updated. I believe that the destination file should be the one in my template settings?
Accepted Answer Pending Moderation
Tried this, in the file '/public_html/libraries/joomla/input/cli.php'
$arg = $argv[$i];
// Sn 15-11-06: handle input from cron command line which does not accept the -- at start of argument
$txt = print_r($arg,true);
echo $txt;
if (substr($arg, 0, 4) === 'csvi')
{
$eqPos = strpos($arg, '=');
$key = substr($arg, 4, $eqPos - 4);
$value = substr($arg, $eqPos + 1);
$out[$key] = $value;
$txt = print_r($out,true);
$mf2 = fopen("/home/livingstudio/public_html/administrator/components/com_csvi/helper/testfile2.txt", "w");
fwrite($mf2, $txt);
fclose($mf2);
}
else

...but it does not produce anything. Are there more places where the cli.php resides?
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
Hello,

I will try to add this, although it is a core file I'll be hacking.
Once it is working, you could contribute it to the project. So it won't be a core hack anymore :)

Are there more places where the cli.php resides?
There is only one CLI input file. You may need to trace where it goes through, if it doesn't show anything.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 22
Accepted Answer Pending Moderation
Yes. I need some way to print the content of variables either to a file or back to the command line. I just noticed that when you run '# /usr/bin/php -f /home/domain/public_html/administrator/components/com_csvi/helper/cron.php --help' the help text comes from cron itself, and not from csvi's cron.php. I did the check by adding some text in the if ($help) clause in the function doExecute() in cron.php, this text did not show up.
if ($help)
{
$this->out(JText::_('COM_CSVI_CRON_HELP'));
$this->out('=========Kommer från cron.php=========');
$this->out();
$this->out(JText::_('COM_CSVI_USE_CRON'));
$this->out();
}
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
If the text from the cron.php doesn't show up, it means that the double dash is not accepted, something you already found out. According to the PHP manual it should be usable. Something must have been configured on the server not to allow it I think.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 24
  • Page :
  • 1
  • 2


There are no replies made for this post yet.
Be one of the first to reply to this post!