I am using a PHP script to control indexing, which works great when run
from an ssh session, but fails when run from cron.
I have confirmed that the actual PHP script is NOT executed when the
shell script is run from cron, instead I get "Unknown header line"
warnings (see below).
How do I make this work? I don't know perl, so using a perl script
instead of the PHP script is not an option for me.
Thanks in advance for your help.
Terry Herckenrath
OS: Linux host.shopshootsmarter.com 2.6.9-023stab044.11-enterprise #1
SMP Sun Sep 30 12:15:39 MSD 2007 i686 athlon i386 GNU/Linux
Swish-e: SWISH-E 2.4.5
PHP: Version 5.2.3
Server API: CGI
cron result:
MANPATH=/usr/lib/courier-imap/man:
MAILTO=terry@cactus-host.com
SHELL=/bin/sh
USER=shootsm2
LS_COLORS=
PATH=/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/bin:/bin:/home/shootsm2/bin
PWD=/home/shootsm2
LANG=C
HOME=/home/shootsm2
SHLVL=2
LOGNAME=shootsm2
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/usr/bin/env
Indexing Data Source: "External-Program"
Indexing "php"
External Program found: /usr/bin/php
Warning: Unknown header line: 'X-Powered-By: PHP/5.2.3' from program php
Warning: Unknown header line: 'Content-type: text/html' from program php
err: External program failed to return required headers Path-Name:
.
cron: /home/shootsm2/public_html/cgi-bin/update_searchsmarter_index
shell script:
#! /bin/bash
# Source global definitions (from .bashrc)
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment and startup programs (from .bash_profile)
PATH=$PATH:$HOME/bin
export PATH
# dump environment
/usr/bin/env
/usr/local/bin/swish-e -c
/home/shootsm2/public_html/searchsmarter/searchsmarter.conf -S prog
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Mon May 5 09:35:32 2008