php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38501 Cann't view blob documents storage in oracle database 9i r2
Submitted: 2006-08-18 13:57 UTC Modified: 2006-08-26 01:00 UTC
From: bbarnett at fomuvel dot com Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 5.1.5 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
35 - 5 = ?
Subscribe to this entry?

 
 [2006-08-18 13:57 UTC] bbarnett at fomuvel dot com
Description:
------------
I have installed in my develop machine the new version 5.1.5, but when I try to view a document storage in my oracle database send me the next message:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are

But in my production server using the version PHP Version 5.2.0RC2-dev I can see all the document.



Reproduce code:
---------------
// Obtiene el identificador del documento que se desea desplegar
$documentoview = $_REQUEST['documentoview'];

// Actualiza el contador de consultas y verifica que el documento exista
$consultas = "SELECT consultas FROM INTRA_DOCUMENTOS WHERE IDDOCUMENTO = ".$documentoview ;
$consultados = trs_consulta($consultas,$conn);
$consulta = oci_fetch_array($consultados,OCI_RETURN_NULLS);
if (!$consulta){
	// Devuelve a la pantalla de contenido si el documento buscado no existe
	header("Location: ../contenido.php",false); /* Redirigir al navegador */	
	}
$valor = $consulta[0]+1 ;
$actualiza = "update INTRA_DOCUMENTOS set consultas= consultas+1 where IDDOCUMENTO = ".$documentoview;
trs_consulta($actualiza,$conn);

// Inicia el despliegue del documento
$documentoview = $_REQUEST['documentoview'];
$query = 'SELECT DOCUMENTO,CONTENTTYPE FROM INTRA_DOCUMENTOS WHERE IDDOCUMENTO = :MYBLOBID';
$stmt = oci_parse ($conn, $query);
oci_bind_by_name($stmt, ':MYBLOBID', $documentoview);
oci_execute($stmt, OCI_DEFAULT);
$arr = oci_fetch_assoc($stmt);
$result = $arr['DOCUMENTO']->load();

header("Content-type:".$arr['CONTENTTYPE']);
echo $result;
 
oci_free_statement($stmt);
 
oci_close($conn);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-18 13:59 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-08-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC