PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > problem using FPDF
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
problem using FPDF

Réponse
 
LinkBack Outils de la discussion
Vieux 15/02/2008, 16h01   #1
sahm
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut problem using FPDF

Hi every one
I'm trying to use fpdf
but when I use the first Tutorials in http://www.fpdf.org/
this error massage is show
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Strict Standards: date() [function.date]: It is not safe to rely on
the system's timezone settings.
Please use the date.timezone setting, the TZ environment variable 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/Moscow' for '3.0/no DST' instead in C:\AppServ\www
\try\fpdf153\fpdf.php on line 1363

Warning: Cannot modify header information - headers already sent by
(output started at C:\AppServ\www\try\fpdf153\fpdf.php:1363) in
C:\AppServ\www\try\fpdf153\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send
PDF file
//////////////////////////////

Best
Salim
  Réponse avec citation
Vieux 15/02/2008, 16h09   #2
Willem Bogaerts
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: problem using FPDF

> Strict Standards: date() [function.date]: It is not safe to rely on
> the system's timezone settings.
> Please use the date.timezone setting, the TZ environment variable 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/Moscow' for '3.0/no DST' instead in C:\AppServ\www
> \try\fpdf153\fpdf.php on line 1363


Edit that line and put a drop-dead sign (@) in front of it. It will keep
quiet.

Regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
  Réponse avec citation
Vieux 17/02/2008, 12h09   #3
Ulf Kadner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: problem using FPDF

Willem Bogaerts wrote:

>> Please use the date.timezone setting, the TZ environment variable 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/Moscow' for '3.0/no DST' instead in C:\AppServ\www
>> \try\fpdf153\fpdf.php on line 1363

>
> Edit that line and put a drop-dead sign (@) in front of it. It will keep
> quiet.


Bad man. Very bad! Thats for real not a acceptable solution.

Simple adding this code will point him to a better solution:

date_default_timezone_set('Europe/Moscow');

He must place it before hes including the fpdf-Lib, oor better hes
setting date.timezone within php.ini to the value.

A php error notice is not a joke and must be also handled by a correct way.

So long, Ulf
  Réponse avec citation
Vieux 17/02/2008, 13h48   #4
Dikkie Dik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: problem using FPDF

>> Edit that line and put a drop-dead sign (@) in front of it. It will keep
>> quiet.

>
> Bad man. Very bad! Thats for real not a acceptable solution.
>
> Simple adding this code will point him to a better solution:
>
> date_default_timezone_set('Europe/Moscow');



So what's the difference? That is relying on a setting which is not bad
anyway. If I explicitly want to pass a time zone, I do so. If I want to
configure a different one, I do so as well. The date function just
should not fail for perfectly ordinary requests. So alas all date
functions have to be silenced. That is the bug. Not the fact that I am
relying on something perfectly harmless.

Regards,
Dikkie
  Réponse avec citation
Vieux 17/02/2008, 14h34   #5
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: problem using FPDF

Dikkie Dik wrote:
>>> Edit that line and put a drop-dead sign (@) in front of it. It will keep
>>> quiet.

>>
>> Bad man. Very bad! Thats for real not a acceptable solution.
>>
>> Simple adding this code will point him to a better solution:
>>
>> date_default_timezone_set('Europe/Moscow');

>
>
> So what's the difference? That is relying on a setting which is not bad
> anyway. If I explicitly want to pass a time zone, I do so. If I want to
> configure a different one, I do so as well. The date function just
> should not fail for perfectly ordinary requests. So alas all date
> functions have to be silenced. That is the bug. Not the fact that I am
> relying on something perfectly harmless.
>
> Regards,
> Dikkie
>


Ulf is correct. Adding the '@' is just hiding a problem. It's better
to fix the problem.

The warnings are real and important. The bug is that you're relying on
something which is not reliable. If you want to use the date functions,
you need a valid time zone.



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h38.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09722 seconds with 13 queries