ID:               45497
 Updated by:       [EMAIL PROTECTED]
 Reported By:      teju_baba at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Solaris 10
 PHP Version:      5.2.6
-Assigned To:      
+Assigned To:      sixd
 New Comment:

Can you email me CREATE TABLE and example (not real data) INSERT
statements so I have the same values as you?  Also let me know your
NLS_LANG or other globalization settings, and exact DB version.


Previous Comments:
------------------------------------------------------------------------

[2008-07-13 07:54:27] teju_baba at hotmail dot com

Here is another example:
$query="select catalogue_id, accession_no, negative_no,
collection_title, subject, caption, medium, source, source_address,
source_contact_person, location, shelf_no, image_no, access_code,
photocd_id, photocd_no, accession_condition, remark, owner, status,
changed_by, search_field, access_id, old_accession_no, image_link,
external_source, cat_remarks from PC_CATALOGUE where
CATALOGUE_ID='0000289713'";

Actual Result overflows on search_field and results in garbage for the
following fields:

Array
(
[CATALOGUE_ID] => 0000289713
[ACCESSION_NO] => 0
[NEGATIVE_NO] => S128961
[COLLECTION_TITLE] =>
[SUBJECT] => CONSTITUENCIES (VISIT, MEET PEOPLE SESSION, ETC)
[CAPTION] => COMMUNICATIONS AND LABOUR MINISTER ONG TENG CHEONG TOURING
AYER RAJAH CONSTITUENCY [GROUP DESCRIPTION BY EVENT FROM TRANSFERRING
AGENCY]
[MEDIUM] => PCD
[SOURCE] => MINISTRY OF INFORMATION AND THE ARTS (MITA)
[SOURCE_ADDRESS] =>
[SOURCE_CONTACT_PERSON] =>
[LOCATION] =>
[SHELF_NO] =>
[IMAGE_NO] => 0044
[ACCESS_CODE] => B
[PHOTOCD_ID] => 8262-3202-1062
[PHOTOCD_NO] => 19980006698
[ACCESSION_CONDITION] =>
[REMARK] =>
[OWNER] => CD IMAGING
[STATUS] => 0
[CHANGED_BY] => CD IMAGING
[SEARCH_FIELD] => C
[ACCESS_ID] => MMUNICATIONS AND LAB
[OLD_ACCESSION_NO] =>
-10301922162169333218341928211728222369351200000000000000000000
[IMAGE_LINK] => EVENT FROM TRANSFERRING AGENCY] CONSTITUENCIES (VISIT,
MEET PEOPLE
[EXTERNAL_SOURCE] => SESSION, ETC) MINISTRY OF INFORM
[CAT_REMARKS] =>)

------------------------------------------------------------------------

[2008-07-13 07:49:55] teju_baba at hotmail dot com

Description:
------------
Client: Solaris 10 / Sparc
PHP 5.2.3 / 5.2.5 / 5.2.6 
OCI 1.2.3 / 1.3.3
Instant Client: 10.1
Oracle 10g Enterprise Edition: 10.1.0.3

TABLE AGENCY SCHEMA
AGENCY_ID NUMBER, AGENCY_NAME VARCHAR2(60), AGENCY_TYPE VARCHAR2(1) ,
AGENCY_ABBR VARCHAR2(10) , ADMIN_HIST VARCHAR2(2000),
DATE_UPDATED DATE 

A simple query like select * from agency where agency_id=40 produces an
overflow at either oci_execute() or oci_fetch_assoc()

Result is garbage for ADMIN_HIST and overflows on to DATE_UPDATED.

For similar queries, the query may or may not return a row.
Say: select * from agency where agency_id=54 returns NULL when there is
valid data.




Reproduce code:
---------------
$conn = oci_connect('user', 'pwd', '//10.203.2.14/db');
$query="select * from agency where agency_id=40";
$stid = oci_parse($conn, $query);
$r = oci_execute($stid, OCI_DEFAULT);
while ($row = oci_fetch_assoc($stid)) { 
print_r($row);
}
oci_close($conn);

Expected result:
----------------
xl*
[DATE_UPDATED] => 00-DECEMBER-00

the words xl * are garbage characters
the DATE_UPDATED is invalid (actual date is: 11-APR-08)





Actual result:
--------------
Array
(
[AGENCY_ID] => 40
[AGENCY_NAME] => City Council
[AGENCY_TYPE] => A
[AGENCY_ABBR] => CC
[ADMIN_HIST] => The Municipal Council became known as the City Council
on 22 September 1951. The City Council, the local authority within the
city area, consisted of a President appointed by the Governor-in-Council
and 27 members of whom 18 were elected.

The City Council enjoyed a wide measure of autonomy in matters placed
under its control by the Municipal Ordinance and was empowered to make
by-laws but was subjected to certain safeguards. The detailed execution
of City Council policies was undertaken by specialised departments
concerned with health, water, electricity and so forth.

Under the Local Government Ordinance of 1957, the administration of the
city area for all local government purposes was the responsibility of a
City Council of 32 elected Councillors.In July 1959, the government
absorbed the City Council into the central government and most of its
functions were transferred to the Ministry of National Development.xl*
[DATE_UPDATED] => 00-DECEMBER-00
)



------------------------------------------------------------------------


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

Reply via email to