0

Here is my function that I've isolated the issue too which is failing with a 500 error in the console: What am I doing incorrectly/missing here?

.../  
 private function addSettings($username, $settings) 
  {
    $sql = "INSERT INTO APP.USERDB(userid,obj_json) VALUES(:userid,:obj_json)";
    $stmt = oci_parse($this->db, $sql);

    $stmt->oci_bind_by_name(':userid', $username);
    $stmt->oci_bind_by_name(':obj_json', $settings);

    return $stmt->execute();

    if(isset($_POST['obj_json']) && !empty($_POST['obj_json'])) {
        $settings = $_POST['obj_json'];
        $prefs = new UserSettingsRepository;

        $response = $prefs->addSettings($username, $settings);
        echo 'ok';
    }
  }
.../
Dr Upvote
  • 8,023
  • 24
  • 91
  • 204
  • 3
    So what does your http server's error log file say what the actual error is? – arkascha Mar 02 '20 at 23:23
  • 1
    Does this answer your question? [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – Greg Schmidt Mar 02 '20 at 23:27
  • You tagged it 'blob' (but didn't actually give the column types). Use a temp lob or a RETURNING INTO clause with LOBs, see the chapter on LOBs in [The Underground PHP and Oracle Manual](http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html) – Christopher Jones Mar 03 '20 at 22:31

0 Answers0