php-windows Digest 20 May 2005 08:02:09 -0000 Issue 2675

Topics (messages 26033 through 26039):

Re: Help with windows 2003 iis6, exec() and permissions
        26033 by: Jean-Philippe Palha
        26034 by: Louis Solomon \[SteelBytes\]

Windows System Tray
        26035 by: Rudi Starcevic
        26037 by: Louis Solomon \[SteelBytes\]
        26038 by: Mike

Database Problem
        26036 by: John
        26039 by: Huebel, Jens

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

Put a copy of cmd.exe on your PHP dir and give it the good permissions...

Jean-Philippe PALHA ([EMAIL PROTECTED])
IMA'DIFF - 13, rue Damesme - 75013 Paris  FRANCE
Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81
Web : http://www.imadiff.com
------------------------------------------------------------------
------------------------------------------------------------------
"Adam Niedzwiedzki" <[EMAIL PROTECTED]> sur jeudi 19 mai 2005 � 08:52
+0100:
>Hi Louis,
>
>So is that just the case of adding  IUSER_XXX to cmd.exe?
>What permissions do I give IUSER on cmd.exe?
>
>Isn't that a big risk? Is there a way to exploit that? (apart from
>someone 
>uploading php code etc), via a URL or something?
>
>Just wanting the "correct/safest" way to do this.
>
>Cheers
>Adam
>
>
>"Louis Solomon" <[EMAIL PROTECTED]> wrote in message 
>news:[EMAIL PROTECTED]
>>> What is the correct way to setup php/iis to allow php access to run 
>>> exec() (ping.exe,cat.exe (from gnu utilities for win32), and any other 
>>> command shell stuff.) etc.
>>
>> access to %windir%\system32\cmd.exe is required.  this is denied in a 
>> default IIS6 installation.
>>
>> -- 
>> Louis Solomon
>> www.SteelBytes.com
>>
>> "Adam Niedzwiedzki" <[EMAIL PROTECTED]> wrote in message 
>> news:[EMAIL PROTECTED]
>>> Hi all,
>>>
>>> There is so much info on google/pnp.net etc on this but all of them
>seem 
>>> to work some of the time and the rest of them seem to work the rest of 
>>> the time;).
>>>
>>> I just can't seem to find what is the most secure and
>correct/guaranteed 
>>> way of setting this up.
>>>
>>> A windows 2003 server, running IIS6, and PHP 4.3.11, soon to move to
>php 
>>> 5.0.4.
>>> What is the correct way to setup php/iis to allow php access to run 
>>> exec() (ping.exe,cat.exe (from gnu utilities for win32), and any other 
>>> command shell stuff.) etc.
>>> Also what is the correct way to setup folder permissions on Windows
>2003 
>>> to allow php to write a file. Is it possible to set permissions on the 
>>> folder and not the file (in case it has the file is deleted and
>uploaded 
>>> again etc).
>>>
>>> I've googled and found 1000's, 10's of 1000's of options but after 
>>> working through the first half dozen and not having any luck (or most
>of 
>>> the saying that you open your system up to a HUGE security hole if you 
>>> give IUSER_XXX write access to cmd.exe, I'm just after the 
>>> "correct"/recommended" way to do the above.
>>>
>>> Cheers
>>> Adam
>>> 
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
> So is that just the case of adding  IUSER_XXX to cmd.exe?
> What permissions do I give IUSER on cmd.exe?

remove the deny that is probably alreaDy there, and add iusr_server with 
read&execute.

> Isn't that a big risk? Is there a way to exploit that? (apart from someone 
> uploading php code etc), via a URL or something?
>
> Just wanting the "correct/safest" way to do this.

hmm ... last time I checked the source for PHP - all methods of calling 
external progs (system(),  exec(), passthru()) all used cmd.exe to execute 
your command, even if your command was a command line .exe.  you could maybe 
check the newer proc_open() function - I'm not sure with that one.

-- 
Louis Solomon
www.SteelBytes.com

--- End Message ---
--- Begin Message ---
Hi,

Can you tell me what I need to know so I can build an IE plug in thingy like this:

http://www.phplivesupport.com/winapp.php

My experience so far is mostly PHP on Unix so am a bit of a noob when it
comes to Microsoft programing.

I'm very keen though and would very much appreciate a point in the right direction.

Many thanks.
Regards,
Rudi.

