I've recently moved some working code from a 12.04 server to a 12.1 server. Everything working well except....

Some of my scripts include #!/usr/bin/php -q at the top so I can run them from the command line without explicitly invoking php/.

Some of these work find, some others do not work at all - I get the error message:

Exception: Zend Extension ./makeTracks.php does not exist

There is a correct link from /usr/bin/php to etc/alternatives/php and then on to /usr/bin/php5

I don't know if something changed between 12.04 and 12.10 that is causing this or what else might cause it. I'm stumped.

Any thoughts or suggestions appreciated

1 Answer 1


It turned out that this problem was caused by php files that has been uploaded with Windows line endings. Once I corrected the line endings using dos2unix the problem went away.

  • 1
    This answer needs 100 more up votes. This is incredibly obscure and was hard for me to find, but a perfect answer. Oct 16, 2014 at 22:58
  • Debian Jessie and this still works! +1 Jun 28, 2016 at 9:37
  • Thanks Thanks Thanks a million times ... I've been working on this for more than 24 hours +1000000
    – Nildarar
    Jun 19, 2018 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.