Scheduler Usage
http://scheduler-usage.com/

Shell Script with PHP CLI is failing
http://scheduler-usage.com/viewtopic.php?f=14&t=15947
Page 1 of 1

Author:  desiw [ 30 Jul 2018 12:06 ]
Post subject:  Shell Script with PHP CLI is failing

Hi,

I have a shell script (Linux) whith a php cli which always failing with ControlM.

ODATE=$1
echo "The user executing is `whoami`"
echo "Path is `pwd`"
echo "Running php program"
echo "Odate is $ODATE"

/opt/php/php7_installed/bin/php -c /opt/php/php7_installed/lib/php.ini /servicios/vertriebsmanager/export/erfolgsreporting_cr_sb.php
ret=$?

if [[ $ret -ne 0 ]];
then
echo "ERROR IN PHP"
exit 2;
fi

When I execute the shell script manually it works. In ControlM the script fails.

The php scripts works with a db class (Oracle via ODBC).

include ($HAUPTLINK_VM.'xx_klassen/db_class_'.$db.'.inc'); --> here it fails via controlm.

Has anybody an idea why?

Author:  fyot [ 14 Aug 2018 12:50 ]
Post subject:  Re: Shell Script with PHP CLI is failing

Hi

Did you try to launch your script with same user ?
Anyhow verify if all environment variables are available launching your script thru Control-M

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/