php-general Digest 19 Nov 2011 08:14:54 -0000 Issue 7575

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

php-general Digest 19 Nov 2011 08:14:54 - Issue 7575

Topics (messages 315749 through 315752):

Re: Sniping on the List
315749 by: Fredric L. Rice
315751 by: Robert Cummings
315752 by: Lester Caine

Re: problem with sending AT command in php
315750 by: a dehqan

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---
rc Thus before the big bang is perfectly
rc valid whether we could perceive it or not.
ts Not really. It's as meaningless as asking
ts what's north of the North Pole.

That's an interesting point. If you stand at the North Pole where all
lines of reference converge, there is still Galactic North and True North
if one's reference frame is Magnetic North. There are no privelaged frames
of references UNLESS there is only ONE singular frame of reference.

The Big Bang is a singularity event, there were no reference points in
existance until the Big Bang, ergo you're so right, even saying before
the Big Bang isn't even wrong. :)


---End Message---
---BeginMessage---

On 11-11-18 10:03 AM, Curtis Maurand wrote:



Robert Cummings wrote:
Robert Cummings wrote:




Given the discussion, I think the following is in order: BAZINGA * 2

  And what does any of this have to do with PHP?  It's time to
end this thread.


It's Friday... traditionally content anal-ness has been somewhat 
disregarded on this day. Need one go through the archives to see if 
you're being a tad hypocritical?


Cheese,
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.
---End Message---
---BeginMessage---

Robert Cummings wrote:

It's Friday... traditionally content anal-ness has been somewhat disregarded on
this day. Need one go through the archives to see if you're being a tad
hypocritical?


Although it only seems to be this latest thread that seems to have got totally 
OTT even for a Friday. And I think 'Friday Distraction' is a fairly recent 
development that was never every Friday ...
I have the archive since 2004 on-line here and it sort of started on 09, but 
there were only a few each year - usually over the summer? And most of them were 
realistic tangential discussions rather than totally anal.
Personally, this last one has become irritating and obviously others find the 
same thing?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
---End Message---
---BeginMessage---
In The Name Of Allah

Thank you all for attentions ;
Weird but solved with using another symbolink of Device
Weird because other App in linux in the same time were using for example
/dev/ttyusb1 but php code works with /dev/ttyusb3 ..

Regards dehqan


On Tue, Nov 15, 2011 at 7:39 PM, Richard Quadling rquadl...@gmail.comwrote:

 On 15 November 2011 15:12, Mike Mackintosh
 mike.mackint...@angrystatic.com wrote:
 
 
  On Nov 15, 2011, at 8:25, Richard Quadling rquadl...@gmail.com wrote:
 
  On 15 November 2011 11:50, a dehqan dehqa...@gmail.com wrote:
  \n is for Linux
  \r is for Windows
 
  On 11/14/11, Richard Quadling rquadl...@gmail.com wrote:
  On 12 November 2011 20:02, a dehqan dehqa...@gmail.com wrote:
  dio_write($handle, 'AT')  dio_write($handle, AT) make firefox
 times out
  on Waiting for localhost ... .
  But dio_write($handle, AT\n) makes it prints AT exactly the same
 command
  or  A  A , ..
 
  On Sat, Nov 12, 2011 at 10:02 PM, Negin Nickparsa
  nickpa...@gmail.comwrote:
 
  are you sure about ATD03518726535\n?
 
   can you try if ( dio_write($handle, 'AT') )?
 
 
 
  Don't use \n, use \r.
 
  http://en.wikipedia.org/wiki/AT_commands#Example_session
 
 
 
  --
  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
 
 
 
  No, \r is the requirement of the modem. Nothing to do with the OS.
 
  Windows uses \r\n as its line terminators, but when you talk to a
  modem, you use \r.
 
 
 
  --
  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
 
 
 
  I've had better luck with PHP_EOL instead of \r or \n.

 I think I've not explained myself 

Re: [PHP] Sniping on the List

2011-11-19 Thread Lester Caine

Robert Cummings wrote:

