php-windows Digest 23 Aug 2013 07:02:06 -0000 Issue 4145

Topics (messages 31151 through 31154):

Re: Folder permissions required to create/copy files in/into it during PHP 
script/code execution?
        31151 by: Richard Quadling
        31152 by: Jacob Kruger

Re: WinCache 1.3.5 release on SourceForge
        31153 by: Eric Stenson
        31154 by: Pierre Joye

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On 21 August 2013 17:00, Jacob Kruger <ja...@blindza.co.za> wrote:

> And, from the following page:
> http://www.zzee.com/solutions/**linux-permissions.shtml<http://www.zzee.com/solutions/linux-permissions.shtml>
>
> 0 All types of access are denied
> 1 Execute access is allowed only
> 2Write access is allowed only
> 3 Write and execute access are allowed
> 4 Read access is allowed only
> 5 Read and execute access are allowed
> 6 Read and write access are allowed
> 7 Everything is allowed
>
>
> Jacob Kruger
> Blind Biker
> Skype: BlindZA
> '...fate had broken his body, but not his spirit...'
>
> ----- Original Message ----- From: "Jacob Kruger" <ja...@blindza.co.za>
> To: <php-wind...@lists.php.net>
> Sent: Wednesday, August 21, 2013 5:34 PM
> Subject: Re: [PHP-WIN] Folder permissions required to create/copy files
> in/into it during PHP script/code execution?
>
>
>
>  Ok, might have now fixed this - firstly set folder permissions to 777,
>> but, then, again, turned off public execute permissions, which seemed to
>> revert permissions to 776, but, creating the text file, using the test
>> script still worked - but, still just wondering what the specific
>> permission difference/recommendation is/should be?
>>
>> Stay well
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...fate had broken his body, but not his spirit...'
>>
>> ----- Original Message ----- From: "Jacob Kruger" <ja...@blindza.co.za>
>> To: <php-wind...@lists.php.net>
>> Sent: Wednesday, August 21, 2013 5:05 PM
>> Subject: [PHP-WIN] Folder permissions required to create/copy files
>> in/into it during PHP script/code execution?
>>
>>
>> I have got a /images folder, and I want to sometimes copy uploaded files
>> from the temp path - using their temp_name file names, which works for
>> other things, to then copy them into this folder in the root of the
>> website, and renaming them at the same time to a name based on time() .
>> rand(1, 10), etc.
>>
>> Now the file name generation works well enough, but, seems like no matter
>> what permissions I set for that folder, for group, owner and public, where
>> have even tried turning on all 3 of read, write and execute, using
>> fileZilla - current permissions value ends up rendering as 766 - am
>> guessing that 6 = rwe, but not ownership? - but, can't copy the files in
>> there at runtime, and when also tried creating a test script, to just
>> create a text file in that folder, and write to it, get same error message
>> in server log:
>>
>> PHP Warning:  copy(../images/13770956916.**png): failed to open stream:
>> Permission denied
>>
>> and
>>
>> failed to open stream: Permission denied
>>
>> Is this possibly to do with it being a linux server, running Apache 2.0,
>> or, the name of the folder /images, or am I missing something 'obvious'
>> here?
>>
>> TIA, for any thoughts/ideas on what to try change
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...fate had broken his body, but not his spirit...'
>>
>>
>> --
>> 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
>
>
Hello Jacob.

There is a peculiarity I have found coming to unix (well Mac, but CentOS
also).

If you want to use a directory like you would expect to use one, then it
needs the execute property.

To that end, I use mkdir($s_Directory, 0755, True); This creates the
complete directory path, along with the ability to write files into it.

It also automatically limits write capabilities to non-owner, making it
read-only.


I hope that helps.

-- 
Richard Quadling
Twitter : @RQuadling

--- End Message ---
--- Begin Message ---
Thanks.

Part of issue is I primarily use filezilla to manage file uploads, 
directory/folder structure, etc., and, yes, it allows you to set permissions, 
etc. via a dialogue, but, not sure if it's a display issue, since under the 3 
sets of permission, owner, group and public, it's rendering the three types of 
permission as pseudo checkboxes, that you can turn on, off, or have what gets 
rendered to me as par'partially checked', but, it does also let you specify the 
resulting permission number/code as a 3 digit number as well, and while I think 
have used, or seen chmod command used in past to set permissions, the MSWindows 
command line FTP doesn't seem to recognise it as a command, although you'd 
expect the FTP server itself to be handling it, but, will try out the use of 
the mkdir command, and see how it operates.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

  ----- Original Message ----- 
  From: Richard Quadling 
  To: Jacob Kruger 
  Cc: php-windows 
  Sent: Thursday, August 22, 2013 4:10 PM
  Subject: Re: [PHP-WIN] Folder permissions required to create/copy files 
in/into it during PHP script/code execution?







  On 21 August 2013 17:00, Jacob Kruger <ja...@blindza.co.za> wrote:

    And, from the following page:
    http://www.zzee.com/solutions/linux-permissions.shtml

    0 All types of access are denied
    1 Execute access is allowed only
    2Write access is allowed only
    3 Write and execute access are allowed
    4 Read access is allowed only
    5 Read and execute access are allowed
    6 Read and write access are allowed
    7 Everything is allowed


    Jacob Kruger
    Blind Biker
    Skype: BlindZA
    '...fate had broken his body, but not his spirit...'

    ----- Original Message ----- From: "Jacob Kruger" <ja...@blindza.co.za>
    To: <php-wind...@lists.php.net>

    Sent: Wednesday, August 21, 2013 5:34 PM
    Subject: Re: [PHP-WIN] Folder permissions required to create/copy files 
in/into it during PHP script/code execution?




      Ok, might have now fixed this - firstly set folder permissions to 777, 
but, then, again, turned off public execute permissions, which seemed to revert 
permissions to 776, but, creating the text file, using the test script still 
worked - but, still just wondering what the specific permission 
difference/recommendation is/should be?

      Stay well

      Jacob Kruger
      Blind Biker
      Skype: BlindZA
      '...fate had broken his body, but not his spirit...'

      ----- Original Message ----- From: "Jacob Kruger" <ja...@blindza.co.za>
      To: <php-wind...@lists.php.net>
      Sent: Wednesday, August 21, 2013 5:05 PM
      Subject: [PHP-WIN] Folder permissions required to create/copy files 
in/into it during PHP script/code execution?


      I have got a /images folder, and I want to sometimes copy uploaded files 
from the temp path - using their temp_name file names, which works for other 
things, to then copy them into this folder in the root of the website, and 
renaming them at the same time to a name based on time() . rand(1, 10), etc.

      Now the file name generation works well enough, but, seems like no matter 
what permissions I set for that folder, for group, owner and public, where have 
even tried turning on all 3 of read, write and execute, using fileZilla - 
current permissions value ends up rendering as 766 - am guessing that 6 = rwe, 
but not ownership? - but, can't copy the files in there at runtime, and when 
also tried creating a test script, to just create a text file in that folder, 
and write to it, get same error message in server log:

      PHP Warning:  copy(../images/13770956916.png): failed to open stream: 
Permission denied

      and

      failed to open stream: Permission denied

      Is this possibly to do with it being a linux server, running Apache 2.0, 
or, the name of the folder /images, or am I missing something 'obvious' here?

      TIA, for any thoughts/ideas on what to try change

      Jacob Kruger
      Blind Biker
      Skype: BlindZA
      '...fate had broken his body, but not his spirit...'


      -- 
      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



  Hello Jacob.


  There is a peculiarity I have found coming to unix (well Mac, but CentOS 
also).


  If you want to use a directory like you would expect to use one, then it 
needs the execute property.


  To that end, I use mkdir($s_Directory, 0755, True); This creates the complete 
directory path, along with the ability to write files into it.


  It also automatically limits write capabilities to non-owner, making it 
read-only.




  I hope that helps.



  -- 
  Richard Quadling
  Twitter : @RQuadling

--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Tomasz Krawczyk [mailto:tomkr...@gmail.com] 
>
> You wrote Zend Opcache has to be enabled in PHP 5.5 so,
> it is an extension, not part of the PHP core, but it 
> is bundled with PHP 5.5.
[...]
>
> Are you sure you will have to remove opcode cache 
> from WinCache in the future?

Tomasz--

Our understanding at this point is that Opcache will continue to be supported 
(by Zend) and will track all opcode/Zend compiler changes for future releases.  
We believe the owners of Opcache will provide the highest level of opcode 
caching performance, due to their proximity to the Zend core developers 
(<grin>).  Further, we're trusting them to provide a highly performant opcode 
cache on Windows (using cross-processes shared memory, appropriate Win32 APIs, 
etc.).

Thx!
    --E.



--- End Message ---
--- Begin Message ---
On Aug 22, 2013 8:07 PM, "Eric Stenson" <erics...@microsoft.com> wrote:
>
> -----Original Message-----
> From: Tomasz Krawczyk [mailto:tomkr...@gmail.com]
> >
> > You wrote Zend Opcache has to be enabled in PHP 5.5 so,
> > it is an extension, not part of the PHP core, but it
> > is bundled with PHP 5.5.
> [...]
> >
> > Are you sure you will have to remove opcode cache
> > from WinCache in the future?
>
> Tomasz--
>
> Our understanding at this point is that Opcache will continue to be
supported (by Zend) and will track all opcode/Zend compiler changes for
future releases.  We believe the owners of Opcache will provide the highest
level of opcode caching performance, due to their proximity to the Zend
core developers (<grin>).  Further, we're trusting them to provide a highly
performant opcode cache on Windows (using cross-processes shared memory,
appropriate Win32 APIs, etc.).
>

In the long run yes, or maybe. Right now the last release is totally
unusable. For various reasons, some fixable and other will be hardly
fixable without changes in the engine

It would be nice if it is possible to have an alternative at least for a
year or two. Also windows as a whole is not a priority for Zend, for quite
some time. So ideally we should take care of this to ensure outstanding or
at least sync performance and stability.

Cheers,

--- End Message ---

Reply via email to