php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41438 COLUMN LONG RAW ORACLE
Submitted: 2007-05-18 16:01 UTC Modified: 2007-05-18 16:07 UTC
From: jrojass at gmail dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.4.7 OS: Windows 2000
Private report: No CVE-ID: None
 [2007-05-18 16:01 UTC] jrojass at gmail dot com
Description:
------------
{
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521)))(CONNECT_DATA=(SID=xxx)))";
	$cl = ocilogon("xxx","xxxxxxxxx",$db);
	$stmt = ociparse($cl,"UPDATE TABLA_IMAGEN SET IMAGEN=:fileimage WHERE COD_IMAGEN=:id");
	$fileimage = file_get_contents("Cualquier archivo .gif");
	OCIBindByName($stmt,":id",$cod_cli, -1);
	OCIBindByName($stmt,":fileimage",$fileimage, -1);
	ociexecute($stmt, $OCI_DEFAULT);
	ocicommit($cl);
	$msg = "Actualizaci?n realizada Satisfactoriamente";
}



Reproduce code:
---------------
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-01465: invalid hex number in c:\servidor\Apache\htdocs\Oracle\actualizar_imagen.php on line 13



Expected result:
----------------
{
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521)))(CONNECT_DATA=(SID=xxx)))";
	$cl = ocilogon("xxx","xxxxxxxxx",$db);
	$stmt = ociparse($cl,"UPDATE TABLA_IMAGEN SET IMAGEN=:fileimage WHERE COD_IMAGEN=:id");
	$fileimage = file_get_contents("Cualquier archivo .gif");
	OCIBindByName($stmt,":id",$cod_cli, -1);
	OCIBindByName($stmt,":fileimage",bin2hex($fileimage), -1);
	ociexecute($stmt, $OCI_DEFAULT);
	ocicommit($cl);
	$msg = "Actualizaci?n realizada Satisfactoriamente";
}

// fUNCIONA OK.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-18 16:07 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 22:01:30 2024 UTC