View previous topic :: View next topic |
Author |
Message |
tld Veteran
Joined: 09 Dec 2003 Posts: 1811
|
Posted: Thu Sep 02, 2010 3:09 pm Post subject: php cli shebang line echos but only on one machine [SOLVED] |
|
|
This defies explanation. I have one machine where use of the shebang line in php scripts (to allow direct execution of the script), while fully functinal, displays the shebang line to the screen. On two other machines with the exact same version of php, the same cli php.ini, and the same USE flags it doesn't.
Here's a test script:
Code: | cat ptest
#!/usr/bin/php
<?php
print "OK...\n";
?>
|
On one machine:
But on the other:
Code: | ./ptest
#!/usr/bin/php
OK...
|
As you can see, while the shebang line is obviously working and finding the parser program, it echos.
I'm dumbfounded. What on earth could cause that?
Tom
Last edited by tld on Sat Sep 04, 2010 12:29 pm; edited 1 time in total |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Sat Sep 04, 2010 7:54 am Post subject: |
|
|
Did you create the ptext script on each host, or did you just copy it from one to an other?
what's the results of file ptest on each host? _________________ The End of the Internet! |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1811
|
Posted: Sat Sep 04, 2010 11:57 am Post subject: |
|
|
That was my first thought. I rsync'ed it from one machine to the others, and the scripts are identical. All of them show exactly:
Code: | file ptest
ptest: a /usr/bin/php script text executable
|
I'm totally stumped.
Tom |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1811
|
Posted: Sat Sep 04, 2010 12:30 pm Post subject: |
|
|
Found it: There was in fact one difference between the servers where it worked correctly and the ones where it didn't. On the ones that were displaying the shebang line I had the NuSphere PhpExpress extension being loaded...this was apparently altering that behavior.
Tom |
|
Back to top |
|
|
|