From owner-freebsd-questions@FreeBSD.ORG Thu Mar 24 21:14:27 2011 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 8CCF6106564A for ; Thu, 24 Mar 2011 21:14:27 +0000 (UTC) (envelope-from editor@d3photography.com) Received: from server.cwis.biz (70-89-202-5-invergrove-mn.hfc.comcastbusiness.net [70.89.202.5]) by mx1.freebsd.org (Postfix) with ESMTP id 61FBB8FC12 for ; Thu, 24 Mar 2011 21:14:26 +0000 (UTC) Received: from server.cwis.biz (localhost [127.0.0.1]) by server.cwis.biz (Postfix) with ESMTP id F13CD2639C2F; Thu, 24 Mar 2011 16:14:52 -0500 (CDT) X-Virus-Scanned: amavisd-new at cwis.biz Received: from server.cwis.biz ([127.0.0.1]) by server.cwis.biz (server.cwis.biz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O7bC9fVAgWdo; Thu, 24 Mar 2011 16:14:40 -0500 (CDT) Received: from [192.168.46.85] (unknown [64.122.64.171]) by server.cwis.biz (Postfix) with ESMTPSA id CA5542639C56; Thu, 24 Mar 2011 15:30:38 -0500 (CDT) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Ryan Coleman In-Reply-To: <20110324185340.GD15209@thought.org> Date: Thu, 24 Mar 2011 15:30:08 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110323164504.GA25317@thought.org> <20110324185340.GD15209@thought.org> To: Gary Kline X-Mailer: Apple Mail (2.1082) Cc: FreeBSD Mailing List Subject: Re: why does this simple counter fail? 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: Thu, 24 Mar 2011 21:14:27 -0000 Here's a quick and dirty option... FIRST make sure your permissions on the folder you want to write the = countfile to is either at RWX to all or is owned by the Apache run user = (PHP by default runs under the Apache Service user). I ran this in file test.php on my server. Give it a whirl. On Mar 24, 2011, at 1:53 PM, Gary Kline wrote: > On Wed, Mar 23, 2011 at 11:47:16AM -0500, Ryan Coleman wrote: >> Do you have an error for it? >>=20 >> If not... add after the first > error_reporting(9); >>=20 >> And see what it reports. >>=20 >> -- >> Ryan >> PHP dev. >>=20 >=20 > save the bandwidth... >=20 >=20 > Ok, i added the error_reporting line to both scripts. No change > from the count.php, and the same output as prev from my script that > tries to pick a random entry from some 70 quotes. here is what the > randomquote.php scipt output onto the home page: >=20 >=20 >=20 >=20 > Last updated: > 17 February, 2011 >=20 > echo "err-9 line below:\n"; $number-1){ // If ran out of quotes, > start again! $num=3D0; } if (file_exists($directory.$quotecountfile)) > { $nu =3D fopen ($directory.$quotecountfile, "w"); fputs($nu,$num); } > else { die("Cant Find $quotecountfile"); } } ?> >=20 >=20 > Note that i added the echo line just now. =20 >=20 > Having a quote isn't as meaningful as giving users the latest > pagecount. That still fails without any errors. =20 >=20 > gary >=20 >=20