0

Possible Duplicate:
How to fix PHP errors related to timezone (function.strtotime and function.date)

I installed PhpDocumentor-1.4.0a2.tgz which is the latest version on CentOS 5.7 64, my current lamp installation is with php 5.3.3

I am using

pear install phpDocumentor-alpha

after installing it the following is shown:

Warning: 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 'America/New_York' for 'EDT/-4.0/DST' instead in PEAR/Validate.php on line 454 and 486

I know this error has to do with the version of php, and 5.3 is not compatible with PEAR.
I did not mind because the instalation process gave me an ok.

The I tried to generate the documentation, it is not being completed for some reason.

$ phpdoc -c /usr/share/pear/data/PhpDocumentor/user/bigstep.ini 

PHP Warning: strftime(): 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 'America/New_York' for 'EDT/-4.0/DST' instead in /usr/share/pear/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/Smarty_Compiler.class.php on line 370

It is a php warning that should not be stoping the documentation generation. But, the process gets in the middle, and at the end does not generate the files.

it seems that I have to check on those libraries myself. Does anyone have seen this error before, what should I try next to resolve this issue

Community
  • 1
  • 1
  • You should probably **read the error message** it has nothing to do with pear being incompatible with php 5.3 (which isn't true) and everything to do with using date functions without setting the _required_ `date.timezone` setting. – AD7six May 31 '12 at 12:57
  • Not working is not a good way to word your questions title. What you see is a configuration issue, I'll try to find an existing questions that elaborates more in this. And as @AD7six wrote, PEAR is compatible with PHP 5.3, at least a recent version is. – hakre May 31 '12 at 12:57
  • Possible duplicate of [How to fix PHP errors related to timezone (function.strtotime and function.date)](http://stackoverflow.com/questions/8811603/how-to-fix-php-errors-related-to-timezone-function-strtotime-and-function-date), [PHP Configuration: It is not safe to rely on the system's timezone settings](http://stackoverflow.com/questions/2213608/php-configuration-it-is-not-safe-to-rely-on-the-systems-timezone-settings) – hakre May 31 '12 at 13:00

1 Answers1

0

Set the timezone in your php.ini

Pethical
  • 1,472
  • 11
  • 18
  • This answer would benefit from more detail if you have time. – Sven Viking Mar 29 '22 at 00:40
  • 1
    The details are in the question. :) _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._ So, because is not safe to rely on the system's timezone settings, you should set the date.timezone entry in you php.ini if you want to get rid of this warning. – Pethical Mar 30 '22 at 07:16