#37059 [Csd]: can not insert a long raw column

2006-04-13 Thread a dot vigetti at provincia dot grosseto dot it
 ID:   37059
 User updated by:  a dot vigetti at provincia dot grosseto dot it
 Reported By:  a dot vigetti at provincia dot grosseto dot it
 Status:   Closed
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

OK i tried the CVS snapshot php5.1-200604130230.tar.bz2 and everything
works fine.
This patch will be standard in 5.1.3?

thanks Tony.

Aldo


Previous Comments:


[2006-04-13 12:04:02] [EMAIL PROTECTED]

This constant is available only in CVS version.



[2006-04-13 12:01:50] a dot vigetti at provincia dot grosseto dot it

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, ":fileimage", $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo



[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, ":fileimage", $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); <-- OCI_DEFAULT is not a variable,
it's a constant.

----

[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:



When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







-- 
Edit this bug report at http://bugs.php.net/?id=37059&edit=1


#37059 [Csd->Opn]: can not insert a long raw column

2006-04-13 Thread a dot vigetti at provincia dot grosseto dot it
 ID:   37059
 User updated by:  a dot vigetti at provincia dot grosseto dot it
 Reported By:  a dot vigetti at provincia dot grosseto dot it
-Status:   Closed
+Status:   Open
 Bug Type: OCI8 related
 Operating System: debian linux  2.6.12-1-686-smp
 PHP Version:  5.1.2
 New Comment:

Ok i fixed  OCI_DEFAULT and tried:
OCIBindByName ( $stmt, ":fileimage", $fileimage, -1, SQL_LBI);

but the result is now:

Warning: ocibindbyname() expects parameter 5 to be long, string given
in /root/lavori/ArchiproNew/prove/LongRow.php on line 12

Warning: ociexecute(): ORA-01008: not all variables bound in
/root/lavori/ArchiproNew/prove/LongRow.php on line 13

I tried also SQLT_LBI in OciBindByName and got the same error message.
Another little but important mistake in my first post:
i cannot change the other application that use the same table.
Thanks 
Aldo


Previous Comments:


[2006-04-12 19:25:06] [EMAIL PROTECTED]

Fixed in 5.1 and HEAD.

You should use:
OCIBindByName ( $stmt, ":fileimage", $fileimage, -1, SQL_LBI);

And also note this:
ociexecute($stmt, $OCI_DEFAULT); <-- OCI_DEFAULT is not a variable,
it's a constant.

----

[2006-04-12 16:00:34] a dot vigetti at provincia dot grosseto dot it

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:



When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function
all is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 







-- 
Edit this bug report at http://bugs.php.net/?id=37059&edit=1


#37059 [NEW]: can't insert al long raw column with php oci8

2006-04-12 Thread a dot vigetti at provincia dot grosseto dot it
From: a dot vigetti at provincia dot grosseto dot it
Operating system: debian linux  2.6.12-1-686-smp
PHP version:  5.1.2
PHP Bug Type: OCI8 related
Bug description:  can't insert al long raw column with php oci8 

Description:

Oracle library version 10G R2.
I need to insert into an oracle table with a long raw,
i can't change the column type because another application use the same
table and i can change the application.
I experinced the same problem with other version of php/oci libs/Oracle
database.


Reproduce code:
---
This is a small code example that fails:



When i try this script i obtain the following error:
Warning: ociexecute(): ORA-01461: can bind a LONG value only for insert
into a LONG column in /LongRow.php on line 13

Using a column of type LONG and storing data with the bin2hex function all
is OK.
Its a php or OCI problem?
I try a similar script in perl using DBD::Oracle on the same machine
linked with the same OCI libs without problems.

thanks
Aldo Vigetti 



-- 
Edit bug report at http://bugs.php.net/?id=37059&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37059&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=37059&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37059&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37059&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=37059&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=37059&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=37059&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=37059&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=37059&r=support
Expected behavior:http://bugs.php.net/fix.php?id=37059&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=37059&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=37059&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37059&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37059&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37059&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=37059&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=37059&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37059&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=37059&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=37059&r=mysqlcfg