It's Friday... traditionally content anal-ness has been somewhat disregarded on
this day. Need one go through the archives to see if you're being a tad
hypocritical?


Although it only seems to be this latest thread that seems to have got totally 
OTT even for a Friday. And I think 'Friday Distraction' is a fairly recent 
development that was never every Friday ...
I have the archive since 2004 on-line here and it sort of started on 09, but 
there were only a few each year - usually over the summer? And most of them were 
realistic tangential discussions rather than totally anal.
Personally, this last one has become irritating and obviously others find the 
same thing?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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



Re: [PHP] PHP script won't run in the background

2011-11-19 Thread Laruence
$ stty -tostop

thanks

On Sat, Nov 19, 2011 at 10:33 PM, richard gray r...@richgray.com wrote:
 Hi all

 Hope someone can help me with a weird issue I have...

 I am trying to run a php CLI script in the background and it just won't run
 - it has a status of Stopped SIGTOU (Trying to write output) - Here are the
 details

 OS
 Mac OS X Lion 10.7.2

 PHP
 PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00)
 Copyright (c) 1997-2011 The PHP Group
 Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

 I created a basic script  test.php

 ?php echo 'Hello world'.PHP_EOL; ?

 Here are the results of various tests:-

 Test 1) php -f test.php  (Hello world gets displayed)
 Test 2) php -f test.php test.log 21 (Hello world gets put into test.log)
 Test 3) php -f test.php test.log 21  --- I get [1]+  Stopped(SIGTTOU)
      php -f test.php  test.log 21 -- and the job just sits there doing
 nothing nothing gets logged however lsof shows the log file is open

 It is something to do with php because a similar shell script gets executed
 no problems in the background...

 This has me stumped ... any ideas?

 TIA
 Rich

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





-- 
Laruence  Xinchen Hui
http://www.laruence.com/

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



[PHP] PHP script won't run in the background

2011-11-19 Thread richard gray

Hi all

Hope someone can help me with a weird issue I have...

I am trying to run a php CLI script in the background and it just won't 
run - it has a status of Stopped SIGTOU (Trying to write output) - Here 
are the details


OS
Mac OS X Lion 10.7.2

PHP
PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

I created a basic script  test.php

?php echo 'Hello world'.PHP_EOL; ?

Here are the results of various tests:-

Test 1) php -f test.php  (Hello world gets displayed)
Test 2) php -f test.php test.log 21 (Hello world gets put into test.log)
Test 3) php -f test.php test.log 21  --- I get [1]+  
Stopped(SIGTTOU)php -f test.php  test.log 21 -- and the job 
just sits there doing nothing nothing gets logged however lsof shows the 
log file is open


It is something to do with php because a similar shell script gets 
executed no problems in the background...


This has me stumped ... any ideas?

TIA
Rich

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



Re: [PHP] PHP script won't run in the background

2011-11-19 Thread Ashley Sheridan
On Sat, 2011-11-19 at 23:09 +0800, Laruence wrote:

 $ stty -tostop
 
 thanks
 
 On Sat, Nov 19, 2011 at 10:33 PM, richard gray r...@richgray.com wrote:
  Hi all
 
  Hope someone can help me with a weird issue I have...
 
  I am trying to run a php CLI script in the background and it just won't run
  - it has a status of Stopped SIGTOU (Trying to write output) - Here are the
  details
 
  OS
  Mac OS X Lion 10.7.2
 
  PHP
  PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00)
  Copyright (c) 1997-2011 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
 
  I created a basic script  test.php
 
  ?php echo 'Hello world'.PHP_EOL; ?
 
  Here are the results of various tests:-
 
  Test 1) php -f test.php  (Hello world gets displayed)
  Test 2) php -f test.php test.log 21 (Hello world gets put into test.log)
  Test 3) php -f test.php test.log 21  --- I get [1]+  Stopped(SIGTTOU)
   php -f test.php  test.log 21 -- and the job just sits there doing
  nothing nothing gets logged however lsof shows the log file is open
 
  It is something to do with php because a similar shell script gets executed
  no problems in the background...
 
  This has me stumped ... any ideas?
 
  TIA
  Rich
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 -- 
 Laruence  Xinchen Hui
 http://www.laruence.com/
 


