1. liedtke,k
  2. RO CSVI
  3. Monday, 18 January 2016
  4.  Subscribe via email
Hi Roland,


I try to set a cron-job.
This is my string:

/bin/php ./administrator/components/com_csvi/helper/cron.php --key=’mysecretword’ --template_name=’Import_Artikel’

This is the protocol:

Status: 404 Not Found
X-Powered-By: PHP/5.3.29
Content-type: text/html

No input file specified.

In the template under source is the importfile defined. The manuel Import works fine.

What is wrong ?

Thanks for help.
Accepted Answer Pending Moderation
Hello Klaus,

The PHP version is too low, you need to have at least PHP 5.4. The message "No input file specified" comes from PHP that it can't find the cron.php file. So you will need to check the correct location of the file.
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. # 1
Accepted Answer Pending Moderation
Hi Roland,

no it's 5.6
Same result:
Status: 404 Not Found
X-Powered-By: PHP/5.6.17
Content-type: text/html

No input file specified.
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
Can you try setting the full path of the file in the cron command? Please follow the instructions under "Build the cron command in Setting up Cron job documentation.
Kind regards,

Tharuna

=========================
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. # 3
Accepted Answer Pending Moderation
Klaus,

no it's 5.6
In your first post it was 5.3.29 :)

As I mentioned before, the error is from PHP saying it can't find the cron.php file.
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. # 4
Accepted Answer Pending Moderation
Sorry wrong posting.
Now i tried the full string:

/bin/php -f ./administrator/components/com_csvi/helper/cron.php --key=mysecretword --template_name=Import_Artikel --file=./transfer/ftpa2p.csv

and thats the result:

Usage: php56 [-q] [-h] [-s] [-v] [-i] [-f <file>]
php56 <file> [args...]
-a Run interactively
-b <address:port>|<port> Bind Path for external FASTCGI Server mode
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
-T <count> Measure execution time of script repeated <count> times.
Error in argument 3, char 2: no argument for option -
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello Klaus,

Error in argument 3, char 2: no argument for option -
This error has been discussed before in this thread.

This is an issue with the server setup as it doesn't properly handle the passing of the double dashes. You can find quite a few such posts on Google if you look for the error you get.

One suggestion I found was to use php5-cli or the other option you could try is what is posted in this Joomla! forum topic.
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. # 6
Accepted Answer Pending Moderation
Just changed the string. Folder was missing.
Now this message:
X-Powered-By: PHP/5.6.17
Set-Cookie: 26f232c7020f95436630efe511962dbb=0k0sn5rlb0a31bdg8mlavrg7v5; path=/; HttpOnly
Content-type: text/html

no error, but import was not running.
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
There is no error but it nothing is happening. At a minimum I would expect to see this output:
Use --help to see the help information
Processing started...


It looks like the script is not being triggered at all. You can try to run it with the option --help to see if you get any output.
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. # 8
Accepted Answer Pending Moderation
Hi Roland,

with /h:

Usage: php56 [-q] [-h] [-s] [-v] [-i] [-f <file>]
php56 <file> [args...]
-a Run interactively
-b <address:port>|<port> Bind Path for external FASTCGI Server mode
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
-T <count> Measure execution time of script repeated <count> times.
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Klaus,

The /h is something else than --help. The /h is for PHP and the --help is for CSVI. So your command should look something like
/bin/php -f ./administrator/components/com_csvi/helper/cron.php --help


One thing I wonder if the /bin/php is correct and shouldn't be /usr/local/bin/php That seems to be the most used PHP location.
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. # 10
Accepted Answer Pending Moderation
Hi Roland,

i tried this string:
/usr/local/bin/php ./NEU/administrator/components/com_csvi/helper/cron.php --help --key='mysecretword' --template_name='Import_Artikel'

Result:
X-Powered-By: PHP/5.6.17
Set-Cookie: 26f232c7020f95436630efe511962dbb=ruqneg5ssmbkphamatifn2asq3; path=/; HttpOnly
Content-type: text/html
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello Klaus,

The key and template name are not needed with the help key. However it makes no difference the script doesn't get started because the help text is not shown.

Try this:
/usr/local/bin/php ./NEU/administrator/components/com_csvi/helper/cron.php -- --help
see if that outputs the help text.
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. # 12
Accepted Answer Pending Moderation
same:
X-Powered-By: PHP/5.6.17
Set-Cookie: 26f232c7020f95436630efe511962dbb=fuomch1copjki2q8p43p2n9ks7; path=/; HttpOnly
Content-type: text/html
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
I am out of ideas as to what is wrong with your server setup. It may be good to ask your hosting provider as to how to use command line arguments on their servers.
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. # 14
Accepted Answer Pending Moderation
Hi Roland,
So i asked Hoster.
They said: Make sure that the script is corect. The message:
Set-Cookie: 26f232c7020f95436630efe511962dbb=uqcpisht2i3f39krapejs5iij1; path=/; HttpOnly
is the problem. This is only in http allowed. Your chrone.php must be wrong.
Regards
Klaus
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello Klaus,

So I have been able to reproduce this issue. The issue has to do with the used PHP instance in the terminal.

The working version:
/usr/local/bin/php -v

PHP 5.3.29 (cli) (built: Jun 1 2015 10:21:13)


The non-working version:
php -v

PHP 5.3.29 (cgi-fcgi) (built: Jun 1 2015 10:21:12)


Notice the difference between cli and cgi-fcgi. You must be using the cli version, the cgi-fcgi version will return the message.

This has nothing to do with the CSVI script but has everything to do with the PHP used.
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. # 16
Accepted Answer Pending Moderation
Hi Roland,
Thats the answer when i trie this:/usr/local/bin/php -v
PHP 5.6.17 (cgi-fcgi) (built: Jan 15 2016 12:39:55) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

Regards
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello Klaus,

So you can see that is the wrong PHP executable. You need to have the one that says cli (command line interface).
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. # 18
Accepted Answer Pending Moderation
How i can change this?
  1. more than a month ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
You can't change the executable, that is how the server is setup. The hosting provider should be able to tell you where the cli version of PHP is located, so you can use that.
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. # 20
  • Page :
  • 1
  • 2


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