Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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.

share|improve this answer
1  
This answer needs 100 more up votes. This is incredibly obscure and was hard for me to find, but a perfect answer. – Kerry Jones Oct 16 '14 at 22:58
    
Debian Jessie and this still works! +1 – Rui F Ribeiro Jun 28 at 9:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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