Laruence, while that may be a helpful answer to a few people in the
know, just replying back with a single line like that isn't really going
to help the people who are having this problem. At least explain why you
suggested that, or what it does for those on the list that don't know,
especially as it's not a PHP thing, it's a Unix command thing.

Richard, some more info on the command Laruence mentioned can be found
at http://docstore.mik.ua/orelly/unix/upt/ch12_07.htm which explains it
in more detail.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP script won't run in the background

2011-11-19 Thread richard gray

On 19/11/2011 16:09, Laruence wrote:

$ stty -tostop


makes no difference

# stty -tostop
# php -f test.php test.log 21 
# jobs
# [1]+  Stopped(SIGTTOU)php -f test.php  test.log 21

Any other ideas?



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



Re: [PHP] PHP script won't run in the background

2011-11-19 Thread richard gray


Laruence, while that may be a helpful answer to a few people in the 
know, just replying back with a single line like that isn't really 
going to help the people who are having this problem. At least explain 
why you suggested that, or what it does for those on the list that 
don't know, especially as it's not a PHP thing, it's a Unix command thing.


Richard, some more info on the command Laruence mentioned can be found 
at http://docstore.mik.ua/orelly/unix/upt/ch12_07.htm which explains 
it in more detail.


not sure this is relevant as my script is not trying to write to the 
terminal the test.log 21 is sending stdout and stderr to the log file 
not the tty...



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



[PHP] Parsing the From field

2011-11-19 Thread Ron Piggott

I am unsure of how to parse first name, last name and e-mail address from the 
'From:' field of an e-mail.

What I am struggling with is if the name has more than two words 
- Such as the last name being multiple words
- A name a business or department is given instead of a personal name
- If the person has included their middle name, middle initial or degrees 
(“Dr.”)
- If last name has multiple words

Also the formatting of the from field changes in various e-mail programs:

From: Ron Piggott ron.pigg...@actsministries.org
From: Ron Piggott ron.pigg...@actsministries.org
From: ron.pigg...@actsministries.org
From: ron.pigg...@actsministries.org

If there is more than 2 words for the name I would like them to be assigned to 
the last name.

Ron


Ron Piggott



www.TheVerseOfTheDay.info 


Re: [PHP] Parsing the From field

2011-11-19 Thread Alain Williams
On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote:
 
 I am unsure of how to parse first name, last name and e-mail address from the 
 'From:' field of an e-mail.
 
 What I am struggling with is if the name has more than two words 
 - Such as the last name being multiple words
 - A name a business or department is given instead of a personal name
 - If the person has included their middle name, middle initial or degrees 
 (“Dr.”)
 - If last name has multiple words
 
 Also the formatting of the from field changes in various e-mail programs:
 
 From: Ron Piggott ron.pigg...@actsministries.org
 From: Ron Piggott ron.pigg...@actsministries.org
 From: ron.pigg...@actsministries.org
 From: ron.pigg...@actsministries.org
 
 If there is more than 2 words for the name I would like them to be assigned 
 to the last name.

You can make no such assumption, different people/companies/... do it in 
different ways.
If you really want to have fun look at the different 'norms' from different 
countries.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include std_disclaimer.h

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



Re: [PHP] Sniping on the List

2011-11-19 Thread Robert Cummings

On 11-11-19 03:14 AM, Lester Caine wrote:

Robert Cummings wrote:

It's Friday... traditionally content anal-ness has been somewhat disregarded on
this day. Need one go through the archives to see if you're being a tad
hypocritical?


Although it only seems to be this latest thread that seems to have got totally
OTT even for a Friday. And I think 'Friday Distraction' is a fairly recent
development that was never every Friday ...
I have the archive since 2004 on-line here and it sort of started on 09, but
there were only a few each year - usually over the summer? And most of them were
realistic tangential discussions rather than totally anal.
Personally, this last one has become irritating and obviously others find the
same thing?


