Doc #53089 [Asn->Csd]: php.ini should use portable example of find
| From: | aharvey@php.net | Date: | Mon, 18 Oct 2010 02:10:45 +0000 |
| Subject: | Doc #53089 [Asn->Csd]: php.ini should use portable example of find | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5233@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53089&edit=1
ID: 53089
Updated by: aharvey@php.net
Reported by: php-bugs-2010 at ryandesign dot com
Summary: php.ini should use portable example of find
-Status: Assigned
+Status: Closed
Type: Documentation Problem
-Package: Documentation problem
+Package: *Configuration Issues
PHP Version: 5.3.3
Assigned To: aharvey
Block user comment: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
I've kept the xargs call, since -delete isn't POSIX standard either,
but removed the cd command as suggested. Thanks!
Previous Comments:
------------------------------------------------------------------------
[2010-10-18 04:10:31] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=304463
Log: Fix bug #53089 (php.ini should use portable example of find) by
using POSIX
compliant syntax in the suggested find command for cleaning up session
files in
the shipped php.ini files.
------------------------------------------------------------------------
[2010-10-17 16:48:51] php-bugs-2010 at ryandesign dot com
Description:
------------
The sample php.ini files included with PHP, in the section
about implementing your own garbage collection if using
session subdirectories, advocate running the following
command in a crontab:
cd /path/to/sessions; find -cmin +24 | xargs rm
This doesn't work on Mac OS X; its BSD implementation of
find requires that the first argument be the directory to
search.
It seems to me that there is no need to cd to the directory,
nor to pipe to xargs, to accomplish the goal; couldn't it be
rewritten:
find /path/to/sessions -cmin +24 -delete
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53089&edit=1