Problemas con gestor de formularios

Hola
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
Te
agradecería que me digas de forma clara qué tengo que hacer porque no tengo ni
idea de programación.
Gracias
anticipadas

1 Respuesta

Respuesta
1

Casualmente hace un tiempo expliqué como solucionar estos problemas, puedes pasarte por aquí para resolverlo

<a>http://www.vichaunter.com/como-se-hace/como-solucionar-warningit-safe-rely-systems-timezone-settings-en-php</a>

Y si quieres estar al tanto de cualquier otra solución puedes hacer like y seguirme.

Hola Vichaunter

Antes de nada agradecerte tu respuesta.

El hosting lo tengo en 1and1.es y me han dicho que puedo crear mi propio archivo php.ini<br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" />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.<br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" /><br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" />En el archivo php.ini he puesto:<br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" /><br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" />date.timezone = Europe/Madrid<br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" /><br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" /><br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" />También he subido un archivo con la función phpinfo(); y he comprobado que los cambios se habían realizado en date.timezone<br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" /><br style="color: #1a1a1a; font-family: 'Lucida Sans Unicode', 'Lucida Sans', 'Lucida Grande', Malayalam, Verdana, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #fdfdfd;" />Pero todo sigue igual y sigo con los mismos errores

Saludos

Debe ser alguna limitación de 1and1 por que yo gestiono servidores linux (todo tipo de máquinas instalaciones y versiones de linux) y no he encontrado ningún problema.

Para que los cambios tengan efecto hay que reiniciar apache o el servidor de páginas web que tengas instalado que supongo que has hecho si sale en el phpinfo.

Deberías ponerte en contacto con ellos ya que quizás la función que te da el error se basan en el php.ini del sistema y no en los virtuales.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas