Re: php help, please....

2010-06-14 Thread Ivan Voras
On 06/12/10 20:47, Gary Kline wrote:

  but it
  seems strange that php would simply =change= out from under
  me.  well, so to speak.  can you suggest any php list that i
  should sub to?  

Unfortunately they do it all the time - every sub-release and especially
major releases can be relied upon to have subtle changes.

Client-side PHP code bit-rots due to this on its own, with nothing being
changed anywhere but in the interpreter.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


php help, please....

2010-06-12 Thread Gary Kline

a few days ago i got my webserver working.. late last night i
found the following error on my http://www.thought.org page:


Warning: date() [function.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 'America/Los_Angeles' for
'PDT/-7.0/DST' instead in
/usr/local/www/apache22/data/randmeditations.php on line 6
  

  as an example of my use of date() is

  $hour = date(H);


can anybody 'splain what suddenly went wrong with my two-year-old 
php script?

gary

ps: FWIW: I am pulling this part from my home page today.  i
figure every 18-30 months pages need updating.  but would shore
like to know wha' happened 



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
The 7.83a release of Jottings: http://jottings.thought.org/index.php
   http://journey.thought.org  99 44/100% Guaranteed Novel

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: php help, please....

2010-06-12 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/06/2010 18:26:42, Gary Kline wrote:
 can anybody 'splain what suddenly went wrong with my two-year-old 
 php script?

Simple.  You upgraded to php-5.3.x.  This is a well known gotcha --
php-5.3.x needs to have the timezone set explicitly in
/usr/local/etc/php.ini.  If you haven't got a php.ini, then just copy
one of the sample files, php.ini-production for preference, and edit it
like so (although your timezone is almost certainly not Europe/London,
so substitute accordingly):

% diff -u php.ini-production php.ini
- --- php.ini-production2010-05-31 10:03:32.0 +0100
+++ php.ini 2010-04-27 15:53:52.0 +0100
@@ -1002,7 +1002,7 @@
 [Date]
 ; Defines the default timezone used by the date functions
 ; http://php.net/date.timezone
- -;date.timezone =
+date.timezone = Europe/London

 ; http://php.net/date.default-latitude
 ;date.default_latitude = 31.7667

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwTyKAACgkQ8Mjk52CukIzCegCaAgFCmpJewNjbJJrslNdHGdyq
/fgAnjoCsVwUK/koPT7TzrM26UsXgro3
=06OP
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: php help, please....

2010-06-12 Thread Gary Kline
On Sat, Jun 12, 2010 at 06:49:20PM +0100, Matthew Seaman wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 12/06/2010 18:26:42, Gary Kline wrote:
  can anybody 'splain what suddenly went wrong with my two-year-old 
  php script?
 
 Simple.  You upgraded to php-5.3.x.  This is a well known gotcha --
 php-5.3.x needs to have the timezone set explicitly in
 /usr/local/etc/php.ini.  If you haven't got a php.ini, then just copy
 one of the sample files, php.ini-production for preference, and edit it
 like so (although your timezone is almost certainly not Europe/London,
 so substitute accordingly):
 
 % diff -u php.ini-production php.ini
 - --- php.ini-production  2010-05-31 10:03:32.0 +0100
 +++ php.ini   2010-04-27 15:53:52.0 +0100
 @@ -1002,7 +1002,7 @@
  [Date]
  ; Defines the default timezone used by the date functions
  ; http://php.net/date.timezone
 - -;date.timezone =
 +date.timezone = Europe/London
 
  ; http://php.net/date.default-latitude
  ;date.default_latitude = 31.7667
 
   Cheers,
 
   Matthew



here's what is in my /usr/local/etc/php.ini file as of
moments ago:


[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Los_Angeles


i hit reload on my broswer and still get the err from date.
the first date is $week = date(w); [[[i think!]]]


then, i tried [again] what Robert suggested, and my problems
vanished.  thanks to you both.

$day = date_default_timezone_set(w);
$hour = date_default_timezone_set(H);
$minutes = date_default_timezone_set(i);
$seconds = date_default_timezone_set(s);


back to my re-editing about my cover artist, one Mr Kalin
pretty soon.  once i've cleaned up my home/homepage!, but it
seems strange that php would simply =change= out from under
me.  well, so to speak.  can you suggest any php list that i
should sub to?  i don't always click around to read the
latest and greatest about lang changes.  or fashions and
trends, :_) LOL, but i do my best to read of this kind of
change.  so any list suggestion would be indeed welcome.

gary,

[jack of N trades and maste r of -1. ]

 
 - -- 
 Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
   Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAkwTyKAACgkQ8Mjk52CukIzCegCaAgFCmpJewNjbJJrslNdHGdyq
 /fgAnjoCsVwUK/koPT7TzrM26UsXgro3
 =06OP
 -END PGP SIGNATURE-

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
The 7.83a release of Jottings: http://jottings.thought.org/index.php
   http://journey.thought.org  99 44/100% Guaranteed Novel

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org