Re: Handling an issue for a period

David Hicks <hickseydr-sFbbPxZDHXw0n/[email protected]>
Newsgroups gmane.comp.bug-tracking.mantis.general
Message-ID <1284515788.8557.8.camel@hydrus>
On Tue, 2010-09-14 at 22:45 -0300, Fabio Manzano wrote:
> My job should call something like "$ php my_script.php" from command
> line, right? And my_script.php can call Mantis functions.

This is partially correct. It depends on your distribution of PHP. For
instance, Gentoo has a number of different PHP binaries (php-fpm,
php-cgi and php-cli) which are all slightly different.

The FPM/CGI versions of PHP are designed to work within the context of a
web server where HTTP environment variables are set. The CLI version is
obviously designed to be run from the command line (and hence the HTTP
related functions, $_GET, $_POST, etc won't work).

I'm not sure how far you will get with loading the MantisBT API from the
command line. It may require us to make some changes to skip over
HTTP-specific stuff when we detect that the core is being loaded in a
CLI environment.

You could of course just write a completely separate script in the
programming/scripting language of your choice. At the end of the day
you're only going to make a few database queries so it won't be too
complex.

Regards,

David


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.