Re: Unable to execute c++ .exe file from php
| From: | Mike Mannakee | Date: | Sat, 09 Nov 2002 00:34:23 +0000 |
| Subject: | Re: Unable to execute c++ .exe file from php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123519@lists.php.net to get a copy of this message | ||
I see. Well, it isn't executing, then. It doesn't surprise me that the
output doesn't go to the browser, but not showing up in the file seals the
deal. Sorry I can't be of more help.
Mike
----- Original Message -----
From: "Ladan Pickering" <ladan_pickering@yahoo.com>
To: <php-general@lists.php.net>
Cc: <mike@basementideas.com>
Sent: Friday, November 08, 2002 3:28 PM
Subject: Re: [PHP] Unable to execute c++ .exe file from php
> Very good question Mike.
> In my hello.cc file, I have a cout to the stdout and
> I open a file and write a couple of lines to it. The
> reason I believe it is not running is that when
> the .php file is running from the cli, I see my
> "cout" and the file (test.txt) that I open is created
> and my lines are written to it. When I run the same
> .php file from within my browser, the cout is not
> displayed and the file (test.txt) is not created.
>
> I am new to Windows, do you see something that I am
> not doing correctly?
>
> Thanks
>
> My question is how do you know it's not running? If
> it really is a "hello
> world" application, where do you want the output to
> go? To the browser?
> That's pretty involved. Try making it write to a file
> and see if it
> contains any output after execution.
>
> Mike
>
>
>
> "Ernest E Vogelsinger" <ernest@vogelsinger.at> wrote
> in message
> news:5.1.1.6.2.20021108155320.03285f28@mail.vogelsinger.at...
> > At 15:30 08.11.2002, Ladan Pickering spoke out and
> said:
> > --------------------[snip]--------------------
> > >I am unable to execute my c++ program from within
> PHP when it runs as a
> > >cgi in Apache.
> > >I am able to run:
> > >
> > >$cmd="dir c:\abc"
> > >system ($cmd, $errCode);
> > >
> > >and see the content of the directory, but I don't
> seem to
> > >be able to run a simple hello.exe (c++) file.
> > >
> > >$cmd = "c:\abc\hello.exe";
> > >system ($cmd, $errCode);
> > --------------------[snip]--------------------
> >
> > I think you need to either escape the backslash
> (like c:\\abc\\hello.exe),
> > or simply use forward slashes (as c:/abc/hello.exe).
> >
> >
> > --
> > >O Ernest E. Vogelsinger
> > (\) ICQ #13394035
> > ^ http://www.vogelsinger.at/
> >
>
>
>
> --------------------------------------------------------------------------
------
>
>
>
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
>