--- End Message ---
--- Begin Message ---
best place to start - Visual Studio 2003.  read the 'platform sdk' docs.  to 
host IE in an app (as that appears to be doing from the screen shot), you 
use COM to host the IWebBrowser2 control.

-- 
Louis Solomon
www.SteelBytes.com

"Rudi Starcevic" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi,
>
> Can you tell me what I need to know so I can build an IE plug in thingy 
> like this:
>
> http://www.phplivesupport.com/winapp.php
>
> My experience so far is mostly PHP on Unix so am a bit of a noob when it
> comes to Microsoft programing.
>
> I'm very keen though and would very much appreciate a point in the right 
> direction.
>
> Many thanks.
> Regards,
> Rudi. 

--- End Message ---
--- Begin Message ---
> Can you tell me what I need to know so I can build an IE plug 
> in thingy like this:
> 
> http://www.phplivesupport.com/winapp.php
> 
> My experience so far is mostly PHP on Unix so am a bit of a 
> noob when it comes to Microsoft programing.
> 
> I'm very keen though and would very much appreciate a point 
> in the right direction.
> 

There's no way that this is written in PHP. This just isn't what PHP does.
And even if you were able to get PHP to work in this manner, the app would
likely be inefficient and slow. There's countless other languages better
suited to win32 programming than PHP.

When you look at the requirements, it lists .Net - which is a good
indication to what it's written in.

Unfortunately, the direction you'd be headed in is away from PHP.

-M

--- End Message ---
--- Begin Message ---
I have code that querys a mysql server and then presents the result in a 
table.

The code works fine until I put it in a for loop to get one row at a time. 
The problem is that I dont get the required result or any error message.

If I reduce the number of iterations or decrease the amount of data 
requested per iteration then it works. But otherwise nothing.

Is there some maximum number of characters or something similar. It is only 
a small select query that returns a char and about 15 ints. It works with 2 
iterations all the time. Works with 3 very, very rarely and works with four 
or more never.

Sample lines below.

for($i = 0; $i < 3; ++$i)
{
    ...
    ...
    ...
    $result = mysql_query ("SELECT Name, EventTimes1Score,EventTimes2Score, 
EventTimes3Score, EventTimes4Score, EventTimes5Score,EventAdd1Score, 
EventAdd2Score, EventAdd3Score, EventAdd4Score, EventAdd5Score, 
EventTake1Score, EventTake2Score, EventTake3Score, EventTake4Score, 
EventTake5Score from leaguetest LIMIT $i,1", $connection);
...
....
}

--- End Message ---
--- Begin Message ---
I would admit to query your db only once.

Such as:

...Echo table header here...
$result = mysql_query ("SELECT Name, EventTimes1Score,EventTimes2Score, 
EventTimes3Score, EventTimes4Score, EventTimes5Score,EventAdd1Score, 
EventAdd2Score, EventAdd3Score, EventAdd4Score, EventAdd5Score, 
EventTake1Score, EventTake2Score, EventTake3Score, EventTake4Score, 
EventTake5Score from leaguetest", $connection);
// now you got a resultset with all the entries. Now you need to read it
row-wise 
While ($result) {
        $row=Mysql_fetch_row($result);
        ... echo table row here... access to the data via $row['Name'] and
so on...
}
...echo table footer here...



-----Urspr�ngliche Nachricht-----
Von: John [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 18. Mai 2005 22:52
An: [email protected]
Betreff: [SPAMVERDACHT] - [PHP-WIN] Database Problem - Bayesian Filter
detected spam

I have code that querys a mysql server and then presents the result in a 
table.

The code works fine until I put it in a for loop to get one row at a time. 
The problem is that I dont get the required result or any error message.

If I reduce the number of iterations or decrease the amount of data 
requested per iteration then it works. But otherwise nothing.

Is there some maximum number of characters or something similar. It is only 
a small select query that returns a char and about 15 ints. It works with 2 
iterations all the time. Works with 3 very, very rarely and works with four 
or more never.

Sample lines below.

for($i = 0; $i < 3; ++$i)
{
    ...
    ...
    ...
    $result = mysql_query ("SELECT Name, EventTimes1Score,EventTimes2Score, 
EventTimes3Score, EventTimes4Score, EventTimes5Score,EventAdd1Score, 
EventAdd2Score, EventAdd3Score, EventAdd4Score, EventAdd5Score, 
EventTake1Score, EventTake2Score, EventTake3Score, EventTake4Score, 
EventTake5Score from leaguetest LIMIT $i,1", $connection);
...
....
}

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---

Reply via email to