#38501 [Opn->Fbk]: Cann't view blob documents storage in oracle database 9i r2
| From: | tony2001@php.net | Date: | Fri, 18 Aug 2006 13:59:32 +0000 |
| Subject: | #38501 [Opn->Fbk]: Cann't view blob documents storage in oracle database 9i r2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100961@lists.php.net to get a copy of this message | ||
ID: 38501
Updated by: tony2001@php.net
Reported By: bbarnett at fomuvel dot com
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: Windows XP SP2
PHP Version: 5.1.5
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2006-08-18 13:57:23] 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);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38501&edit=1