I don't know... I haven't heard from many on the list and there seems to 
be as many responding as wishing it would stop. That said, why re-hash 
it on a Saturday (or as the case may be... so close to Saturday). Were 
you hoping to continue it over the weekend? Also, you say it seems to 
have started around 2009... that's almost 3 years. I consider that a 
fairly long standing trend and not quite as recent as you make it 
sound. I've been on this list in one form or another since 2000... I'd 
say for the most part these kinds of conversations crop up with fair 
regularity. I'm not saying every day, but often enough that I don't 
understand the sudden whining-- and as I've also pointed out, there's 
likely a degree of hypocrisy afoot. Either way, I'm done with the 
thread, enjoy your weekend.


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



Re: [PHP] Parsing the From field

2011-11-19 Thread Ron Piggott


My web site is used by people from approximately of 90 countries.

- I will use just name instead of first name / last name.
- e-mail address




Ron Piggott



www.TheVerseOfTheDay.info

-Original Message- 
From: Alain Williams

Sent: Saturday, November 19, 2011 11:29 AM
To: Ron Piggott
Cc: php-general@lists.php.net
Subject: Re: [PHP] Parsing the From field

On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote:


I am unsure of how to parse first name, last name and e-mail address from 
the 'From:' field of an e-mail.


What I am struggling with is if the name has more than two words
- Such as the last name being multiple words
- A name a business or department is given instead of a personal name
- If the person has included their middle name, middle initial or degrees 
(“Dr.”)

- If last name has multiple words

Also the formatting of the from field changes in various e-mail programs:

From: Ron Piggott ron.pigg...@actsministries.org
From: Ron Piggott ron.pigg...@actsministries.org
From: ron.pigg...@actsministries.org
From: ron.pigg...@actsministries.org

If there is more than 2 words for the name I would like them to be 
assigned to the last name.


You can make no such assumption, different people/companies/... do it in 
different ways.
If you really want to have fun look at the different 'norms' from different 
countries.


--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.

+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include std_disclaimer.h 



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



Re: [PHP] Sniping on the List

2011-11-19 Thread Tedd Sperling
On Nov 17, 2011, at 7:59 PM, Stuart Dallas wrote:
 On 17 Nov 2011, at 20:17, Tedd Sperling wrote:
 On Nov 17, 2011, at 11:58 AM, Stuart Dallas wrote:
 defined as the number of seconds elapsed since midnight Coordinated 
 Universal Time (UTC) of Thursday, January 1, 1970 (Unix times are defined, 
 but negative, before that date) [http://en.wikipedia.org/wiki/Unix_time]
 
 Good reference to support your point, but strtotime() doesn't qork that way. 
  In addition, the statement does not address where the fractions of a second 
 were that occurred before the completion of the first second, clearly those 
 fractions occurred in 1970.
 
 It certainly does address that. The definition the number of seconds 
 elapsed says nothing about whole seconds, so I'd venture that fractions of a 
 second are still covered.

Good -- I'm glad we agree.

 For example, if you push '-1' though strtotime(-1), you'll get Wednesday 
 only one day a week -- whereas 'null' works every time.
 Technically I see that as a bug. I believe strtotime(null) should return 
 null, but due to the way type inference works, null is interpreted as 0. 
 The point here being that you're not getting the time at null, you're 
 getting the time at 0.
 
 Nope, zero time is absolutely January 1, 1970 00:00:00 -- which was a 
 Thursday. If you pass zero through strtotime(), it reports December 1969 
 and I claim that to be a bug. Realize that seconds, minutes, and hours go 
 from 0-59, not 1 to 60. Any fractions of a second before zero was 59.999... 
 and such was indeed part of the day/month/year before.
 
 That has nothing to do with seconds running from 0 to 59 rather than 1 to 60, 
 it has to do with your timezone. When you ask PHP to display a formatted date 
 with a timestamp of 0 you're actually getting the time at (unix timestamp 0 + 
 (3600 * your timezone offset in hours)). Since you're in a timezone that's 
 behind UTC you get the previous day.

 -snip- with other time zone discussion that have nothing to do with what I 
 observed nor addressed in my post.

My observations are demonstrated here:

http://www.webbytedd.com//strtotime/index.php

Please note that regardless of time zone, the strtotime() function works (or at 
least it does for me) such that:

If you enter '-1', the function will report back Todays Date with current 
seconds. Note there is no difference between entering 'Today' or '-1'.
If you enter '0', the function will report back December, 31, 1969.
If you enter nothing (i.e., null), then it reports back December, 31, 1969.

It's clear (and by definition) that unix zero time (i.e., 00:00:00) happened in 
1970.

It's also clear that time before unix zero happened before 1970 (i.e., 
'December 31, 1969').

As such, null (and not the string 'null' as stated my someone else, duh) should 
come back as undefined OR December, 31, 1969.

Furthermore, the string '-1' should default to '-1 second' instead of being the 
same as if I entered 'Today'.

Now, where are my observations wrong? The code is shown in the demo.

Cheers,

tedd


_
t...@sperling.com
http://sperling.com


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



Re: [PHP] Sniping on the List

2011-11-19 Thread Tedd Sperling
On Nov 18, 2011, at 12:40 AM, Robert Cummings wrote:
 By you're reasoning since I did not exist before 1974 then time itself could 
 not possibly have existed before then either since I was not in existence to 
 perceive it. That's as ludicrous as suggesting time did not exist before the 
 big bang (presuming this model is correct).  Also, them's some fancy shmancy 
 words you're slinging about up there, but without a proof it's just farts in 
 the wind :) No more valid than a theory of creation or the big ass spaghetti 
 thingy majingy dude. Folded shmeality and phases of whatsyamacallit may well 
 be true, but provability of the non-existence of time before the big bang 
 theory is not provable by this model. However, what is valid is to take a 
 point of reference in time and infer a period before it. Thus before the big 
 bang is perfectly valid whether we could perceive it or not.
 
 Cheers,
 Rob.

Again, you have shown an uncanny insight into the way things are.  :-)

Cheers,

tedd

_
t...@sperling.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parsing the From field

2011-11-19 Thread Al



On 11/19/2011 11:29 AM, Alain Williams wrote:

On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote:


I am unsure of how to parse first name, last name and e-mail address from the 
'From:' field of an e-mail.

What I am struggling with is if the name has more than two words
- Such as the last name being multiple words
- A name a business or department is given instead of a personal name
- If the person has included their middle name, middle initial or degrees 
(“Dr.�)
- If last name has multiple words

Also the formatting of the from field changes in various e-mail programs:

From: Ron Piggottron.pigg...@actsministries.org
From: Ron Piggottron.pigg...@actsministries.org
From: ron.pigg...@actsministries.org
From:ron.pigg...@actsministries.org

If there is more than 2 words for the name I would like them to be assigned to 
the last name.


You can make no such assumption, different people/companies/... do it in 
different ways.
If you really want to have fun look at the different 'norms' from different 
countries.



Perhaps, Ron's email are constrained so there is a finite syntax. e.g., only to 
actsministries.org


Ron: I'd suggest your best approach is to use preg_match()
There are several examples on the net, try Google php preg_match email address



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



Re: [PHP] Sniping on the List

2011-11-19 Thread Tedd Sperling
On Nov 19, 2011, at 11:59 AM, Stuart Dallas wrote:
 On 19 Nov 2011, at 16:48, Tedd Sperling wrote:
 For example, if you push '-1' though strtotime(-1), you'll get Wednesday 
 only one day a week -- whereas 'null' works every time.
 Technically I see that as a bug. I believe strtotime(null) should return 
 null, but due to the way type inference works, null is interpreted as 0. 
 The point here being that you're not getting the time at null, you're 
 getting the time at 0.
 
 Nope, zero time is absolutely January 1, 1970 00:00:00 -- which was a 
 Thursday. If you pass zero through strtotime(), it reports December 1969 
 and I claim that to be a bug. Realize that seconds, minutes, and hours go 
 from 0-59, not 1 to 60. Any fractions of a second before zero was 
 59.999... and such was indeed part of the day/month/year before.
 
 That has nothing to do with seconds running from 0 to 59 rather than 1 to 
 60, it has to do with your timezone. When you ask PHP to display a 
 formatted date with a timestamp of 0 you're actually getting the time at 
 (unix timestamp 0 + (3600 * your timezone offset in hours)). Since you're 
 in a timezone that's behind UTC you get the previous day.
 
 -snip- with other time zone discussion that have nothing to do with what I 
 observed nor addressed in my post.
 
 My observations are demonstrated here:
 
 http://www.webbytedd.com//strtotime/index.php
 
 Your test code is flawed because strtotime returns an error when you pass it 
 null. Your code is passing that false to getdate, which is interpreting it as 
 an integer, which would be 0.
 
 -Stuart

Interesting -- I shall look into it.

Thanks,

tedd


_
t...@sperling.com
http://sperling.com

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



Re: [PHP] Impossibility of reading php.ini

2011-11-19 Thread Matijn Woudt
On Sat, Nov 19, 2011 at 7:23 PM, Alain Chautar achau...@nerim.net wrote:
 Hello
 I am a newbie of this list. So if this topic as a known answer, I apologize.

 I use a brand new Debian Squeeze with PHP5.3.3-7+Squeeze3 as a web server.
 All my web sites are OK.
 For my needs I have to change values in the php.ini .
 The way I proceed : I change values - I save php.ini - I restart Apache2
 - I verify with phpinfo() or ini_get
 ...
 My phpinfo() can be read at 213.41.212.98/test.php
 and my php.ini is join to this mail.

 If somebody have an idea ???
 Thanks.

Are you sure you changed the correct php.ini file? In my debian there
is one for the CLI and one for Apache, eg:

cd /etc  find -iname php.ini

./php5/cli/php.ini
./php5/apache2/php.ini

where ofcourse only the last one affects your website.

Matijn

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



Re: [PHP] Impossibility of reading php.ini

2011-11-19 Thread Alain Chautar
Yes I change the right one : /etc/php5/apache2/php.ini .It fit with 
Loaded Configuration File in phpinfo(). This the reason I get confused.


Le 19/11/2011 20:26, Matijn Woudt a écrit :

On Sat, Nov 19, 2011 at 7:23 PM, Alain Chautarachau...@nerim.net  wrote:

Hello
I am a newbie of this list. So if this topic as a known answer, I apologize.

I use a brand new Debian Squeeze with PHP5.3.3-7+Squeeze3 as a web server.
All my web sites are OK.
For my needs I have to change values in the php.ini .
The way I proceed : I change values -  I save php.ini -  I restart Apache2
-  I verify with phpinfo() or ini_get
...
My phpinfo() can be read at 213.41.212.98/test.php
and my php.ini is join to this mail.

If somebody have an idea ???
Thanks.


Are you sure you changed the correct php.ini file? In my debian there
is one for the CLI and one for Apache, eg:

cd /etc  find -iname php.ini

./php5/cli/php.ini
./php5/apache2/php.ini

where ofcourse only the last one affects your website.

Matijn



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



[PHP] include

2011-11-19 Thread Tim Streater
At the moment I'm using an instance of apache to run PHP scripts, as and when 
required via AJAX. Having got some understanding of web sockets, I'm minded to 
look at having a small server to execute these functions as required. The 
scripts, some 50 or so, are only about 300kbytes of source code, which seems 
small enough that it could all be loaded with include, as in:

?php
$fn = 'wiggy.php';
include $fn;
?

This appears to work although I couldn't see it documented.

I'd also like to be able to replace a module without restarting the server. I 
couldn't see a way to drop an included file, do I therefore take it that there 
is none? Failing that, is there a good way to dynamically replace parts of a 
PHP program, possibly using runkit?

--
Cheers  --  Tim

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