Foros del Web » Programando para Internet » PHP »

Problemas con gestor de formularios

Estas en el tema de Problemas con gestor de formularios en el foro de PHP en Foros del Web. Hola amigos Tengo un problema con un gestor de formularios que me da los siguientes errores: Cuando entro en mi panel de control me sale ...
  #1 (permalink)  
Antiguo 18/11/2013, 07:51
 
Fecha de Ingreso: septiembre-2007
Mensajes: 50
Antigüedad: 16 años, 7 meses
Puntos: 0
Problemas con gestor de formularios

Hola amigos
Tengo un problema con un gestor de formularios que me da los siguientes errores:

Cuando entro en mi panel de control me sale el siguiente error:

Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/includes/helper-functions.php on line 38

El archivo helper-functions.php on line 38 es:

else { // not february
// check to see if the month has 30/31 days in it
if ($month == "04" or
$month == "06" or
$month == "09" or
$month == "11")
$month_in_seconds = 2592000; // 30 day month
else $month_in_seconds = 2678400; // 31 day month;
}

$in_seconds = strtotime(substr($posted_date,0,8).' '.
substr($posted_date,8,2).':'.
substr($posted_date,10,2).':'.
substr($posted_date,12,2));
$diff = time() - ($in_seconds + ($tz*3600));
$months = floor($diff/$month_in_seconds);
$diff -= $months*2419200;
$weeks = floor($diff/604800);
$diff -= $weeks*604800;
$days = floor($diff/86400);
$diff -= $days*86400;
$hours = floor($diff/3600);
$diff -= $hours*3600;
$minutes = floor($diff/60);
$diff -= $minutes*60;
$seconds = $diff;

Una vez que he rellenado el formulario y le envío, me da los siguientes errores:

Error 1

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/includes/post-functions.php on line 968

El archivo post-functions.php on line 968 es:

//insert ip address and date created
$table_data['ip_address'] = $user_ip_address;
$table_data['date_created'] = date("Y-m-d H:i:s");

$is_inserted = false;

Error 2

Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/lib/class.phpmailer.php on line 1598

El archivo class.phpmailer.php on line 1598 es:

* Returns the proper RFC 822 formatted date.
* @access private
* @return string
*/
function RFCDate() {
$tz = date('Z');
$tzs = ($tz < 0) ? '-' : '+';
$tz = abs($tz);
$tz = (int)($tz/3600)*100 + ($tz%3600)/60;
$result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);

return $result;
}

Error 3

Warning: Cannot modify header information - headers already sent by (output started at /homepages/31/d276533602/htdocs/teahorrogastos.es/machform/includes/post-functions.php:968) in/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/embed.php on line 42

El archivo embed.php on line 42 es:

header("Location: http{$ssl_suffix}://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?id={$input_array['form_id']}&done=1");
exit;
}else{
echo "<script type=\"text/javascript\">top.location = '{$submit_result['form_redirect']}'</script>";
exit;
}
}else


Os agradecería que me digais qué debo cambiar porque no tengo ni idea de programación

Gracias anticipadas
  #2 (permalink)  
Antiguo 18/11/2013, 14:09
Avatar de temaqueja  
Fecha de Ingreso: agosto-2002
Ubicación: /dev/null/
Mensajes: 399
Antigüedad: 21 años, 8 meses
Puntos: 4
Respuesta: Problemas con gestor de formularios

Tienes dos posibilidades a elegir:

* configurar el time zone o colocar previamente el llamado a la función date_default_timezone_set(), miralo en el manual de php.

* desactivar e_strict de los mensajes de error configurados en el archivo php.ini (usa la función phpinfo(); para saber donde está ubicado el archivo).

Si estás aprendiendo te conviene revisar lo primero y si quieres solución y punto te conviene lo segundo.
__________________
_________________________
La computadora nació para resolver problemas que antes no existían
  #3 (permalink)  
Antiguo 20/11/2013, 12:40
 
Fecha de Ingreso: septiembre-2007
Mensajes: 50
Antigüedad: 16 años, 7 meses
Puntos: 0
Respuesta: Problemas con gestor de formularios

El hosting lo tengo en 1and1 y me han dicho que puedo crear mi propio archivo php.ini

Así lo he hecho, he creado el archivo php.ini con el bloc de notas y lo he subido dentro de mi carpeta de dominio.

En el archivo php.ini he puesto:

date.timezone = Europe/Madrid


También he subido un archivo con la función phpinfo(); y he comprobado que los cambios se habían realizado en date.timezone

Pero todo sigue igual y sigo con los mismos errores
  #4 (permalink)  
Antiguo 20/11/2013, 13:29
Avatar de temaqueja  
Fecha de Ingreso: agosto-2002
Ubicación: /dev/null/
Mensajes: 399
Antigüedad: 21 años, 8 meses
Puntos: 4
Respuesta: Problemas con gestor de formularios

Me cito a mi mismo :
Cita:
Iniciado por temaqueja Ver Mensaje
Tienes dos posibilidades a elegir:
...
* desactivar e_strict de los mensajes de error configurados en el archivo php.ini (usa la función phpinfo(); para saber donde está ubicado el archivo).
...
Asi que siempre puedes ocultar el mensaje strict con error_reporting o en tu php.ini:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
__________________
_________________________
La computadora nació para resolver problemas que antes no existían
  #5 (permalink)  
Antiguo 25/11/2013, 04:12
 
Fecha de Ingreso: septiembre-2007
Mensajes: 50
Antigüedad: 16 años, 7 meses
Puntos: 0
Respuesta: Problemas con gestor de formularios

Muchas gracias Temaqueja.

He logrado solucionar el problema en parte, desactivando los errores según me indicabas.
Ahora el formulario funciona correctamente, pero el problema viene al recoger los datos en la base de datos, en un hoja de Excel, ya que me salen muchos símbolos rarísimos y me da varios errores que expongo a continuación, con los archivos y la línea la que hace referencia:

ERROR 1

<b>Strict Standards</b>: Non-static method OLE::Asc2Ucs() should not be called statically, assuming $this from incompatible context in <b>/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/lib/pear/Spreadsheet/Excel/Writer/Workbook.php</b> on line <b>586</b><br />

El archivo Workbook.php</b> on line <b>586 es:
$OLE = new OLE_PPS_File(OLE::Asc2Ucs('Book'));

ERROR 2

<b>Strict Standards</b>: Non-static method OLE::Asc2Ucs() should not be called statically, assuming $this from incompatible context in <b>/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/lib/pear/OLE/PPS/Root.php</b> on line <b>52</b><br />

El archivo Root.php</b> on line <b>52 es:
OLE::Asc2Ucs('Root Entry')

ERROR 3

<b>Strict Standards</b>: Non-static method OLE::LocalDate2OLE() should not be called statically, assuming $this from incompatible context in <b>/homepages/31/d276533602/htdocs/teahorrogastos.es/machform/lib/pear/OLE/PPS.php</b> on line <b>186</b><br />

El archivo PPS.php</b> on line <b>186 es:
. OLE::LocalDate2OLE($this->Time1st) // 108
. OLE::LocalDate2OLE($this->Time2nd) // 116



Saludos

Etiquetas: formulario, formularios, gestor, select
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 02:15.