You are here: 2>&1 arg in exec(perl.... + "sh: /perl not found error" TIA for help « PHP Programming Language « IT news, forums, messages
2>&1 arg in exec(perl.... + "sh: /perl not found error" TIA for help

Posted by Marty Meyers on 12/07/05 03:14

I have the following line in a php file:

$msg= exec("perl $scriptPath/insert.pl $d $u $t 2>&1", $returnVal);

Can someone explain the "2>&1" argument?


Second problem, this same line of code when run from the unix command line
returns the following error:

sh: /perl: No such file or directory

I've verified that perl is located in /usr/bin/
/usr/bin is in the environment variable "PATH"
all the directories from php program to the root and back down to usr/bin
have 755 permissions.
if I run the program (insert.pl) from the command line it works
I've tried putting the following in both the php and perl programs:
#!/usr/bin/perl
#!/usr/bin

Any suggestions would be appreciated.

Thanks
Marty

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация