php-general Digest 16 Nov 2011 12:13:49 -0000 Issue 7570

2011-11-16 Thread php-general-digest-help

php-general Digest 16 Nov 2011 12:13:49 - Issue 7570

Topics (messages 315704 through 315710):

Re: Think I found a PHP bug
315704 by: Jim Lucas

Re: Safari and PDF
315705 by: HallMarc Websites
315708 by: Tamara Temple
315709 by: Tim Streater
315710 by: HallMarc Websites

Re: Sniping on the List
315706 by: Shawn McKenzie
315707 by: Tamara Temple

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On 11/15/2011 2:58 PM, Tim Streater wrote:
 On 15 Nov 2011 at 22:34, Geoff Shang ge...@quitelikely.com wrote: 
 
 The bug is that if a server's timezone is set to Europe/London and you
 don't set an explicit timezone in your script, if it's winter time in
 the UK, PHP thinks the timezone is UTC instead of Europe/London.
 
 I find I need to do this:
 
   date_default_timezone_set (@date_default_timezone_get ());
 
 in all my scripts since 5.x.x to avoid rude messages.
 
 --
 Cheers  --  Tim
 
 

Also, I recalled something from the early 5.1.0 version that was related to the
introduction of the date_timezone_set() function.  So, from there I searched
Google for php changelog and found the changelog for php v5.  Then I searched
that document for 'date_' and found that under the 5.1.0 they added the above
function.  How it is stated, it makes me think that PHP now requires you to call
this function prior to any use of other date functions.  I cannot find anything
in the php manual confirming my last statement.  YMMV

1 http://us3.php.net/manual/en/function.date-timezone-set.php
2 http://php.net/ChangeLog-5.php#5.1.0

-- 
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

C - (541) 408-5189
O - (541) 323-9113
H - (541) 323-4219
---End Message---
---BeginMessage---
And in conclusion; sorry, I get uppity after a long day LOL. It's as I already 
thought; the answer is NO. So here is what I will do for any of you looking for 
an answer and stumbling across my slight rant, I will detect if it is Safari 
5.1.x and then just remove the view link and leave them with a download link 
only. Sucks if you ask me.

---End Message---
---BeginMessage---
On Tue, 15 Nov 2011 19:04:42 -0500, HallMarc Websites  
m...@hallmarcwebsites.com sent:

On the face of it, if you are writing a PHP application for others to use,
*forcing* a particular behaviour on them (on *their* own machine) is
probably not a good idea. Why not let the user deal with this as   
they see fit?

One can go way too far trying to ensure a uniform experience among users,
who may not even care what other users are experiencing. One size *never*
fits all.


On the face of it; Apple needs to stop mucking with what already   
works! The issue is this, Apple in all of its wonderful glory   
decided to drop support for pdf via the acrobat plugin. Didn't   
bother to tell anyone about this. You now need to use their Preview   
feature ONLY if you want to view a pdf in your browser. Otherwise   
you get nothing but a big white empty screen. No notice, no warning,  
 just a big white screen. Know what I've been getting from my   
clients? Grief! I'm the one writing the code for their site and   
since Apple can do no wrong it's me that must be the idiot.

[]

Sorry, just sick and tired of Apple trying to bring everything under  
 their tightly locked proprietary software mitts.


As to why do I want to do this... because it is better than telling   
my client that they need to give their clients instruction on how to  
 view something they have been comfortably using and viewing without  
 issue until recently.


Well, okay, I can understand how Apple changing how something works
affects things downstream if developers and subsequently end users
have to change the way they are doing something they have been used
to. As I never (ever!) downloaded the adobe acrobat reader software on
my mac, I never experienced this. As far as I know, when I get a PDF,
it's always downloaded and I view it in Preview or Skim.

The more cardinal point that the one I gave above about giving end
users choice is never force an end user to change how they do
something they're used to doing.

My point is also largely philosophical. On practicalities, one does
what one must.



--
Tamara Temple
   aka tamouse__

May you never see a stranger's face in the mirror

---End Message---
---BeginMessage---
On 16 Nov 2011 at 00:43, HallMarc Websites m...@hallmarcwebsites.com wrote: 

 And in conclusion; sorry, I get uppity after a long day LOL. It's as I already
 thought; the answer is NO. So here is what I will do for any of you looking
 for an answer and stumbling across my slight rant, I will detect if it is
 

php-general Digest 17 Nov 2011 01:14:42 -0000 Issue 7571

2011-11-16 Thread php-general-digest-help

php-general Digest 17 Nov 2011 01:14:42 - Issue 7571

Topics (messages 315711 through 315720):

Re: Safari and PDF
315711 by: Tim Streater
315714 by: Tommy Pham

Re: Sniping on the List
315712 by: Ashley Sheridan

{} forms
315713 by: Tim Streater
315715 by: Richard Quadling
315716 by: Tim Streater
315719 by: Robert Cummings

Re: Think I found a PHP bug
315717 by: Geoff Shang
315718 by: Geoff Shang

no regrets after doing this venture...
315720 by: Nirmalya Lahiri

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On 16 Nov 2011 at 12:13, HallMarc Websites m...@hallmarcwebsites.com wrote: 

 Seems strange that you are given a choice. My clients have been telling me
 that they are told to get the latest Acrobat Reader by Safari. Which they have
 done (again why allow a plugin that isn't supported get installed to begin
 with) only to be told the same exact thing the next time the click on a pdf.

Perhaps they just need to completely de-install the Acrobat plugin. When a PDF 
is in a Safari widow, there is a fade-in/fade-out
 type of array of things you can click on at the bottom of the window (not good 
UI, IMO, but there it is). You can choose to open in Preview, Save, or 
increase/decrease zoom. If you do nothing then the array fades out, but 
reappears if you mouse down there. As I say, I've not had, or needed, Acrobat 
Reader on a Mac for some 10 years. Trouble is, all these sites telling you to 
download this PDF and needs Acrobat Reader which is complete cock.

 Anyway, I realize this topic is now slightly off list.

True but I think you needed a rant :-)

--
Cheers  --  Tim
---End Message---
---BeginMessage---
On Wed, Nov 16, 2011 at 4:13 AM, HallMarc Websites
m...@hallmarcwebsites.com wrote:
 Seems strange that you are given a choice. My clients have been telling me 
 that they are told to get the latest Acrobat Reader by Safari. Which they 
 have done (again why allow a plugin that isn't supported get installed to 
 begin with) only to be told the same exact thing the next time the click on a 
 pdf. Anyway, I realize this topic is now slightly off list.



Perhaps their system administrator / tech support person doesn't know
any better about what's available in OS X and decided to install
Acrobat Reader?

Regards,
Tommy
---End Message---
---BeginMessage---



Now, if you have ANY idea who I am


Does anyone know who this guy is, as he seems to have forgotten :p


--
Thanks!
-Shawn
http://www.spidean.com




Thanks,
Ash

http://www.ashleysheridan.co.uk

---End Message---
---BeginMessage---
I'm looking at the source of a web sockets server and I see these various forms:

  ws://{$host}{$path}
  HTTP/1.1 ${status}\r\n

Are these simply equivalent to:

  ws:// . $host . $path
  HTTP/1.1  . $status . \r\n;

and if so, is there any particular benefit to using that form? Or if not, what 
do they mean?

(I've read up about variable variables).

Thanks,

--
Cheers  --  Tim
---End Message---
---BeginMessage---
On 16 November 2011 13:56, Tim Streater t...@clothears.org.uk wrote:
 I'm looking at the source of a web sockets server and I see these various 
 forms:

  ws://{$host}{$path}
  HTTP/1.1 ${status}\r\n

 Are these simply equivalent to:

  ws:// . $host . $path
  HTTP/1.1  . $status . \r\n;

 and if so, is there any particular benefit to using that form? Or if not, 
 what do they mean?

 (I've read up about variable variables).

 Thanks,

 --
 Cheers  --  Tim


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


If you want to embed $array[CONSTANT], then the {} is used.

I use {} out of habit for non arrays. Not sure if there is an impact.

http://docs.php.net/manual/en/language.types.string.php#example-71
shows the use.

Oh. I've fixed the layout bug for
http://docs.php.net/manual/en/language.types.string.php#example-70.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370
---End Message---
---BeginMessage---
On 16 Nov 2011 at 14:27, Richard Quadling rquadl...@gmail.com wrote: 

 If you want to embed $array[CONSTANT], then the {} is used.

 I use {} out of habit for non arrays. Not sure if there is an impact.

 http://docs.php.net/manual/en/language.types.string.php#example-71
 shows the use.

 Oh. I've fixed the layout bug for
 http://docs.php.net/manual/en/language.types.string.php#example-70.

Ah *that's* where it was hiding. Thanks - got it now.

--
Cheers  --  Tim
---End Message---
---BeginMessage---

On 11-11-16 09:27 AM, Richard Quadling wrote:

On 16 November 2011 

Re: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 00:43, HallMarc Websites m...@hallmarcwebsites.com wrote: 

 And in conclusion; sorry, I get uppity after a long day LOL. It's as I already
 thought; the answer is NO. So here is what I will do for any of you looking
 for an answer and stumbling across my slight rant, I will detect if it is
 Safari 5.1.x and then just remove the view link and leave them with a download
 link only. Sucks if you ask me.

I have to say that I still really have no clue what you are talking about. Why 
would anyone with OS X want Acrobat Reader, when there is a perfectly good [1] 
application (note: application, not feature) available that does the task 
just as well. And when the PDF shows up in Safari you can choose to view it 
there or open in Preview. I only do the latter if I intend to save the PDF, 
which is not always the case.

[1] Preview also allows me to adjust images when I can't be bothered to fire up 
Elements.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: RE: [PHP] Safari and PDF

2011-11-16 Thread HallMarc Websites
 I have to say that I still really have no clue what you are talking about. Why
 would anyone with OS X want Acrobat Reader, when there is a perfectly
 good [1] application (note: application, not feature) available that does 
 the
 task just as well. And when the PDF shows up in Safari you can choose to
 view it there or open in Preview. I only do the latter if I intend to save the
 PDF, which is not always the case.
 
 [1] Preview also allows me to adjust images when I can't be bothered to fire
 up Elements.
 
 --
 Cheers  --  Tim
[] 

Seems strange that you are given a choice. My clients have been telling me that 
they are told to get the latest Acrobat Reader by Safari. Which they have done 
(again why allow a plugin that isn't supported get installed to begin with) 
only to be told the same exact thing the next time the click on a pdf. Anyway, 
I realize this topic is now slightly off list.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: RE: RE: [PHP] Safari and PDF

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 12:13, HallMarc Websites m...@hallmarcwebsites.com wrote: 

 Seems strange that you are given a choice. My clients have been telling me
 that they are told to get the latest Acrobat Reader by Safari. Which they have
 done (again why allow a plugin that isn't supported get installed to begin
 with) only to be told the same exact thing the next time the click on a pdf.

Perhaps they just need to completely de-install the Acrobat plugin. When a PDF 
is in a Safari widow, there is a fade-in/fade-out
 type of array of things you can click on at the bottom of the window (not good 
UI, IMO, but there it is). You can choose to open in Preview, Save, or 
increase/decrease zoom. If you do nothing then the array fades out, but 
reappears if you mouse down there. As I say, I've not had, or needed, Acrobat 
Reader on a Mac for some 10 years. Trouble is, all these sites telling you to 
download this PDF and needs Acrobat Reader which is complete cock.

 Anyway, I realize this topic is now slightly off list.

True but I think you needed a rant :-)

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Sniping on the List

2011-11-16 Thread Ashley Sheridan



Now, if you have ANY idea who I am


Does anyone know who this guy is, as he seems to have forgotten :p


--
Thanks!
-Shawn
http://www.spidean.com




Thanks,
Ash

http://www.ashleysheridan.co.uk


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] {} forms

2011-11-16 Thread Tim Streater
I'm looking at the source of a web sockets server and I see these various forms:

  ws://{$host}{$path}
  HTTP/1.1 ${status}\r\n

Are these simply equivalent to:

  ws:// . $host . $path
  HTTP/1.1  . $status . \r\n;

and if so, is there any particular benefit to using that form? Or if not, what 
do they mean?

(I've read up about variable variables).

Thanks,

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: RE: [PHP] Safari and PDF

2011-11-16 Thread Tommy Pham
On Wed, Nov 16, 2011 at 4:13 AM, HallMarc Websites
m...@hallmarcwebsites.com wrote:
 Seems strange that you are given a choice. My clients have been telling me 
 that they are told to get the latest Acrobat Reader by Safari. Which they 
 have done (again why allow a plugin that isn't supported get installed to 
 begin with) only to be told the same exact thing the next time the click on a 
 pdf. Anyway, I realize this topic is now slightly off list.



Perhaps their system administrator / tech support person doesn't know
any better about what's available in OS X and decided to install
Acrobat Reader?

Regards,
Tommy

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] {} forms

2011-11-16 Thread Richard Quadling
On 16 November 2011 13:56, Tim Streater t...@clothears.org.uk wrote:
 I'm looking at the source of a web sockets server and I see these various 
 forms:

  ws://{$host}{$path}
  HTTP/1.1 ${status}\r\n

 Are these simply equivalent to:

  ws:// . $host . $path
  HTTP/1.1  . $status . \r\n;

 and if so, is there any particular benefit to using that form? Or if not, 
 what do they mean?

 (I've read up about variable variables).

 Thanks,

 --
 Cheers  --  Tim


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


If you want to embed $array[CONSTANT], then the {} is used.

I use {} out of habit for non arrays. Not sure if there is an impact.

http://docs.php.net/manual/en/language.types.string.php#example-71
shows the use.

Oh. I've fixed the layout bug for
http://docs.php.net/manual/en/language.types.string.php#example-70.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc : Fantasy Shopper
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea :
fan.sh/6/370

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] {} forms

2011-11-16 Thread Tim Streater
On 16 Nov 2011 at 14:27, Richard Quadling rquadl...@gmail.com wrote: 

 If you want to embed $array[CONSTANT], then the {} is used.

 I use {} out of habit for non arrays. Not sure if there is an impact.

 http://docs.php.net/manual/en/language.types.string.php#example-71
 shows the use.

 Oh. I've fixed the layout bug for
 http://docs.php.net/manual/en/language.types.string.php#example-70.

Ah *that's* where it was hiding. Thanks - got it now.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Think I found a PHP bug

2011-11-16 Thread Geoff Shang

On Tue, 15 Nov 2011, Jim Lucas wrote:


Also, I recalled something from the early 5.1.0 version that was related to the
introduction of the date_timezone_set() function.  So, from there I searched
Google for php changelog and found the changelog for php v5.  Then I searched
that document for 'date_' and found that under the 5.1.0 they added the above
function.  How it is stated, it makes me think that PHP now requires you to call
this function prior to any use of other date functions.  I cannot find anything
in the php manual confirming my last statement.  YMMV


If you don't use date_default_timezone_set(), it's supposed to use the 
server timezone.  I recalled reading that a notice/warning would be logged 
if you did this, but like you, I can't find any reference to this now. 
I've searched my apache error logs and can't find anything there either, 
which seems to suggest that this in fact is not the case.


In case it wasn't obvious in my original post, this worked just fine 
during UK summer time.  It's only since the clocks changed two weeks ago 
that PHP has been thinking that the server timezone is UTC rather than 
Europe/London.


Geoff.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Think I found a PHP bug

2011-11-16 Thread Geoff Shang

On Wed, 15 Nov 2011, Tim Streater wrote:


I find I need to do this:

 date_default_timezone_set (@date_default_timezone_get ());

in all my scripts since 5.x.x to avoid rude messages.


Apart from the fact that I've not seen the rude messages of which you 
speak, even though I expected to, this won't help in this case. 
date_default_timezone_get() is returning the wrong timezone.


Geoff.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] {} forms

2011-11-16 Thread Robert Cummings

On 11-11-16 09:27 AM, Richard Quadling wrote:

On 16 November 2011 13:56, Tim Streatert...@clothears.org.uk  wrote:

I'm looking at the source of a web sockets server and I see these various forms:

  ws://{$host}{$path}
  HTTP/1.1 ${status}\r\n

Are these simply equivalent to:

  ws:// . $host . $path
  HTTP/1.1  . $status . \r\n;

and if so, is there any particular benefit to using that form? Or if not, what 
do they mean?

(I've read up about variable variables).



If you want to embed $array[CONSTANT], then the {} is used.

I use {} out of habit for non arrays. Not sure if there is an impact.



The braces are also used when the characters following the variable are 
also valid variable name characters :)


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php