This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

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

691263
691263 Member Posts: 1
edited Dec 26, 2012 1:40AM in PHP
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/[email protected]/sid control=test_control.ctl > /dev/null; echo $?";
$xx = exec($command);
echo trim($xx); #outputs 127

?>

Thank you,
S

Answers

This discussion has been closed.