php-windows Digest 1 Mar 2007 04:59:01 -0000 Issue 3150

Topics (messages 27524 through 27526):

Re: Rights to delete?
        27524 by: Gustav Wiberg

Re: "CreateProcess failed" when proc_open()
        27525 by: Alexander Rybin

auto upload
        27526 by: bedul

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 there (Styve)!

You wanted to know what could have been...


It wasn't really that hard that I thought. The first main problem was that I 
typed wrong in my code... Then it worked a while...


I assigned permission for the files/folders I wanted to delete through PHP with 
a IUSR_<computer name> user - so this user could modify/write files.. I didn't 
work at first on the Win2003 Server, but after a while.. (about half an hour), 
THEN it worked... So it could have been that I didn't enoguh patience... I 
didn't have to do anything on the webbserver...

Best regards
/Gustav Wiberg

-----Original Message-----
From: Styve Couture [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 4:33 PM
To: Gustav Wiberg; [email protected]
Subject: RE: [PHP-WIN] Rights to delete?

I really don't know. I didn't succeeded when trying the last time. And since I 
have been move to another project, I haven't finished my migration from Apache 
to IIS on my previous project so... 

And it was my last thing to solve if I remember right. :( It is why I'm 
interested in the solution. :)

Sorry that I can't help much more.

Regards

Styve

-----Message d'origine-----
De : Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Envoyé : 22 février 2007 10:18
À : Styve Couture; '[email protected]'
Objet : RE: [PHP-WIN] Rights to delete?

Hi there!

I know which user it is. The problem is that nothing happens with the 
permissons... I assign the Internet IUSR to a specific folder.
Then I try and run my php-script. Do I have to restart IIS? 

Best regards
/Gustav Wiberg 

-----Original Message-----
From: Styve Couture [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 3:42 PM
To: Gustav Wiberg; [email protected]
Subject: RE: [PHP-WIN] Rights to delete?

I had the same problem when I have tried to migrate from Apache to IIS.

What I know is that with IIS and ASP.NET you have to go under the security 
option for your folder and give the right "modify" for the user NETWORK_SERVICE 
(under 2003 Server). This allows ASP.NET to delete files (like old logs for 
example).

So I thing you may have to find the right user (the one PHP use for executing 
its script) and gave it the right rights.

Please keep me informed if you find something.

Regards

Styve

-----Message d'origine-----
De : Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Envoyé : 22 février 2007 09:04
À : 'php windows' ([email protected])
Objet : [PHP-WIN] Rights to delete?

Hello!
 
This is not strictly a PHP-question, but I hope anyone can help me... :-)

What has to be done on the webserver (IIS6.0) and the server if I want to 
delete a file from a PHP-script?
I have tested with settings right IUSER.. On the server. But I still can't 
delete the files in a specific folder (like images/products)

Best regards
/Gustav Wiberg

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

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

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

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

--- End Message ---
--- Begin Message ---
Hi!

I solved the problem.

Php 5.2.1 still use cmd.exe for run any executables (or may be I have made
mistake in "other_options"). 
But Win2003 does not give read and execute permission on cmd.exe for simple
users and guest users especially, and IIS 6 (unlike Apache) runs website
under very restricted user, who, of course, have no permissions for reading
and executing the cmd.exe.

If you need to run executables in php code under IIS6 control, you must give
read and execute permission on cmd.exe to users, IIS6 uses to run websites
under.

С уважением,
Александр Рыбин,
директор группы "Алланд"
icq: 13391736,
www.allandgroup.ru
 

-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 9:49 AM
To: 'Alexander Rybin'; '[email protected]'
Subject: RE: [PHP-WIN] "CreateProcess failed" when proc_open()

Hi there!

I don't know, but this may give you a clue?

Grabbe from http://se2.php.net/manual/sv/function.proc-open.php
"Not: Windows compatibility: Descriptors beyond 2 (stderr) are made
available to the child process as inheritable handles, but since the Windows
architecture does not associate file descriptor numbers with low-level
handles, the child process does not (yet) have a means of accessing those
handles. Stdin, stdout and stderr work as expected. 

Not: If you only need a uni-directional (one-way) process pipe, use popen()
instead, as it is much easier to use."
 

Best regards
/Gustav Wiberg


-----Original Message-----
From: Alexander Rybin [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 24, 2007 3:20 PM
To: [email protected]
Subject: [PHP-WIN] "CreateProcess failed" when proc_open()

Hi!

Could anyone help me.
Here is my problem.

I need to start new external process. I do it by the next code:
            $descriptorspec = array(
                 0 => array("pipe", "r"),  // stdin is a pipe that the child

will read from
                 1 => array("pipe", "w"),  // stdout is a pipe that the 
child will write to
                 2 => array("pipe", "w"),  // stderr is a file to write to
            );

            $hf = proc_open( $ex_path, $descriptorspec, $pipes );

$ex_path is a correct path to my executable. However, I get "CreateProcess 
failed" when it runs.
I have IIS 6, running in its native process model. Also I have PHP 5.2.1.

What's wrong? Please, help! 

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

--- End Message ---
--- Begin Message ---
this might a strange code i request, plz forgive my rudeness.

everyday i was update a doc where i always put on d:\report\today.xls where
i use a simple upload document prog (inside only box for upload only? and
submit). the file i upload will save on file folder (inside the upload
folder)

today i want to skip that procedure.. i want to build this web where i open
the site (http://server-e/upload/index.php) then click the button/submit..
this button will triger action where i will upload the d:\report\today.xls
file "without using browse/file input".

can u help me?? i do know about the unsafe that metodh.. thx for your
attention.

--- End Message ---

Reply via email to