Reply to Re: Problems with exec

Your name:

Reply:


Posted by JahMic on 11/27/07 11:13

On Nov 27, 7:14 pm, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spamyourself.com> wrote:
> JahMic wrote:
> > I'm having a problem with exec on my hosting server. Unfortunately,
> > the hosting support seems to be anything but helpful.
>
> > The following works fine on my localhost:
>
> > <?php
> > $MaskData = "mask.exe -e \"TestString\"";
>
> > $Result = exec($MaskData, $Output, $ReturnValue);
> > echo("Result: ".$Result);
> > echo("ReturnValue: ".$ReturnValue."<br/>");
>
> > foreach($Output as $outputline)
> > {
> > echo("outputline: $outputline<br>");
> > }
> > ?>
>
> > But on my hosting server, I've installed (I believe) the properly
> > compiled version for that os, and it always returns 127. I don't have
> > shell access, so I'm a bit of loss on how to proceed. Any
> > information on this return code or how to work through this, would be
> > greatly appreciated.
>
> > Thanks, J
>
> Hi J,
>
> If you cannot execute in a shell, do a phpinfo(), and find the following
> settings:
>
> safe_mode = On or Off
> and
> safe_mode_exec_dir =
>
> Is safe_mode maybe On, and is your mask.exe not listed in
> safe_mode_exec_dir?
>
> If so, you know why you cannot execute mask.exe.
>
> Read more here:http://nl3.php.net/manual/en/function.phpinfo.php
>
> Bottomline: Talk with your hosting provider. If they do not cooperate,
> switch hosting provider or do not use mask.exe.
>
> Regards,
> Erwin Moller

Hi Erwin,

Thanks for the quick reply. safe mode is actually off. This
application is in the same directory as the scripts. If I change
$MaskData = "mask.exe -e \"TestString\""; to $MaskData = "./mask.exe -
e \"TestString\""; (the addition of ./) the value of $ReturnValue is 1
and no values for $Result and $output. (Output should be a long
string).

A hosting provider switch is likely, but this is an immediate issue
that I need to get taken care. Once again, any help is much
appreciated.

Thanks, J

[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

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