1

Recently i setup a fresh install of Magento 1.9.2 upon configuring cron i get the following error when i try to execute

bash /path/to/my/magento/root/cron.sh

ERROR :cron.sh: line 26: $'\r': command not found

I also get the same result with:

php cron.php

I can't change the cron.sh to :

chmod -x cron.sh

because i am not part of sudo. My option is limited with cron.sh. I am using Webfaction hosting if this can be of any help.

Can anyone help me with this ? Thanks

Jeremy
  • 2,516
  • 8
  • 46
  • 80

1 Answers1

3

This is an encoding problem in the file's line endings, probably a result of the way you've deployed/installed the code.

Don't copy and paste file contents - upload the file as it ships with the fresh Magento installation using FTP or a git repository to deploy it.

See here and here (for example).

Community
  • 1
  • 1
scrowler
  • 24,273
  • 9
  • 60
  • 92
  • i did try to download a copy of same exact file from another server (running ubuntu on EC2) and upload it to this webfaction hosting, but i still get the same error. – Jeremy Aug 09 '16 at 03:01
  • 1
    thanks it works, i ended up forking it from the github as suggested. – Jeremy Aug 09 '16 at 03:04