ID: 41089
Updated by: [EMAIL PROTECTED]
Reported By: bbarnettm at hotmail dot com
-Status: Open
+Status: Feedback
-Bug Type: *General Issues
+Bug Type: Unknown/Other Function
Operating System: Windows XP SP 2
PHP Version: 5.2.2RC1
New Comment:
Please provide a SHORT (20 lines max) but complete reproduce script, so
that we can copy/paste it and reproduce the problem ourselves.
Previous Comments:
------------------------------------------------------------------------
[2007-04-15 03:51:09] bbarnettm at hotmail dot com
For the documentation of this report, I'm incluiding a piece of the
code of my common.php.
Remember that the complete code has more than 1600 lines.
Thanks for your help
<?php
// inicia sesion
session_start();
session_name('wakeup');
if (!isset($_SESSION['bases_mdb'])){
// Carga el dirección de la Base de Datos
$_SESSION['bases_mdb'] = dirname(getenv("ORIG_PATH_TRANSLATED"));
}
// Define varibles globales
global $frmaccion ;
global $datosusuario ;
$frmaccion = 'Limpia';
$datosusuario ='';
// Define las variables globales para la activacion o desactivacion de
los botones del toolbar
unset($botonactualiza);
unset($botonborra);
global $botonactualiza ;
global $botonborra ;
$botonactualiza='0' ;
$botonborra = '0';
// Variable utilizada para la conexion a la base de datos
$conn = false; // utilizada para la administracion
$conndocs = false; // utilizada para los documentos
$conninv = false; // utilizada para el Inventario
// Captura de la informacion del usuario registrado
if ((! isset($_SESSION[ 'connection' ])) )
pof_blanksession();
if (isset($_REQUEST[ 'connection' ]))
if (is_array($_REQUEST[ 'connection' ]))
{ pof_blanksession();
if (isset($_REQUEST[ 'connection' ][ 'user' ]))
$_SESSION[ 'connection' ][ 'user' ] =
substr(trim(preg_replace('/[^a-zA-Z0-9_-]/', '', $_REQUEST[ 'connection'
][ 'user' ])), 0, 30);
if (isset($_REQUEST[ 'connection' ][ 'password' ]))
$_SESSION[ 'connection' ][ 'password' ] = substr(trim($_REQUEST[
'connection' ][ 'password' ]), 0, 30);
}
//if ($_SERVER['SCRIPT_NAME']!=='/default.php') {echo
$_SERVER['SCRIPT_NAME']; }
/*
************************************************************************
Funciones para la administracion de las sesiones y manejo de usuarios
************************************************************************
*/
function v_session(){
// Devuelve a la pantalla de login en caso que el usuario no se halla
autenticado
if ($_SESSION[ 'connection' ][ 'user' ]=='noexiste'){
header("Location: ../default.php",false); /* Redirigir al navegador
*/
}
}
function v_user($username,$password,$servicio)
{
// Valida que la información del usuario posea las características
mínimas de seguridad
// Esta es una validación para la pantalla inicial únicamente
//<!-- start error detection -->
global $passwordsize ;
global $idioma;
$errors=0;
$mensaje3='';
$found_error='';
if (empty($username)) //<!-- Valida que el usuario no este en blanco
-->
{$valor=texto('0100',$idioma);
$found_error=$valor['TEXTO'].'\\n'; $errors++;}
if (empty($password)) //<!-- Valida que la contraseña no este en blanco
-->
{$valor=texto('0103',$idioma);
$found_error.=$valor['TEXTO'].'\\n'; $errors++;}
if (strlen($password)<$passwordsize) //<!-- Valida que el usuario no
este en blanco -->
{$valor=texto('0104',$idioma);
$valor1=texto('0102',$idioma);
$found_error.=$valor['TEXTO'].' '.$passwordsize.'
'.$valor1['TEXTO'].'\\n'; $errors++;}
if ($errors > 0)
{
return $found_error;
//errormsg();
//header("Location: ../contenido.php?errorfound=".$found_error,false);
/* Redirigir al navegador */
}
return '0';
//<!-- end error detection -->
}
------------------------------------------------------------------------
[2007-04-15 03:45:11] bbarnettm at hotmail dot com
I sent you the complete files to your email, because like I wrote you
the file it's very long.
------------------------------------------------------------------------
[2007-04-15 03:38:49] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2007-04-15 01:14:53] bbarnettm at hotmail dot com
I forget to wrote that I'm using MS ACCESS for my data
------------------------------------------------------------------------
[2007-04-15 01:09:51] bbarnettm at hotmail dot com
Description:
------------
I was using version 5.1.6 without any problem, but when upgrade to
5.2.2 downloaded from the snap site I recieve the next error message,
when I try to execute any of my developed sites:
Parse error: syntax error, unexpected $end in
D:\sistemas\Inventario\common\common.php on line 1676
This situation is for all my sites:
Enviroment:
P4 3.2 ghz
512 RAM
wxp sp 2
apache 2.0.59
This is an emergency for me, because I need to present the site the
next week. HELP ME.
I cann't include the code because like you read, the problem is in my
common functions script and it has more than 1600 lines. If you give me
an e-mail I would can send it you
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41089&edit=1