Web Server Apache v2.2.14
PHP 5.3.2-1ubuntu4.9.1
PHP Max Post Size 8.00 MB
PHP Maximum Upload Size 2.00 MB
PHP Memory Limit 128.00 MB
MySQL Version 5.1.41-3ubuntu12.10
MySQL Packet Size 16.00 MB
root@angliaimagyarok:/home/muso/BeBot# su -c "php5 StartBot.php" muso
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Notice: Undefined offset: 1 in /home/muso/BeBot/Sources/Conf.php on line 47
PHP Notice: Undefined property: Conf::$cf in /home/muso/BeBot/Sources/Conf.php on line 70
Bot.conf Does not Exist
What do you want to do?
(r=Retry, n=new, c=Change, q=quit)
Select: ^Croot@angliaimagyarok:/home/muso/BeBot#
root@angliaimagyarok:/home/muso/BeBot# ./bot.sh start
Starting Bot
Failed to start bot
root@angliaimagyarok:/home/muso/BeBot# /usr/bin/nohup: appending output to `nohup.out'
root@angliaimagyarok:/home/muso/BeBot# tail nohup.out
/home/muso/BeBot/StartBot.php: 5: ChangeLog.txt: not found
/home/muso/BeBot/StartBot.php: 5: Age: not found
/home/muso/BeBot/StartBot.php: 6: Syntax error: "(" unexpected
/home/muso/BeBot/StartBot.php: 1: cannot open ?php: No such file
/home/muso/BeBot/StartBot.php: 2: /bin: Permission denied
/home/muso/BeBot/StartBot.php: 3: ChangeLog.txt: not found
/home/muso/BeBot/StartBot.php: 4: ChangeLog.txt: not found
/home/muso/BeBot/StartBot.php: 5: ChangeLog.txt: not found
/home/muso/BeBot/StartBot.php: 5: Age: not found
/home/muso/BeBot/StartBot.php: 6: Syntax error: "(" unexpected
root@angliaimagyarok:/home/muso/BeBot#
#!/bin/sh
BASEDIR="/home/muso/BeBot"
PHPBIN="/usr/lib/php5"
CMD="/usr/bin/php5 ${BASEDIR}/StartBot.php"
# If you want to use your own INI file
# set the location of the ini file and
# comment out the two following lines
#INI="${BASEDIR}/php.ini"
#CMD="${PHPBIN} -c ${INI} ${BASEDIR}/bot.php"
NOHUP=/usr/bin/nohup
Error() {
echo "Error: $1"
exit 1
}
[ -d ${BASEDIR} ] || Error "Make sure the BASEDIR variable is set
The value ${BASEDIR} is not valid"
[ -f "${BASEDIR}/StartBot.php" ] || Error "Make sure the BASEDIR variable
is
properly set
I could not find helpbot.php in ${BASEDIR}"
[ -x ${PHPBIN} ] || Error "Make sure the PHPBIN variable is set
The value ${PHPBIN} is not valid"
[ -x ${NOHUP} ] || Error "Make sure the NOHUP variable is set
The value ${NOHUP} is not valid"
case $1
in
start*)
PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
ANS=0
[ "${PID}" != "" ] || ANS=1;
if [ $ANS -eq 0 ]
then
echo "Bot already running PID=${PID}"
else
echo "Starting Bot"
cd ${BASEDIR}
${NOHUP} ${CMD} &
PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{print $1;}'`
if [ "$PID" = "" ]
then
echo "Failed to start bot"
else
echo "Bot Started"
fi
fi
;;
stop*)
PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
ANS=0
[ "${PID}" != "" ] || ANS=1;
if [ $ANS -eq 0 ]
then
echo "Stopping bot matching PID=$PID"
kill ${PID}
else
echo "Bot is not running"
fi
;;
status*)
PID=`/bin/ps x | /bin/grep -v grep | /bin/grep "$HOME/BeBot/StartBot" | awk '{ print $1; }'`
ANS=0
[ "${PID}" != "" ] || ANS=1;
if [ $ANS -eq 0 ]
then
echo "Bot running PID=$PID"
else
echo "Bot not running :("
fi
;;
*)
echo "Usage: $0 {start|stop|status}";
;;
esac
used to be it was work fine but now i have no ideal what is wrong.
Working fine with this one
`which php` -c ./ Main.php