From owner-freebsd-questions@FreeBSD.ORG Mon Nov 24 03:07:02 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 617211065670 for ; Mon, 24 Nov 2008 03:07:02 +0000 (UTC) (envelope-from kdk@daleco.biz) Received: from ezekiel.daleco.biz (southernuniform.com [66.76.92.18]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2668FC1B for ; Mon, 24 Nov 2008 03:07:01 +0000 (UTC) (envelope-from kdk@daleco.biz) Received: from localhost (localhost [127.0.0.1]) by ezekiel.daleco.biz (8.14.2/8.14.2) with ESMTP id mAO370bW017838; Sun, 23 Nov 2008 21:07:00 -0600 (CST) (envelope-from kdk@daleco.biz) X-Virus-Scanned: amavisd-new at daleco.biz Received: from ezekiel.daleco.biz ([127.0.0.1]) by localhost (ezekiel.daleco.biz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rviFQ4R+I1RM; Sun, 23 Nov 2008 21:06:47 -0600 (CST) Received: from archangel.daleco.biz (ezekiel.daleco.biz [66.76.92.18]) by ezekiel.daleco.biz (8.14.2/8.14.2) with ESMTP id mAO36fYV017834; Sun, 23 Nov 2008 21:06:43 -0600 (CST) (envelope-from kdk@daleco.biz) Message-ID: <492A1A41.1060202@daleco.biz> Date: Sun, 23 Nov 2008 21:06:41 -0600 From: Kevin Kinsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.16) Gecko/20080719 SeaMonkey/1.1.11 MIME-Version: 1.0 To: apseudoutopia@gmail.com References: <27ade5280811231602m4900af50t83daafca16f94b97@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ivan Voras , freebsd-questions@freebsd.org Subject: Re: PHP Session Support in /tmp X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 03:07:02 -0000 Ivan Voras wrote: > APseudoUtopia wrote: >> Hey. >> >> PHP stores session data for the 'file' handler in /tmp, by default. >> For organizational purposes, I'd like to change this to something like >> /tmp/php_sessions/ or so. However, I have the clear_tmp_enable feature >> enabled, so /tmp is cleared on reboot. PHP wont create the >> php_sessions dir on it's own. >> >> So basically, I'm looking for a way to create the dir >> /tmp/php_sessions/ each time the server is booted BEFORE apache >> starts. I'm sure I could do this somehow with the rc.d scripts, but I >> really have no idea how. > > man 8 rc.local > And, by way of an alternate suggestion, remember that cron(8) recognizes an "@reboot" special string instead of the normal five-field time indicators. @reboot /bin/mkdir /tmp/php_sessions HTH, Kevin Kinsey -- It's amazing how many people you could be friends with if only they'd make the first approach.