You are here: Re: 'echo "": No such file or directory" error using "exec" to pipe in PHP script « All PHP « IT news, forums, messages
Re: 'echo "": No such file or directory" error using "exec" to pipe in PHP script

Posted by comp.lang.tcl on 12/01/06 21:02

Uwe Klein wrote:
> comp.lang.tcl wrote:
>
> > This is the error I get:
> >
> > Status: 404 X-Powered-By: PHP/4.4.4 Content-type: text/html No input
> > file specified. child process exited abnormally while executing "exec
> > $valPHPPath -q << $php" (procedure "XML_GET_ALL_ELEMENT_ATTRS" line 37)
>
> this may be an error or just happen because the invokation of php outputs
> something to stderr.
> you may want to wrap the [exec ... ] into a catch statement like:
>
> if {[catch {exec $valPHPPath -q << $php"} retval]} {
> # talk about what the error was
> puts stderr "exec with error: $retval"
> } else {
> # do something sensible with a successfull return.
> }
>
>
> and see whats happening.
> catch is very usefull, but you may want to take some rye on the side ;-)
>
> uwe

I wish I could see what's happening, but I have no way of ever knowing
what's going on

if {[catch [exec $valPHPPath -q << $php] errMsg]} {
puts "!!error in exec: $errMsg!!"
} else {
puts "This is your list!"
return "This is your list: $errMsg"
}

produces:

Status: 404 X-Powered-By: PHP/4.4.4 Content-type: text/html No input
file specified. child process exited abnormally while executing "exec
$valPHPPath -q << $php" (procedure "XML_GET_ALL_ELEMENT_ATTRS" line 37)

It is not even performing "puts" in either case, so I am not apparently
even catching the error, or I have no idea what's going on!

Phil

 

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

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