php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41089 End the execution of my scripts
Submitted: 2007-04-15 01:09 UTC Modified: 2007-04-21 14:12 UTC
From: bbarnettm at hotmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.2RC1 OS: Windows XP SP 2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bbarnettm at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-04-15 01:09 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-15 01:14 UTC] bbarnettm at hotmail dot com
I forget to wrote that I'm using MS ACCESS for my data
 [2007-04-15 03:38 UTC] scottmac@php.net
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 03:45 UTC] 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:51 UTC] 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-16 09:13 UTC] tony2001@php.net
Please provide a SHORT (20 lines max) but complete reproduce script, so that we can copy/paste it and reproduce the problem ourselves.
 [2007-04-16 23:33 UTC] bbarnettm at hotmail dot com
Like I wrote you the problem is with my functions file, that have more than 1600 lines. 

I don't have problem with the version 5.1.6 but when I installed the new version my problems began.

The error, like I wrote is in that file (common.php) and the variable $end doesn't exist.

If you give me some e-mail for send you the complete code I can send you.

Please help with this because if I cann't resolve it, my boss will exclude PHP of the autorized develop languajes in my company.

Thank you.
 [2007-04-17 00:20 UTC] scottmac@php.net
The bugs tracker is not a place to get support from, there are dedicated supports lists for that.

Unexpected $end usually means a missing brace in your code, if its only appearing when you upgrade then at a guess I think you could be using short tags in your code.

<? instead of <?php
 [2007-04-17 00:21 UTC] scottmac@php.net
.
 [2007-04-21 14:12 UTC] bbarnettm at hotmail dot com
Thank you very much. It work's
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 12:00:03 2025 UTC