Reply to Re: Using exec function to get a .exe return status gives CGI Error

Your name:

Reply:


Posted by Jerry Stuckle on 08/23/07 16:58

jmuria@ole.com wrote:
> Hi.
>
> I'm trying to make a web page to work. It worked before so it has to
> be something related with the configuration.
> My problem is a call to a compiled executable (made for me) that
> returns 1 or 0. It does not print any text to the standard ouput so
> the error is strange:
> CGI Error: The script can .. because of the HTTP headers (I have it in
> spanish so the message is not the exact one).
>
> As supposed, the HTTP headers are needed only if the executable prints
> out a text to the browser but it's not the case. And (I repeat) It
> worked as it before. The machine had to be formatted and the guy in
> charge of that is not with me anymore.
>
> Any help will be apreciated.
>

What language is it written in? If it's something like C or C++, for
instance the libraries open stdout/stderr by default. It might be
causing your problem - but I doubt it.

More likely is that you're getting an error during the execution and the
system is trying to write something to stderr (or stdout). For
instance, you might not have the correct permissions to execute the file.

Try this:

1. Log onto the command line interface (ssh/telnet)
2. su to the webserver user
3. cd to the directory you're PHP script is in
4. Enter the command just as it is in the exec() call.

What happens?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original 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

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