php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37136 oci_bind_by_name resulted with "Only variables can be passed by reference"
Submitted: 2006-04-19 14:14 UTC Modified: 2006-04-19 15:03 UTC
From: minh dot huynh at bowker dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.1.2 OS: win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: minh dot huynh at bowker dot com
New email:
PHP Version: OS:

 

 [2006-04-19 14:14 UTC] minh dot huynh at bowker dot com
Description:
------------
I run php5.1.2, Apache2, using IIS Win32.
It gives "Only variables can be passed by reference" when I try oci_bind_by_name.

Reproduce code:
---------------
<?php
$conn = oci_connect("userid","password","ora1");
$sSQL = "select * from rcl.rcl_item where rcl_item_uid = :myid";
$Statement = oci_parse($conn, $sSQL);
oci_bind_by_name($Statement, ':myid', 10,8);
oci_execute($Statement);
oci_free_statement($Statement);
oci_close($conn);

?>

Expected result:
----------------
nothing, but I got fatal error: Only variables can be passed by reference

Actual result:
--------------
When I didn't use oci_bind_by_name it worked.  I was able to print out column names and values.  I think it's a bug.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-19 14:25 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

http://php.net/oci_bind_by_name
 [2006-04-19 14:55 UTC] minh dot huynh at bowker dot com
I spent one whole day going through the bug logs and searching the Net, but everyone seems to do the same as what I do.
Am I missing something?
 [2006-04-19 15:03 UTC] tony2001@php.net
You are missing third parameter of the function, which MUST be a variable where OUT values are returned.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 15:01:28 2024 UTC