Run Sqlldr from PHP exec - Command Not Found Error '127'
691263Dec 25 2012 — edited Dec 26 2012Hello,
I am trying to run the sqlldr command from PHP, but I get an status of '127' (Command not found). What am I doing wrong?
<?php
shell_exec("ORACLE_HOME=/opt/nasapps/proprietary/oracle/product/current; export ORACLE_HOME");
$setpath = "PATH=$" . "ORACLE_HOME/bin:$" . "PATH; export PATH";
shell_exec($setpath);
$command = "sqlldr username/password@host/sid control=test_control.ctl > /dev/null; echo $?";
$xx = exec($command);
echo trim($xx); #outputs 127
?>
Thank you,
S