php-windows Digest 24 Feb 2007 17:30:45 -0000 Issue 3147

Topics (messages 27517 through 27521):

Re: Rights to delete?
        27517 by: Gustav Wiberg
        27518 by: Gustav Wiberg
        27519 by: Gustav Wiberg
        27520 by: Gustav Wiberg

"CreateProcess failed" when proc_open()
        27521 by: Alexander Rybin

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!

Interesting... But I really don't understand everything that you say... (cause 
I'm not a highly qualified expert in the "server-area"...

"The best way I've found to test if permission changes take effect is to
just grant global permissions to a folder and see if any errors come back."

What do you mean by that? How do I do that? 


"In your particular case, are you sure that the file isn't being locked
open by IIS or the PHP process?"

No... No idea. How can I check that?


Anyway. Thanx for your thoughts! I'm looking further into it...

Best regards
/Gustav Wiberg


 

-----Original Message-----
From: Austin Gruenweller >-]O [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 23, 2007 12:56 AM
To: Styve Couture
Cc: Gustav Wiberg; [email protected]
Subject: Re: [PHP-WIN] Rights to delete?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings,

IIS is a cruel mistress.  Many of the things that I've thought IIS would
pick up when it recycles the process it didn't.  This is particularly
troublesome on a production server.. so you have to make sure everything
is right the first time around, but I digress.

You would THINK that Windows would pick up user permission changes on
the fly -- infact as I think more about it I'm positive that it does.
The best way I've found to test if permission changes take effect is to
just grant global permissions to a folder and see if any errors come back.

In your particular case, are you sure that the file isn't being locked
open by IIS or the PHP process?  That would certainly cause PHP to fail
when it attempts to delete the file, and I know that Windows is
notorious for needlessly locking files.  Make sure that you are properly
closing your files and that no threads have it open when you try to
delete it.  I reckon that would probably take care of your issue.

Good luck!
- -Austin

Styve Couture wrote:
> 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
> 

- --
 _ _ _
|_|@|_| Good order is the foundation of all things.
|_|_|@| http://php.uat.edu/~ausgruen/
|@|@|@| Public key available on pgp.mit.edu
 ¯ ¯ ¯
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFF3i2nWqsILSLH8toRAsjNAJ4zU9xygP7WCCb8pJ0p546Z2ykHIgCfXSfz
Y/fIaIbZQ2SO4GStORiIjLw=
=ohnX
-----END PGP SIGNATURE-----

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

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

How long would it take to restart IIS? (I have never done that on a 
production-server). IS there any risks associated with it? (dumb question? ;-))
We have about 40-50 sites on the IIS.

Best regards
/Gustav Wiberg 

-----Original Message-----
From: Armando [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 22, 2007 6:07 PM
Cc: [email protected]
Subject: Re: [PHP-WIN] Rights to delete?

I would restart IIS. You know the old Windows adage.. when in doubt, 
restart.

Styve Couture wrote:
> 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

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

Thanx for the tip!

Anyway I have solved the case. I was much, much easier than I thought. It's 
almost that I begin to cry... Of shame...

I called function in a class from another place than I thought and there I 
didn't set any filename. So the main problem I tried to delete a filed called
"nothing".

The weird thing is though that I didn't have to set any specific user to delete 
a file... (I change with chmod first, but the user didn't seem to matter)

Anyway HELP FROM YOU ALL!!!

Best regards
/Gustav Wiberg

 

-----Original Message-----
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 23, 2007 8:22 AM
To: Gustav Wiberg
Subject: RE: [PHP-WIN] Rights to delete?

Gustav,

There are two ways to restart IIS.

The first is to restart the WWW server service - by far the quickest, but
might not handle your pemission change.

The second is to restart the IIS service, which will also restart FTP, SMTP
as well as WWW services.

I switched over from IIS (5) about 1 year ago and I seem to recall that none
more than a few seconds, if the server was quiet at the time. Do you have
direct/remote access to your server?

I use RemoteAdmin for mine as they are over 400 miles away from my desk. I
use TCPview (freely available I think) to check on activity before I restart
anything.

Hope this helps

George

> -----Original Message-----
> From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2007 7:13 am
> To: 'Armando'
> Cc: '[email protected]'
> Subject: RE: [PHP-WIN] Rights to delete?
>
>
> Hi there!
>
> How long would it take to restart IIS? (I have never done that on
> a production-server). IS there any risks associated with it?
> (dumb question? ;-))
> We have about 40-50 sites on the IIS.
>
> Best regards
> /Gustav Wiberg
>
> -----Original Message-----
> From: Armando [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 22, 2007 6:07 PM
> Cc: [email protected]
> Subject: Re: [PHP-WIN] Rights to delete?
>
> I would restart IIS. You know the old Windows adage.. when in doubt,
> restart.
>
> Styve Couture wrote:
> > 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
>
>

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

I meant THANKS FOR THE HELP FROM YOU ALL! :-)

Best regards
/Gustav Wiberg



-----Original Message-----
From: Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 23, 2007 8:33 AM
To: 'php windows' ([email protected])
Subject: FW: [PHP-WIN] Rights to delete?

Hi there!

Thanx for the tip!

Anyway I have solved the case. I was much, much easier than I thought. It's 
almost that I begin to cry... Of shame...

I called function in a class from another place than I thought and there I 
didn't set any filename. So the main problem I tried to delete a filed called
"nothing".

The weird thing is though that I didn't have to set any specific user to delete 
a file... (I change with chmod first, but the user didn't seem to matter)

Anyway HELP FROM YOU ALL!!!

Best regards
/Gustav Wiberg

 

-----Original Message-----
From: George Pitcher [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 23, 2007 8:22 AM
To: Gustav Wiberg
Subject: RE: [PHP-WIN] Rights to delete?

Gustav,

There are two ways to restart IIS.

The first is to restart the WWW server service - by far the quickest, but
might not handle your pemission change.

The second is to restart the IIS service, which will also restart FTP, SMTP
as well as WWW services.

I switched over from IIS (5) about 1 year ago and I seem to recall that none
more than a few seconds, if the server was quiet at the time. Do you have
direct/remote access to your server?

I use RemoteAdmin for mine as they are over 400 miles away from my desk. I
use TCPview (freely available I think) to check on activity before I restart
anything.

Hope this helps

George

> -----Original Message-----
> From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2007 7:13 am
> To: 'Armando'
> Cc: '[email protected]'
> Subject: RE: [PHP-WIN] Rights to delete?
>
>
> Hi there!
>
> How long would it take to restart IIS? (I have never done that on
> a production-server). IS there any risks associated with it?
> (dumb question? ;-))
> We have about 40-50 sites on the IIS.
>
> Best regards
> /Gustav Wiberg
>
> -----Original Message-----
> From: Armando [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 22, 2007 6:07 PM
> Cc: [email protected]
> Subject: Re: [PHP-WIN] Rights to delete?
>
> I would restart IIS. You know the old Windows adage.. when in doubt,
> restart.
>
> Styve Couture wrote:
> > 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

--- End Message ---
--- Begin Message ---
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!
--- End Message ---

Reply via email to