Support

Akeeba Backup for Joomla!

#26606 crontab PHP Warning: Unexpected character in input:

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Friday, 25 November 2016 04:04 CST

grafixnetz
EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:
My host has given me the following for CRON. It works for a MOODLE backup. The same script is not working with AKEEBA.

php5 /usr/bin/php56/php5 -nc /etc/php56/cgi/php.ini -f [path to akeeba]

I get the following error

PHP Warning: Unexpected character in input: ' ' (ASCII=15) state=0 in /usr/bin/php56/php5 on line 6340 PHP Warning: Unexpected character in input: ' ' (ASCII=4) state=0 in /usr/bin/php56/php5 on line 6340 PHP Warning: Unexpected character in input: ' in /usr/bin/php56/php5 on line 6340 PHP Warning: Unexpected character in input: ' in /usr/bin/php56/php5 on line 6340 PHP Parse error: syntax error, unexpected '<' in /usr/bin/php56/php5 on line 6340

nicholas
Akeeba Staff
Manager
The beginning of your CRON command line is obviously wrong: php5 /usr/bin/php56/php5

It should either be
php5
or
/usr/bin/php56/php

It cannot possibly be both. What you've done is that you are telling the php5 executable to use the (binary) file /usr/bin/php56/php as input. Since /usr/bin/php56/php is a binary file, NOT a .php source code file, PHP is complaining that it can't understand what you're trying to do. I suppose that you can remove the leading php5 from the command line to fix it.

If that doesn't work please contact your host. They are the only people who know exactly how your server is set up and can help you with setting up CRON jobs.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

grafixnetz
Removing 'php5' and just using
/usr/bin/php56/php5 -nc /etc/php56/cgi/php.ini -f

results in
Usage: php5 [options] [-f] <file> [--] [args...]
php5 [options] -r <code> [--] [args...]
php5 [options] [-B &lt;begin_code&gt;] -R <code> [-E &lt;end_code&gt;] [--] [args...]
php5 [options] [-B &lt;begin_code&gt;] -F <file> [-E &lt;end_code&gt;] [--] [args...]
php5 [options] -S <addr>:<port> [-t docroot]
php5 [options] -- [args...]
php5 [options] -a
-a Run interactively
-c <path>|<file> Look for php.ini file in this directory
...and more

grafixnetz
TIP: I am using a mycronjob.txt to do this. It's MUCH easier to be able to edit a text file and upload than try to type such long lines without mistakes.

1. create textfile with cron command(s) mycronjob.txt
IMPORTANT: Hit RETURN after last line
2. Upload to root of website
3. list cronjobs with: crontab -l
4. in SSH, type: crontab -r to kill cronjobs
5. Type: crontab mycronjob.txt
Done: New parameters loaded.

list new/changed cronjobs with: crontab -l

When all is working you can delete mycronjob.txt

nicholas
Akeeba Staff
Manager
As i said above "if that doesn't work please contact your host. They are the only people who know exactly how your server is set up and can help you with setting up CRON jobs".

We cannot provide assistance with setting up a CRON job to execute since all the information required to do so are only known by your host. We are not your host. As a result we can't help with that. If you need help with what happens when our script is being executed, i.e. after the CRON job is properly set up, or with any options you need to pass to our script to alter the way it functions while it's running we'll be happy to assist you. This is exactly what we're here for: provide support for our software.

I'm afraid I have to close this ticket since we cannot provide support for your server. Please do contact the company hosting your site for assistance with this.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!