1

php

passthru( 'echo $PATH >>/tmp/sqlldrproblem 2>&1' );
passthru( "sqlldr USERID=scott/tiger@dbhost control=/tmp/test.ctl log=/tmp/test.log >>/tmp/sqlldrproblem 2>&1" );

Oracle Linux7.1

# cat /tmp/sqlldrproblem

$PATH:$ORACLE_HOME/bin
/opt/app/oracle/product/12.1.0/client_1
sh: sqlldr: command not found

# which sqlldr
/opt/app/oracle/product/12.1.0/client_1/bin/sqlldr

# cat /etc/sysconfig/httpd
ORACLE_HOME=/opt/app/oracle/product/12.1.0/client_1
export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin
export PATH

--

So,PATH setting seems to be correct. But the error occured.Why?

user3569065
  • 105
  • 1
  • 2
  • 8
  • I missed one command. correctly ,on [php] side ,this is it : passthru( 'echo $PATH >>/tmp/zipproblem 2>&1' ); passthru( 'echo $ORACLE_HOME>>/tmp/zipproblem 2>&1' ); passthru( "sqlldr USERID=scott/tiger@dbhost control=/tmp/test.ctl log=/tmp/test.log >>/tmp/sqlldrproblem 2>&1" ); – user3569065 Aug 20 '15 at 02:38
  • In php passthru(),not only sqlldr but other command also output same result.e.g. php script (brwoser request): passthru("which sqlldr");=> output: sh which:command not found. – user3569065 Aug 20 '15 at 05:37
  • Server version: Apache/2.4.6 () Server built: Mar 6 2015 15:36:38 – user3569065 Aug 20 '15 at 06:35

0 Answers0