Foros del Web » Programando para Internet » PHP »

Error en formulario

Estas en el tema de Error en formulario en el foro de PHP en Foros del Web. Hola a todos, he probado el formulario en mi servidor y me va correcto, pero al subirlo al servidor del cliente me da este problema: ...
  #1 (permalink)  
Antiguo 21/05/2010, 02:28
 
Fecha de Ingreso: marzo-2009
Ubicación: España
Mensajes: 371
Antigüedad: 15 años
Puntos: 5
Error en formulario

Hola a todos, he probado el formulario en mi servidor y me va correcto, pero al subirlo al servidor del cliente me da este problema:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or

El código sería este:

Código PHP:
<?php
class PHPMailer {

  
/////////////////////////////////////////////////
  // PROPERTIES, PUBLIC
  /////////////////////////////////////////////////

  /**
   * Email priority (1 = High, 3 = Normal, 5 = low).
   * @var int
   */
  
public $Priority          3;

  
/**
   * Sets the CharSet of the message.
   * @var string
   */
  
public $CharSet           'iso-8859-1';

  
/**
   * Sets the Content-type of the message.
   * @var string
   */
  
public $ContentType       'text/plain';

  
/**
   * Sets the Encoding of the message. Options for this are "8bit",
   * "7bit", "binary", "base64", and "quoted-printable".
   * @var string
   */
  
public $Encoding          '8bit';

  
/**
   * Holds the most recent mailer error message.
   * @var string
   */
  
public $ErrorInfo         '';

  
/**
   * Sets the From email address for the message.
   * @var string
   */
  
public $From              'root@localhost';

  
/**
   * Sets the From name of the message.
   * @var string
   */
  
public $FromName          'Root User';

  
/**
   * Sets the Sender email (Return-Path) of the message.  If not empty,
   * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
   * @var string
   */
  
public $Sender            '';

  
/**
   * Sets the Subject of the message.
   * @var string
   */
  
public $Subject           '';

  
/**
   * Sets the Body of the message.  This can be either an HTML or text body.
   * If HTML then run IsHTML(true).
   * @var string
   */
  
public $Body              '';

  
/**
   * Sets the text-only body of the message.  This automatically sets the
   * email to multipart/alternative.  This body can be read by mail
   * clients that do not have HTML email capability such as mutt. Clients
   * that can read HTML will view the normal Body.
   * @var string
   */
  
public $AltBody           '';

?>
Este es solo un trozo de la parte donde da el error.

Espero vuestra ayuda. Un saludo.
  #2 (permalink)  
Antiguo 21/05/2010, 02:33
 
Fecha de Ingreso: marzo-2009
Ubicación: España
Mensajes: 371
Antigüedad: 15 años
Puntos: 5
Respuesta: Error en formulario

Acabo de darme cuenta de que el servidor del cliente tiene php v4.3.9 por lo que creo que ese es el problema.

Me podéis afirmar si es cierto lo que pienso?

Un saludo.
  #3 (permalink)  
Antiguo 21/05/2010, 08:40
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Respuesta: Error en formulario

Si tiene PHP v4, entonces sí es el problema, ya que tu código esta hecho para PHP5.

Saludos.
  #4 (permalink)  
Antiguo 21/05/2010, 10:03
 
Fecha de Ingreso: marzo-2009
Ubicación: España
Mensajes: 371
Antigüedad: 15 años
Puntos: 5
Respuesta: Error en formulario

Gracias GatorV, es lo que me imaginé, ya les comenté a los de piensasolutions.com que lo actualicen ya, que el cliente está pagando un server que ellos dicen tener php5, pero esta gente siempre el mismo problema.

Un saludo.

Etiquetas: formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:19.