This discussion is archived
1 Reply Latest reply: Dec 25, 2012 10:40 PM by cj RSS

Run Sqlldr from PHP exec - Command Not Found Error '127'

691263 Newbie
Currently Being Moderated
Hello,

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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points