From owner-freebsd-questions@FreeBSD.ORG Tue Mar 9 18:18:14 2010 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 951AA106564A for ; Tue, 9 Mar 2010 18:18:14 +0000 (UTC) (envelope-from nlandys@gmail.com) Received: from mail-qy0-f183.google.com (mail-qy0-f183.google.com [209.85.221.183]) by mx1.freebsd.org (Postfix) with ESMTP id 4CD1F8FC1A for ; Tue, 9 Mar 2010 18:18:13 +0000 (UTC) Received: by qyk14 with SMTP id 14so2334145qyk.9 for ; Tue, 09 Mar 2010 10:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=dRMV+APzw4XSQW1n2sw4ibOvvUn8pB4HQ/Asj+NXK74=; b=dSmzPQTG7rRcG22L2gh4QI1k6XRUOmbvxzCWQiOa0yORvNEf/vTmWjT5M20CcDdknD N5HJ8jLiAehXESfzr8phykqGrlSGWiWejsdw8A8eg8pUPhEDFMttYd15xwG9+xrPo0TC H8ualZuyW2kIeFwU5exF7mY9k28clSgZofpwg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kb86HXTC10GFfxJSDNZyLNWdeD/hxibWx2PXYGeHK5pZbXPZGWhP+1PpxyiFqLkqCe 7qP4KiqWAnyBjI6IMtKmFQaZ5WVV6NCiMIyu5fmIEtonv3xhbiSnOHzqdYHkWhBPpkAx b14iybHyyye7+n6WGbRx7s099VpSQwU/IYDiw= MIME-Version: 1.0 Received: by 10.229.219.8 with SMTP id hs8mr249300qcb.25.1268158693259; Tue, 09 Mar 2010 10:18:13 -0800 (PST) In-Reply-To: <551AED7A-2336-40B6-B8B8-3EF2637D03B0@norden1.com> References: <551AED7A-2336-40B6-B8B8-3EF2637D03B0@norden1.com> Date: Tue, 9 Mar 2010 10:18:12 -0800 Message-ID: <560f92641003091018m1c1ffeeg229cc2fc29079d7@mail.gmail.com> From: Nerius Landys To: Darrell Betts Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: Trying run a php script from cron 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: Tue, 09 Mar 2010 18:18:14 -0000 > I am trying to run a php script from the cron tab and these are the errors I > receive: > > > /usr/local/bin/php php -q /home/xxxx/ripper.php result > Could not open input file: php > /usr/local/bin/php php -/home/xxxx/ripper.php result > > Could not open input file: php > > /usr/local/bin/php -/home/xxxx/ripper.php result > > This script must be called from the command line. > > Running Freebsd 8.0, Php 5.2.12 > I have chmod the script 644 still no luck tried it chmod 777 still no luck. > I have goggled this problem and followed the tutorials but still no luck. > Any ideas how I can get the script to run? > I can run run it from the command line without any problems. Instead of /usr/local/bin/php php -q /home/xxxx/ripper.php try /usr/local/bin/php -f /home/xxxx/ripper.php or just /usr/local/bin/php /home/xxxx/ripper.php You can also try a script like this one: #!/usr/local/bin/php -f And running it like this: /home/xxxx/ripper.php after chmod'ing it to be executable.