Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

691263Dec 25 2012 — edited Dec 26 2012
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2013
Added on Dec 25 2012
1 comment
2,759 views