OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 23 Feb 2008 08:46:29 -0000 Issue 5309

php-general-digest-helplists.php.net
Date: Sat Feb 23 2008 - 02:46:29 CST


php-general Digest 23 Feb 2008 08:46:29 -0000 Issue 5309

Topics (messages 269887 through 269934):

Re: temporary error
        269887 by: Mirco Soderi
        269889 by: Shawn McKenzie
        269903 by: Nathan Rixham
        269906 by: Daniel Brown
        269911 by: Greg Donald
        269912 by: Robert Cummings
        269914 by: Nathan Rixham
        269924 by: tedd
        269926 by: Nathan Rixham
        269928 by: Bastien Koert

Re: XML encoding variable simpleXML on Linux
        269888 by: Larry Brown
        269919 by: Nathan Rixham

Re: All Survey leading to PHP
        269890 by: tedd

Re: More than one values returned?
        269891 by: tedd
        269901 by: Robert Cummings
        269902 by: Daniel Brown
        269905 by: Robert Cummings
        269907 by: Daniel Brown
        269908 by: Robert Cummings
        269909 by: Daniel Brown
        269910 by: Robert Cummings
        269917 by: Jim Lucas
        269918 by: Nathan Nobbe
        269920 by: Robert Cummings
        269921 by: tedd
        269923 by: Nathan Nobbe

Re: URL modification
        269892 by: Nathan Rixham
        269893 by: Per Jessen

Date Function
        269894 by: VamVan
        269895 by: Andrew Ballard
        269896 by: Thiago Pojda
        269899 by: Zoltán Németh

Re: Ajax send()
        269897 by: Zoltán Németh
        269900 by: Zoltán Németh

Re: Date Function ][Resolved]
        269898 by: VamVan

Cross-Post: Installing on Palm Treo?
        269904 by: Daniel Brown

Posting Summary for Week Ending 22 February, 2008: php-generallists.php.net
        269913 by: PostTrack [Dan Brown]

Re: System errno in PHP
        269915 by: Ravi Menon

Re: APC & __autoload & webclusters
        269916 by: Nathan Nobbe

Re: Posting Summary for Week Ending 22 February, 2008:
        269922 by: tedd

redirect stdout to stderr
        269925 by: Jack Bates
        269927 by: Bojan Tesanovic

Ignoring user cancel
        269929 by: K T Ligesh
        269930 by: Casey
        269932 by: K T Ligesh

Shopping Carts
        269931 by: Kista Tucker
        269933 by: Jason Pruim

Flash menu
        269934 by: Alain Roger

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


[snip]
Is that irony?
[/snip]

no

attached mail follows:


tedd wrote:
> At 4:08 PM +0100 2/21/08, Mirco Soderi wrote:
>> In the original code there were no sintax errors,
>
> Ah crap -- they're taxing that now?!
>
> Cheers,
>
> tedd

I never see errors in my sintax. Every tax on my beer, wine and cigars
is calculated accurately every time and applied before purchase.

-Shawn

attached mail follows:


[snip]
no
[/snip]

yes

attached mail follows:


On Fri, Feb 22, 2008 at 3:20 PM, Nathan Rixham <nrixhamgmail.com> wrote:
> [snip]
> no
> [/snip]
>
> yes

    So help me God, if you two don't stop it, I'm going to come back there....

    Don't make me turn this car around! ;-P

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


On 2/22/08, Daniel Brown <parasanegmail.com> wrote:
> So help me God

Speaking of imaginary things, check out this new site I built few weeks back:

http://rewriteproject.com/

I do believe I am the first person to ever "tag cloud" a bible :)

--
Greg Donald
http://destiney.com/

attached mail follows:


On Fri, 2008-02-22 at 14:49 -0600, Greg Donald wrote:
> On 2/22/08, Daniel Brown <parasanegmail.com> wrote:
> > So help me God
>
> Speaking of imaginary things, check out this new site I built few weeks back:
>
> http://rewriteproject.com/
>
> I do believe I am the first person to ever "tag cloud" a bible :)

That's pretty funny... but why rewrite a great fantasy?

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


Greg Donald wrote:
> On 2/22/08, Daniel Brown <parasanegmail.com> wrote:
>> So help me God
>
> Speaking of imaginary things, check out this new site I built few weeks back:
>
> http://rewriteproject.com/
>
> I do believe I am the first person to ever "tag cloud" a bible :)
>
>

on that note, a few weeks back I made a short script that took peoples
blog posts and swapped the most frequent phrase with a seperate phrase
from google trends.

the very first post generated by the system decided to use an extract of
the bible [portion of genesis to be exact] and replace the word "him"
with the phrase "lindsay lohan's crotch"

"and he said unto lindsay lohan's crotch, Behold, here am I"

first time a server made me laugh!

2nd was yesterday when reading "man init" at the foot it has see also
"bum" - which meant i then had to bash "man bum" - sadly i didn't have
it so had to think of a way to google "man bum" - after deciding that
debian manual bum would be a good search, the first page i saw was a bug
track saying that manual for bum is wrong because it reffers to bum as
bum.in - this continued, I gave up.

attached mail follows:


At 3:58 PM -0500 2/22/08, Robert Cummings wrote:
>On Fri, 2008-02-22 at 14:49 -0600, Greg Donald wrote:
>> On 2/22/08, Daniel Brown <parasanegmail.com> wrote:
>> > So help me God
>>
>> Speaking of imaginary things, check out this new site I built few
>>weeks back:
>>
>> http://rewriteproject.com/
>>
>> I do believe I am the first person to ever "tag cloud" a bible :)
>
>That's pretty funny... but why rewrite a great fantasy?

Not meaning to start a religious debate or what's real and what isn't
with regard to the Bible, but the other day I was thinking about
proof for God's existence.

Shouldn't the reason why we ask "if" be sufficient proof that "it is"?

Take the other side of that coin -- if God didn't exist, would we be
asking? I imagine there are a great number of things that don't exist
that we never mention -- so why this one?

All rhetorical comments -- no need to reply. We all have different
beliefs -- whatever gets you through.

Just offered as food for thought.

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


tedd wrote:
> At 3:58 PM -0500 2/22/08, Robert Cummings wrote:
>> On Fri, 2008-02-22 at 14:49 -0600, Greg Donald wrote:
>>> On 2/22/08, Daniel Brown <parasanegmail.com> wrote:
>>> > So help me God
>>>
>>> Speaking of imaginary things, check out this new site I built few
>>> weeks back:
>>>
>>> http://rewriteproject.com/
>>>
>>> I do believe I am the first person to ever "tag cloud" a bible :)
>>
>> That's pretty funny... but why rewrite a great fantasy?
>
> Not meaning to start a religious debate or what's real and what isn't
> with regard to the Bible, but the other day I was thinking about proof
> for God's existence.
>
> Shouldn't the reason why we ask "if" be sufficient proof that "it is"?
>
> Take the other side of that coin -- if God didn't exist, would we be
> asking? I imagine there are a great number of things that don't exist
> that we never mention -- so why this one?
>
> All rhetorical comments -- no need to reply. We all have different
> beliefs -- whatever gets you through.
>
> Just offered as food for thought.
>
> Cheers,
>
> tedd

Going to reply anyways..

I think grass is proof, as in blades of grass - there are billions per
square foot, and they are all grass, not half baked weird
grass/*something else* mixes, but all grass - to me thats proof of
creation, and therefore proof of a creator, thus god.

god's like wind, can't see it but it still blows your bin over so you
know it's there.

shoulda posted on php-religion *shrugs*

attached mail follows:


----------------------------------------
> To: php-generallists.php.net
> Date: Sat, 23 Feb 2008 00:14:27 +0000
> From: nrixhamgmail.com
> Subject: Re: [PHP] Re: temporary error
>
> tedd wrote:
>> At 3:58 PM -0500 2/22/08, Robert Cummings wrote:
>>> On Fri, 2008-02-22 at 14:49 -0600, Greg Donald wrote:
>>>> On 2/22/08, Daniel Brown wrote:
>>>> > So help me God
>>>>
>>>> Speaking of imaginary things, check out this new site I built few
>>>> weeks back:
>>>>
>>>> http://rewriteproject.com/
>>>>
>>>> I do believe I am the first person to ever "tag cloud" a bible :)
>>>
>>> That's pretty funny... but why rewrite a great fantasy?
>>
>> Not meaning to start a religious debate or what's real and what isn't
>> with regard to the Bible, but the other day I was thinking about proof
>> for God's existence.
>>
>> Shouldn't the reason why we ask "if" be sufficient proof that "it is"?
>>
>> Take the other side of that coin -- if God didn't exist, would we be
>> asking? I imagine there are a great number of things that don't exist
>> that we never mention -- so why this one?
>>
>> All rhetorical comments -- no need to reply. We all have different
>> beliefs -- whatever gets you through.
>>
>> Just offered as food for thought.
>>
>> Cheers,
>>
>> tedd
>
> Going to reply anyways..
>
> I think grass is proof, as in blades of grass - there are billions per
> square foot, and they are all grass, not half baked weird
> grass/*something else* mixes, but all grass - to me thats proof of
> creation, and therefore proof of a creator, thus god.
>
> god's like wind, can't see it but it still blows your bin over so you
> know it's there.
>
> shoulda posted on php-religion *shrugs*
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

I think the existance of god is more like the MS interoperability proposals...everyone talks about it, but no one has any real proof ;-)

bastien
_________________________________________________________________

attached mail follows:


It is not that I want to generate the document in UTF-8. I just need to
specify the correct encoding. My assumption that it was UTF-8 based on
what my command line settings are is obviously incorrect. How can I
tell what php is encoding in by default?

Larry

On Fri, 2008-02-22 at 17:20 +0100, Bojan Tesanovic wrote:
> encoding="UTF-8" doesn't guarantee that XML is encoded in UTF-8 its
> only purpose is to tell XML parser how to decode that XML document .
> it is responsibility of document creator to ensure that XML is proper
> UTF-8 document .
>
> on PHP side when creating XML there are number of functions to ensure
> UTF-8 strings though there are some issues in PHP5 ,
> and one of the main features of upcoming PHP6 is to address UTF-8
> Issues that current PHP has.
>
> some of UTF functions
>
> utf8_encode — Encodes an ISO-8859-1 string to UTF-8
> string utf8_encode ( string $data )
>
>
> On Feb 22, 2008, at 4:52 PM, Larry Brown wrote:
>
> > I am using PHP on Linux to communicate with an XML peer. I pull and
> > push documents from and to their server. On the console I use
> > UTF-8 as
> > far as I can tell. When I send these documents should my leading tag
> > read:
> >
> > <?xml versionnn="1.0" encoding="UTF-8"?>
> >
> > or is the encoding done by PHP and how do I know what it is encoded
> > to?
> >
> > TIA
> >
> > Larry
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> Bojan Tesanovic
> http://www.classicio.com/
> http://www.real-estates-sale.com/
>
>
>
--
Larry Brown <larry.browndimensionnetworks.com>

attached mail follows:


Larry Brown wrote:
> It is not that I want to generate the document in UTF-8. I just need to
> specify the correct encoding. My assumption that it was UTF-8 based on
> what my command line settings are is obviously incorrect. How can I
> tell what php is encoding in by default?
>
> Larry
>
> On Fri, 2008-02-22 at 17:20 +0100, Bojan Tesanovic wrote:
>> encoding="UTF-8" doesn't guarantee that XML is encoded in UTF-8 its
>> only purpose is to tell XML parser how to decode that XML document .
>> it is responsibility of document creator to ensure that XML is proper
>> UTF-8 document .
>>
>> on PHP side when creating XML there are number of functions to ensure
>> UTF-8 strings though there are some issues in PHP5 ,
>> and one of the main features of upcoming PHP6 is to address UTF-8
>> Issues that current PHP has.
>>
>> some of UTF functions
>>
>> utf8_encode — Encodes an ISO-8859-1 string to UTF-8
>> string utf8_encode ( string $data )
>>
>>
>> On Feb 22, 2008, at 4:52 PM, Larry Brown wrote:
>>
>>> I am using PHP on Linux to communicate with an XML peer. I pull and
>>> push documents from and to their server. On the console I use
>>> UTF-8 as
>>> far as I can tell. When I send these documents should my leading tag
>>> read:
>>>
>>> <?xml versionnn="1.0" encoding="UTF-8"?>
>>>
>>> or is the encoding done by PHP and how do I know what it is encoded
>>> to?
>>>
>>> TIA
>>>
>>> Larry
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>> Bojan Tesanovic
>> http://www.classicio.com/
>> http://www.real-estates-sale.com/
>>
>>
>>

simple xml uses the dom api [*i think*] - the dom api only works in
utf-8 - thus your content should be utf-8 if it was created by php.

really quick way to check is to stick a £ [GBP] sign in the xml, open it
up in a browser, check the £ sign shows correctly and check the encoding
settings [firefox: view> charector encoding].

quite sure you could also

if($xml === utf8_encode(utf8_decode($xml))) {
#its utf-8
}

attached mail follows:


At 10:48 AM -0500 2/22/08, Robert Cummings wrote:
>On Fri, 2008-02-22 at 09:57 -0500, tedd wrote:
>> >>
>> >> So, my advice -- write good code, pick up your check, and move one to
>> >> the next client. Stop worrying about protecting your code and hope
>> >> that you get good enough that someone wants to steal it.
>> >
>> >BAD IDEA BUSTER!!! Always backup your code so it's protected from
>> >crashes!!
>> >
>> >;)
>> >
>>
>> Rob:
>>
>> Did you forget to take your meds this morning? I'm not talking about
>> backup. :-)
>
>Hey.. there's a winkie there. I was just being funny.
>
>Cheers,
>Rob.

Don't give up your day to do comedy. ;)

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


At 9:50 AM -0600 2/22/08, Greg Donald wrote:
>On 2/21/08, Nick Stinemates <nickstinemates.org> wrote:
>-snip- for no importance
>
>I am indeed waiting, where's your code? When, and under what
>circumstances exactly, is getting back an array of objects from a
>function or method call "poor design" ? Please, do tell.

This reminds me of when we first started adding 0's to our code.
Before then, we just used 1's and surprisingly there were purist who
claimed that using both was just poor design.

We 10's (as we used to call ourselves) went on to digital stuff while
the purist continued to build pyramids. Oddly enough, I don't see
them around much anymore.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


On Fri, 2008-02-22 at 13:09 -0500, tedd wrote:
> At 9:50 AM -0600 2/22/08, Greg Donald wrote:
> >On 2/21/08, Nick Stinemates <nickstinemates.org> wrote:
> >-snip- for no importance
> >
> >I am indeed waiting, where's your code? When, and under what
> >circumstances exactly, is getting back an array of objects from a
> >function or method call "poor design" ? Please, do tell.
>
>
> This reminds me of when we first started adding 0's to our code.
> Before then, we just used 1's and surprisingly there were purist who
> claimed that using both was just poor design.
>
> We 10's (as we used to call ourselves) went on to digital stuff while
> the purist continued to build pyramids. Oddly enough, I don't see
> them around much anymore.

I for 1 think you're full of it :)

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Fri, Feb 22, 2008 at 3:05 PM, Robert Cummings <robertinterjinn.com> wrote:
> I for 1 think you're full of it :)

    Don't be a 0. ;-P

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
> On Fri, Feb 22, 2008 at 3:05 PM, Robert Cummings <robertinterjinn.com> wrote:
> > I for 1 think you're full of it :)
>
> Don't be a 0. ;-P

I'm a 0 hero! :B

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Fri, Feb 22, 2008 at 3:27 PM, Robert Cummings <robertinterjinn.com> wrote:
>
> On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
> > On Fri, Feb 22, 2008 at 3:05 PM, Robert Cummings <robertinterjinn.com> wrote:
> > > I for 1 think you're full of it :)
> >
> > Don't be a 0. ;-P
>
> I'm a 0 hero! :B

    And I'm an L7.

    J:-P

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


On Fri, 2008-02-22 at 15:29 -0500, Daniel Brown wrote:
> On Fri, Feb 22, 2008 at 3:27 PM, Robert Cummings <robertinterjinn.com> wrote:
> >
> > On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
> > > On Fri, Feb 22, 2008 at 3:05 PM, Robert Cummings <robertinterjinn.com> wrote:
> > > > I for 1 think you're full of it :)
> > >
> > > Don't be a 0. ;-P
> >
> > I'm a 0 hero! :B
>
> And I'm an L7.

With 0 percent success probability... once again 0 saves the day!!

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Fri, Feb 22, 2008 at 3:36 PM, Robert Cummings <robertinterjinn.com> wrote:
> > > On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
> > And I'm an L7.
>
> With 0 percent success probability... once again 0 saves the day!!

    Ouch. You hit me right in the feel-bads.

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


On Fri, 2008-02-22 at 15:36 -0500, Daniel Brown wrote:
> On Fri, Feb 22, 2008 at 3:36 PM, Robert Cummings <robertinterjinn.com> wrote:
> > > > On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
> > > And I'm an L7.
> >
> > With 0 percent success probability... once again 0 saves the day!!
>
> Ouch. You hit me right in the feel-bads.

Is that the same as "a very uncomfortable place"?

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


Robert Cummings wrote:
> On Fri, 2008-02-22 at 15:11 -0500, Daniel Brown wrote:
>> On Fri, Feb 22, 2008 at 3:05 PM, Robert Cummings <robertinterjinn.com> wrote:
>>> I for 1 think you're full of it :)
>> Don't be a 0. ;-P
>
> I'm a 0 hero! :B
>
> Cheers,
> Rob.

My daughter called me her "Zero Hero" when she got home from school one day. :)

--
Jim Lucas

    "Some men are born to greatness, some achieve greatness,
        and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
     by William Shakespeare

attached mail follows:


i for one have mixed feelings on this issue.
im tempted to agree w/ nick, but not entirely.
my stance is this; implementing the iterator or
related interfaces is transparent to client code;
namely you can still use for each to traverse the
collection.
you also get to do things during the iteration, that
would have to be done in client space otherwise.
now, this isnt always appropriate, maybe not even
most of the time, but this is handy in many occasions;
here is such an example;
http://propel.phpdb.org/docs/api/1.3/runtime/propel-util/CriterionIterator.html
furthermore; i like the idea of a named group object;
not to the point of absurdity; eg; implementing strings in
php, rob; i get you point, but there are plenty of uses for
an aggregate object within reason. what is the most
trivial examples i can think of.. classes for a database table..
suppose you have 2 classes per table; one that represents a record,
another that represents a group of records; which ideally is an
iterator. it makes sense to me, and ill take it over an array
of record objects in this case. because what is an array of the
record objects; its data; an array like any other; its not an
instance of a class that specifically represents a collection of
said records; so in order to identify them; youll have to inspect
the elements. and aggregate functions, how would you implement
those? any ones specific to the collection would go in the group
class of said hypothetical implementation.
and btw; your narratives are are just damned hilarious rob ;)

-nathan

attached mail follows:


On Fri, 2008-02-22 at 17:04 -0500, Nathan Nobbe wrote:
> i for one have mixed feelings on this issue.
> im tempted to agree w/ nick, but not entirely.
> my stance is this; implementing the iterator or
> related interfaces is transparent to client code;
> namely you can still use for each to traverse the
> collection.
> you also get to do things during the iteration, that
> would have to be done in client space otherwise.
> now, this isnt always appropriate, maybe not even
> most of the time, but this is handy in many occasions;
> here is such an example;
> http://propel.phpdb.org/docs/api/1.3/runtime/propel-util/CriterionIterator.html
> furthermore; i like the idea of a named group object;
> not to the point of absurdity; eg; implementing strings in
> php, rob; i get you point, but there are plenty of uses for
> an aggregate object within reason.

I wholeheartedly agree that there are plenty of uses for aggregate
objects, collections even. The argument though, is whether using arrays
is poor design. I'll leave it at this since I don't disagree with the
whole tenet of collections or grouping objects etc. I only disagree with
the assertion about arrays.

> and btw; your narratives are are just damned hilarious rob ;)

Take that Ted... I'm quitting my day job!! :)

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


At 5:27 PM -0500 2/22/08, Robert Cummings wrote:
>On Fri, 2008-02-22 at 17:04 -0500, Nathan Nobbe wrote:
> > and btw; your narratives are are just damned hilarious rob ;)
>
>Take that Ted... I'm quitting my day job!! :)
>
>Cheers,
>Rob.

Robb: <-- note the addition of an extra 'b' for my loss of a 'd'

He said your narratives, not your jokes. ;)

Besides, if you gave up programming and took up comedy, both
professions would suffer.

How's that for a backhanded compliment? :-)

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


On Fri, Feb 22, 2008 at 6:13 PM, tedd <tedd.sperlinggmail.com> wrote:

> At 5:27 PM -0500 2/22/08, Robert Cummings wrote:
> >On Fri, 2008-02-22 at 17:04 -0500, Nathan Nobbe wrote:
> > > and btw; your narratives are are just damned hilarious rob ;)
> >
> >Take that Ted... I'm quitting my day job!! :)
> >
> >Cheers,
> >Rob.
>
> Robb: <-- note the addition of an extra 'b' for my loss of a 'd'
>
> He said your narratives, not your jokes. ;)
>
> Besides, if you gave up programming and took up comedy, both
> professions would suffer.
>
> How's that for a backhanded compliment? :-)

there you go; on php-general, among other things; you get to
work on your wit as well :D im way behind, but im ready to
soak up the insults to sharpen it up; put me in coach, i can
really fly :)

-nathan

attached mail follows:


Richard Heyes wrote:
>> + rewrite is overkill for this, but long term it's worth implementing
>> and getting used to - think of the post as a pre-emptive strike on the
>> inevitable question in a couple of weeks: "how can i make
>> /profile/adam instead of profile.php?user=adam"
>
> Have a directory in your htdocs called /profile/adam and in that place a
> default document redirecting. Still no need for mod_rewrite. Unless of
> course you want the url to remain in the addressbar, but personally I
> don't think that is as important as what the user has to type in initially.
>

Never thought I'd have to find a way to explain the benefits of url
re-writing.

[snip]
/profile/adam and in that place a default document redirecting. Still no
need for mod_rewrite
[/snip]
Let's say we've got 2.5 million users :: weight up 2.5 million files vs
1 rewrite rule

map:
/rental/property/23425
to:
/index.php?mod=property&section=rentals&propertyid=23425

SEO :: not even going in to this one

finally, do you honestly not use mod_rewrite in anything you've made?

attached mail follows:


Nathan Rixham wrote:

> + rewrite is overkill for this, but long term it's worth implementing
> and getting used to

Completely agree. You've got to get to know url rewriting. I don't
know how you can manage without it, even if it's far from always the
right answer.

/Per Jessen, Zürich

attached mail follows:


Hi All,

Greetings!!

A small PHP Script for help

<?php
$date_format = '02/22/2008 14:00:00';

$start_date = date("Y-m-d h:i:s", strtotime($date_format));
echo $start_date;
?>

output is 2008-02-22 02:00:00

but not 2008-02-22 14:00:00

How can i get my output as 2008-02-22 14:00:00.

Thanks
V

attached mail follows:


On Fri, Feb 22, 2008 at 2:48 PM, VamVan <vamseevangmail.com> wrote:
> Hi All,
>
> Greetings!!
>
> A small PHP Script for help
>
> <?php
> $date_format = '02/22/2008 14:00:00';
>
> $start_date = date("Y-m-d h:i:s", strtotime($date_format));
> echo $start_date;
> ?>
>
> output is 2008-02-22 02:00:00
>
> but not 2008-02-22 14:00:00
>
> How can i get my output as 2008-02-22 14:00:00.
>
> Thanks
> V
>

http://us3.php.net/date

Change the 'h' in your format to a capital H.

Andrew

attached mail follows:


 
$start_date = date("Y-m-d H:i:s", strtotime($date_format)); echo
$start_date; ?>

capital H should do it

-----Mensagem original-----
De: VamVan [mailto:vamseevangmail.com]
Enviada em: sexta-feira, 22 de fevereiro de 2008 16:48
Para: php-generallists.php.net
Assunto: [PHP] Date Function

Hi All,

Greetings!!

A small PHP Script for help

<?php
$date_format = '02/22/2008 14:00:00';

$start_date = date("Y-m-d h:i:s", strtotime($date_format)); echo
$start_date; ?>

output is 2008-02-22 02:00:00

but not 2008-02-22 14:00:00

How can i get my output as 2008-02-22 14:00:00.

Thanks
V

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

attached mail follows:


2008. 02. 22, péntek keltezéssel 11.48-kor VamVan ezt írta:
> Hi All,
>
> Greetings!!
>
> A small PHP Script for help
>
> <?php
> $date_format = '02/22/2008 14:00:00';
>
> $start_date = date("Y-m-d h:i:s", strtotime($date_format));

$start_date = date("Y-m-d H:i:s", strtotime($date_format));

RTFM: http://hu.php.net/date ;)

greets
Zoltán Németh

> echo $start_date;
> ?>
>
> output is 2008-02-22 02:00:00
>
> but not 2008-02-22 14:00:00
>
> How can i get my output as 2008-02-22 14:00:00.
>
> Thanks
> V
>

attached mail follows:


2008. 02. 22, péntek keltezéssel 14.32-kor germana ezt írta:
> So....... i was checking my localhost with wireshark (a sniffer) and i
> found that the DATA is send after the POST ¿¿¿???? i dont understand
> why the data is not send completly.....

the problem must be in your ajax library... I don't know what kind of
ajax scripts you use, I've never seen 'nuevoAjax' before, but its
clearly a problem with your javascript, not php. correctly sent requests
contain the post data, so $_POST is not empty if you send anything

greets
Zoltán Németh

>
>
>
> if i do var_dump($_POST) is: array(0){}
>
> On Fri, 2008-02-22 at 17:41 +0100, Zoltán Németh wrote:
> > 2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
> > > Hi!!
> > >
> > > Im trying to sent data to and php with Ajax, so..
> > > this is what im sending>_url= "table='historia'$'='$''$'string'$''&";
> > >
> > > then i do:
> > >
> > > _url = _url.substring(0,_url.length-1) //quita el & de sobra al final
> > > var ajax = nuevoAjax();
> > > ajax.open("POST", "atrapalo_x.php", true);
> > > ajax.setRequestHeader("Content-Type",
> > > "aplication/x-www-form-urlencoded");
> > > ajax.send(_url);
> > >
> > > ajax.onreadystatechange = function()
> > > {
> > > if(ajax.readyState == 4)
> > > {
> > > alert(ajax.responseText)
> > > .
> > > .
> > > .
> > > ..............
> > >
> > > and in the php i do:
> > >
> > > $datafield=explode("$",str_replace("\'","'",$_POST["table"]));
> > > $main_table="".str_replace("'","",$datafield[0])."";
> > > $main_table=strtolower($main_table);
> > >
> > > but when i do and echo $datafield[0] or echo $main_table
> > >
> > > it returns nothing... just blank
> > >
> >
> > and if you var_dump($_POST) what does it show?
> >
> > greets
> > Zoltán Németh
> >
> > >
> >

attached mail follows:


please reply to the list also...

2008. 02. 22, péntek keltezéssel 15.25-kor germana ezt írta:
> nuevoAjax() is the name of the ajax object :P in spanish

OK, but that does not tell me anything about what kind of ajax library
you're using... anyway, maybe it's better to ask on an ajax list because
this is clearly not a php problem

greets
Zoltán Németh

>
> On Fri, 2008-02-22 at 20:54 +0100, Zoltán Németh wrote:
> > 2008. 02. 22, péntek keltezéssel 14.32-kor germana ezt írta:
> > > So....... i was checking my localhost with wireshark (a sniffer) and i
> > > found that the DATA is send after the POST ¿¿¿???? i dont understand
> > > why the data is not send completly.....
> >
> > the problem must be in your ajax library... I don't know what kind of
> > ajax scripts you use, I've never seen 'nuevoAjax' before, but its
> > clearly a problem with your javascript, not php. correctly sent requests
> > contain the post data, so $_POST is not empty if you send anything
> >
> > greets
> > Zoltán Németh
> >
> > >
> > >
> > >
> > > if i do var_dump($_POST) is: array(0){}
> > >
> > > On Fri, 2008-02-22 at 17:41 +0100, Zoltán Németh wrote:
> > > > 2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt írta:
> > > > > Hi!!
> > > > >
> > > > > Im trying to sent data to and php with Ajax, so..
> > > > > this is what im sending>_url= "table='historia'$'='$''$'string'$''&";
> > > > >
> > > > > then i do:
> > > > >
> > > > > _url = _url.substring(0,_url.length-1) //quita el & de sobra al final
> > > > > var ajax = nuevoAjax();
> > > > > ajax.open("POST", "atrapalo_x.php", true);
> > > > > ajax.setRequestHeader("Content-Type",
> > > > > "aplication/x-www-form-urlencoded");
> > > > > ajax.send(_url);
> > > > >
> > > > > ajax.onreadystatechange = function()
> > > > > {
> > > > > if(ajax.readyState == 4)
> > > > > {
> > > > > alert(ajax.responseText)
> > > > > .
> > > > > .
> > > > > .
> > > > > ..............
> > > > >
> > > > > and in the php i do:
> > > > >
> > > > > $datafield=explode("$",str_replace("\'","'",$_POST["table"]));
> > > > > $main_table="".str_replace("'","",$datafield[0])."";
> > > > > $main_table=strtolower($main_table);
> > > > >
> > > > > but when i do and echo $datafield[0] or echo $main_table
> > > > >
> > > > > it returns nothing... just blank
> > > > >
> > > >
> > > > and if you var_dump($_POST) what does it show?
> > > >
> > > > greets
> > > > Zoltán Németh
> > > >
> > > > >
> > > >
> >

attached mail follows:


Thanks ALL who have replied

On Fri, Feb 22, 2008 at 11:55 AM, Thiago Pojda
<thiago.pojdasoftpartech.com.br> wrote:
>
> $start_date = date("Y-m-d H:i:s", strtotime($date_format)); echo
> $start_date; ?>
>
> capital H should do it
>
>
> -----Mensagem original-----
> De: VamVan [mailto:vamseevangmail.com]
> Enviada em: sexta-feira, 22 de fevereiro de 2008 16:48
> Para: php-generallists.php.net
> Assunto: [PHP] Date Function
>
>
>
> Hi All,
>
> Greetings!!
>
> A small PHP Script for help
>
> <?php
> $date_format = '02/22/2008 14:00:00';
>
> $start_date = date("Y-m-d h:i:s", strtotime($date_format)); echo
> $start_date; ?>
>
> output is 2008-02-22 02:00:00
>
> but not 2008-02-22 14:00:00
>
> How can i get my output as 2008-02-22 14:00:00.
>
> Thanks
> V
>
> --
>
>
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
>
>
>

attached mail follows:


    Hey, folks, I'm cross-posting on General and Install, and I'm
wondering if anyone has yet attempted to install PHP (as well as
Apache and MySQL, but PHP for now) on a Palm Treo. I'm considering
picking up a 700wx tonight or tomorrow and finally switching over to
Verizon. I was just wondering if anyone had tried the same, and if
there was any success or stumbling blocks.

    Thanks.

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


        Posting Summary for PHP-General List
        Week Ending: Friday, 22 February, 2008

        Messages | Bytes | Sender
        --------------------+--------------------+------------------
        536 (100%) 739991 (100%) EVERYONE
        39 (7.3%) 47724 (6.4%) Richard Lynch <ceo at l-i-e dot com>
        38 (7.1%) 32242 (4.4%) Daniel Brown <parasane at gmail dot com>
        29 (5.4%) 34014 (4.6%) Shawn McKenzie <nospam at mckenzies dot net>
        29 (5.4%) 60313 (8.2%) Nick Stinemates <nick at stinemates dot org>
        26 (4.9%) 52919 (7.2%) Nathan Rixham <nrixham at gmail dot com>
        24 (4.5%) 45637 (6.2%) Petrus Bastos <petrusbastos at gmail dot com>
        24 (4.5%) 41976 (5.7%) Robert Cummings <robert at interjinn dot com>
        20 (3.7%) 17507 (2.4%) tedd <tedd dot sperling at gmail dot com>
        15 (2.8%) 13055 (1.8%) Chris <dmagick at gmail dot com>
        11 (2.1%) 5627 (0.8%) Greg Donald <gdonald at gmail dot com>
        10 (1.9%) 9184 (1.2%) Stut <stuttle at gmail dot com>
        10 (1.9%) 25171 (3.4%) Jim Lucas <lists at cmsws dot com>
        10 (1.9%) 25415 (3.4%) Andrés Robinet <agrobinet at bestplace dot biz>
        9 (1.7%) 10959 (1.5%) Zoltán Németh <znemeth at alterationx dot hu>
        9 (1.7%) 11768 (1.6%) Bastien Koert <bastien_k at hotmail dot com>
        9 (1.7%) 11668 (1.6%) Andrew Ballard <aballard at gmail dot com>
        9 (1.7%) 14142 (1.9%) Thiago Pojda <thiago dot pojda at softpartech dot com dot br>
        8 (1.5%) 8525 (1.2%) Wolf <lonewolf at nc dot rr dot com>
        8 (1.5%) 3048 (0.4%) Jay Blanchard <jblanchard at pocket dot com>
        8 (1.5%) 5655 (0.8%) Richard Heyes <richardh at phpguru dot org>
        7 (1.3%) 10839 (1.5%) Graham Cossey <graham dot cossey at gmail dot com>
        7 (1.3%) 12395 (1.7%) Nathan Nobbe <quickshiftin at gmail dot com>
        7 (1.3%) 13602 (1.8%) Adil Drissi <adil dot drissi at yahoo dot com>
        6 (1.1%) 11602 (1.6%) Jason Pruim <japruim at raoset dot com>
        6 (1.1%) 3165 (0.4%) Per Jessen <per at computer dot org>
        6 (1.1%) 6638 (0.9%) Paul Scott <pscott at uwc dot ac dot za>
        6 (1.1%) 4732 (0.6%) nihilism machine <nihilismmachine at gmail dot com>
        5 (0.9%) 3007 (0.4%) Mário Gamito <gamito at gmail dot com>
        5 (0.9%) 5054 (0.7%) Michal Maras <maras dot michal at gmail dot com>
        5 (0.9%) 7435 (1%) Casey <heavyccasey at gmail dot com>
        5 (0.9%) 12945 (1.7%) Jochem Maas <jochem at iamjochem dot com>
        4 (0.7%) 3199 (0.4%) Børge Holen <borge at arivene dot net>
        4 (0.7%) 5322 (0.7%) Larry Garfield <larry at garfieldtech dot com>
        4 (0.7%) 4772 (0.6%) TS <sunnrunner at gmail dot com>
        4 (0.7%) 8819 (1.2%) Matty Sarro <msarro at gmail dot com>
        3 (0.6%) 2213 (0.3%) Valedol <Valedol at goon dot ru>
        3 (0.6%) 1478 (0.2%) Dan <frozendice at gmail dot com>
        3 (0.6%) 6575 (0.9%) Mirco Soderi <m dot soderi at alice dot it>
        3 (0.6%) 2868 (0.4%) Paul van Brouwershaven <paul at vanbrouwershaven dot com>
        3 (0.6%) 1734 (0.2%) Siegfried Gipp <siegfried at rorkvell dot de>
        3 (0.6%) 1514 (0.2%) Brady Mitchell <mydarb at gmail dot com>
        2 (0.4%) 1418 (0.2%) VamVan <vamseevan at gmail dot com>
        2 (0.4%) 2853 (0.4%) Børge Holen <borge at arivene dot net>
        2 (0.4%) 1716 (0.2%) admin at buskirkgraphics dot com
        2 (0.4%) 1911 (0.3%) Hamilton Turner <hamiltont at gmail dot com>
        2 (0.4%) 4097 (0.6%) Sylvain R dot <sylvain at abstraction dot fr>
        2 (0.4%) 1497 (0.2%) Mário Gamito <gamito at gmail dot com>
        2 (0.4%) 2225 (0.3%) Colin Guthrie <gmane at colin dot guthr dot ie>
        2 (0.4%) 4597 (0.6%) Allan Fernandes <tech at ssmiths dot com>
        2 (0.4%) 3081 (0.4%) Warren Vail <warren at vailtech dot net>
        2 (0.4%) 10920 (1.5%) Michael McGlothlin <michaelm at swplumb dot com>
        2 (0.4%) 1405 (0.2%) julian <correojulian33-php at yahoo dot es>
        2 (0.4%) 1177 (0.2%) Christoph <christoph dot boget at gmail dot com>
        2 (0.4%) 1862 (0.3%) Yuval Schwartz <yuval dot schwartz at gmail dot com>
        2 (0.4%) 2644 (0.4%) Prabath Kumarasinghe <prabath321 at yahoo dot com>
        2 (0.4%) 2227 (0.3%) Hiep Nguyen <hiep at ee dot ucr dot edu>
        2 (0.4%) 1094 (0.1%) Marcos Lois Bermúdez <marcos dot list at gmail dot com>
        2 (0.4%) 1023 (0.1%) Edward Kay <edward at labhut dot com>
        2 (0.4%) 2049 (0.3%) John Meyer <john dot l dot meyer at gmail dot com>
        2 (0.4%) 2730 (0.4%) Xavier de Lapeyre <xavier at edsnetworks dot net>
        2 (0.4%) 2589 (0.3%) Dan Joseph <dmjoseph at gmail dot com>
        2 (0.4%) 2205 (0.3%) Larry Brown <larry dot brown at dimensionnetworks dot com>
        2 (0.4%) 1914 (0.3%) Emilio Astarita <emilio dot astarita at gmail dot com>
        1 (0.2%) 2345 (0.3%) Leonard Burton <leonardburton at gmail dot com>
        1 (0.2%) 834 (0.1%) Ryan A <genphp at yahoo dot com>
        1 (0.2%) 1069 (0.1%) johnlin <wenhao at visualtron dot com dot cn>
        1 (0.2%) 1087 (0.1%) Manuel Lemos <mlemos at acm dot org>
        1 (0.2%) 893 (0.1%) Greg Bowser <topnotcher at gmail dot com>
        1 (0.2%) 2452 (0.3%) Thijs Lensselink <dev at lenss dot nl>
        1 (0.2%) 186 (0%) Zoran Bogdanov <test1 dot test1 at hi dot t-com dot hr>
        1 (0.2%) 491 (0.1%) Sándor Tamás (HostWare Kft dot ) <sandortamas at hostware dot hu>
        1 (0.2%) 1392 (0.2%) Bojan Tesanovic <btesanovic at gmail dot com>
        1 (0.2%) 771 (0.1%) Alexis <phpinfo at antonakis dot co dot uk>
        1 (0.2%) 1928 (0.3%) Mario Guenterberg <mg at havelsoft dot com>
        1 (0.2%) 407 (0.1%) JR <jr at valuewebsitesource dot com>
        1 (0.2%) 402 (0.1%) Robin Vickery <robinv at gmail dot com>
        1 (0.2%) 750 (0.1%) Jason Paschal <jpaschal at gmail dot com>
        1 (0.2%) 959 (0.1%) germana <germanaoliveirab at gmail dot com>
        1 (0.2%) 336 (0%) Hélio Rocha <hjrocha at gmail dot com>
        1 (0.2%) 2998 (0.4%) Arquitt Brockney <familiarises at afronets dot org>
        1 (0.2%) 967 (0.1%) zerof <zerof at terra dot com dot br>
        1 (0.2%) 726 (0.1%) Eric Boo <ericboo at gmail dot com>
        1 (0.2%) 5950 (0.8%) php-general-help at lists dot php dot net
        1 (0.2%) 1003 (0.1%) Neo [GC] <neo at gothic-chat dot de>
        1 (0.2%) 2998 (0.4%) Pullam Sessum <taxi at carolinanavy dot com>
        1 (0.2%) 899 (0.1%) Nirmalya Lahiri <nirmalyalahiri at yahoo dot com>
        1 (0.2%) 2871 (0.4%) Jim Williams <jwilliams902 at lawscoolintl dot cn>
        1 (0.2%) 3511 (0.5%) Mick <asurfer at iinet dot net dot au>
        1 (0.2%) 483 (0.1%) Johny Burns <contactus at delivery2you dot com>
        1 (0.2%) 3025 (0.4%) Pierrot Toudle <chromatises at borderwalker dot com>
        1 (0.2%) 551 (0.1%) Rob Gould <gouldimg at mac dot com>
        1 (0.2%) 562 (0.1%) Martin Marques <martin at marquesminen dot com dot ar>
        1 (0.2%) 2241 (0.3%) M dot Sokolewicz <tularis at php dot net>
        1 (0.2%) 699 (0.1%) Micky Hulse <micky at ambiguism dot com>
        1 (0.2%) 953 (0.1%) g4me0ver <anonimo_109 at hotmail dot com>
        1 (0.2%) 1859 (0.3%)
        1 (0.2%) 2990 (0.4%) Heckstall Bashaw <lenient at dumbrella dot com>
        1 (0.2%) 221 (0%) Teck <tek dot katu at gmail dot com>
        1 (0.2%) 3006 (0.4%) Fouquet Eckhoff <shamed at 1001art dot net>
        1 (0.2%) 1177 (0.2%) Michael Seton <m dot seton dot cookeng at gmail dot com>
        1 (0.2%) 2103 (0.3%) RJO <rjo at rynet dot com>
        1 (0.2%) 526 (0.1%) Tom Rogers <trogers at kwikin dot com>
        1 (0.2%) 1307 (0.2%) Steve Edberg <sbedberg at ucdavis dot edu>
        1 (0.2%) 899 (0.1%) Sylvain Rabot <sylvain at abstraction dot fr>
        1 (0.2%) 780 (0.1%) Philip Thompson <philthathril at gmail dot com>
        1 (0.2%) 476 (0.1%) tedd <tedd at sperling dot com>
        1 (0.2%) 1024 (0.1%) Sancar Saran <sancar dot saran at evodot dot com>
        1 (0.2%) 3025 (0.4%) Venghaus Dearing <scrubwoman at cm-life dot com>
        1 (0.2%) 762 (0.1%) C dot R dot Vegelin <cr dot vegelin at hetnet dot nl>
        1 (0.2%) 688 (0.1%) TG <tg-php at gryffyndevelopment dot com>
        1 (0.2%) 8718 (1.2%) PostTrack [Dan Brown] <listwatch-php-general at pilotpig dot net>

NOTE: Numbers may not add up to 100% due to protection of names and addresses upon request.

DISCLAIMER: If you want your email address omitted from future weekly reports,
please email me privately at parasanegmail.com and it will be removed.

attached mail follows:


Hi,

I also ran into the same issue with file and socket apis, and for now, I just
hack it like ( for linux 2.6 systems ):

class Errno
{
  const EINTR = 4;
  const EIO = 5;
  const EINVAL = 22;
  const ENODATA = 61;
  const EBADMSG = 74;
  const EOPNOTSUPP = 95;
  const ECONNRESET = 104;
  const ENOTCONN = 107;
  const ETIMEDOUT = 110;
  const EALREADY = 114;
  const EINPROGRESS = 115;

  // useful static methods that use posix_strerror()
  // and socket_strerror() to return strings for logging purposes...
  .
  .

}

Clearly this is not portable, but I am betting that usually on the
same kernel releases, they
don't usually change these numbers around.

Having PHP expose these useful constants in a portable manner would be
a big plus.

Thanks,
Ravi

On Thu, Feb 21, 2008 at 9:04 AM, Richard Lynch <ceol-i-e.com> wrote:
> On Wed, February 20, 2008 2:56 am, Michal Maras wrote:
> > I have read http://php.net/fopen from top to bottom, but I could not
> > find
> > how to get system error number.
> > With set_error_handler I can get string for example
> >
> > fopen(hmc_configuration.cfg)
> > [function.fopen<http://ds63450.mspr.detemobil.de/%7Emmaras/HMC/function.fopen>]:
> > failed to open stream: Permission denied
> >
> > but I need integer number not string, because string error messages
> > depends
> > on locale setting.
> > Of course, I can test some conditions before fopen, but it is not
> > enough
> > for me.
>
> Put in a Feature Request to expose the error number from the OS, I
> guess...
>
> http://bugs.php.net/
>
> It *seems* like it ought to be reasonable enough to this naive user.
>
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> --
>
>
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Fri, Feb 22, 2008 at 8:25 AM, Jochem Maas <jochemiamjochem.com> wrote:

> Nathan Nobbe schreef:
> > On Thu, Feb 21, 2008 at 12:01 PM, Jochem Maas <jochemiamjochem.com>
> wrote:
> >
> >> Richard Lynch schreef:
> >>> If it's that inter-tangled, then I would hazard a WILD GUESS that the
> >>> __autoload will still end up loading everything...
> >> but not on every request ;-) ... I do use output caching, and I know
> >> not everything is actually used in every request.
> >
> >
> > i think youre good to go w/ autoload not loading everything up, but what
> > about existing include / require directives? if the code doesnt already
> > use __autoload() its almost certainly strewn w/ these. so i think if
> you
> > want the boost from __autoload, not loading up everything, youll at
> least
> > have
> > to strip these out.
>
> I know, I have ... I wrote the code in the first :-)
>
> >
> > I know - but it's a rubbish solution because it offer no control as to
> what
> >> is cleared from the APC cache, sometimes I want to clear opcodes,
> >> sometimes user-data,
> >> sometimes both ... graceful means being forced to clear everything.
> >
> >
> > you can pass a parameter to apc_clear_cache()
> > http://www.php.net/manual/en/function.apc-clear-cache.php
> > that distinguishes what you want to clear; user data or cached opcode.
> > obviously calling it from the cli will not clear the webserver user
> cache
> > though.
>
> I know apc_clear_cache() ... the whole problem is doing it on multiple
> servers.
> your statement about not being able to do it from the CLI (which I know)
> is half
> correct AFAICT - you can't clear anything cached in APC via mod_php from
> the
> CLI ... which is my whole problem in a nutshell :-)
>
> >
> > One would think that there was something like this indeed - I cannot
> find
> >> it,
> >> but then there must be something ... I assume, for instance, that
> Yahoo!**
> >> occassionally
> >> see fit to clear APC caches on more than one machine and I doubt Rasmus
> >> sits there and
> >> opens a browser to run apc.php on each one ;-)
> >
> >
> > i dont know how yahoo does it, but i do know a little about how facebook
> > does it; they had
> > 3 speakers at the dc php conference last year. i think you might find
> these
> > slides helpful,
> > (sorry for the ridiculuus url)
> >
> http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Ftekrat.com%2Ftalks_files%2Fphpdc2007%2Fapc%40facebook.pdf&ei=tce9R9T4FqrszATeiZG6CA&usg=AFQjCNF_1Ecm2cL1EINgRQG9k3fTEclzpA&sig2=ifrJK545M2liBdXbRrHrIw
>
> thanks for that link - it gives me a few angles and ideas to work on!
>
> > you can use capistrano to deploy the new files; but it may be more
> > convenient to use php
> > and http requests to update all the server caches; *just a thought*.
>
> I'm not using capistrano for file deployment (files are stored centrally
> on a GFS volume to which all servers have access) ... I am (will be) using
> capistrano in order to run commands symultaneously on all webservers ...
> one of which will have to be some kind of cache control mechanism, which
> is
> the case of apc will probably be a php script that hits apc.php on the
> local
> machines webserver (but I want to be able to run said php script on
> multiple machines at once, or at least without having to log in to every
> machine ... and I see no reason to duplicate the functionality of
> capistrano,
> I just write a php script to do the actual apc.php interaction on the
> local webserver that cap can call on each machine.
>
> > there are optimizations that are possible as well, such as setting,
> > apc.stat=0 and
>
> got that one set already. :-)
>
> > using apc_compile_file() rather than clearing the entire cache, but
> these
> > techniques add
>
> I read the facebook story about preloading the cache (using memory
> dumping/loading)
> in combination with apc_compile_file() ... which is cool but a little too
> much
> effort given the time/budget I have to complete this (my client doesn't
> have
> X billion to burn ... but funnily enough they do have a viable business
> model ...
> but that's another story ;-)
>
> > complexity. it sounds like you just want to get a decent bumb w/o too
> much
> > additional
> > complexity, so i wouldnt recommend them here, but i thought id mention
> them
> > in passing..
>
> apart from writing some kind of management cli script to [remote] control
> the
> apc cache of each webserver I'm also going [to have to] incorporate
> memcache
> functionality into my current caching stuff - many thanks for that PDF
> link
> (I hadn't come accross it before in my searching, although I had
> discovered
> various other facebook+apc/memcache/caching related presentations) it's
> given me
> jsut enough code and ideas to hang myself with ... er I mean write a
> transparent
> memcache layer into my app :-)

i assumed you had something pretty solid in place already; tossed the
link out there, cause its about the only practical thing i know of
(personally).
it also sounds like youve got your hands on some projects a little bigger
than
mine; but just today, it looks like i might have my ticket into the big
leagues;
so hopefully sometime soon i wont be talking out my ass as much about what
works in practice on large php apps.
dont hold your breath though :O

-nathan

attached mail follows:


>NOTE: Numbers may not add up to 100% due to M$

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


How can I implement in PHP, a script which redirects stdout to stderr,
such that echo, etc. print to stderr instead of stdout?

I can redirect stdout to stderr when invoking PHP like so:

php script-name >&2

However I want to perform this redirection within the script itself.

The solution I currently use is output buffering:

ob_start();

// Call library code

fwrite(STDERR, ob_get_contents());
ob_end_clean();

However I wonder if there's a more efficient way, so that output appears
on stderr immediately, rather than waiting for fwrite(STDERR,
ob_get_contents());

My reason for wanting this is to create a Subversion pre-commit hook
using PHP_CodeSniffer: http://pear.php.net/package/PHP_CodeSniffer

I want:

1) Commits to our Subversion repository to be checked against our coding
standard with PHP_CodeSniffer
2) Commits to fail when PHP_CodeSniffer returns an error
3) PHP_CodeSniffer's report to be displayed to the Subversion user, so
they can fix any problems

I achieved 1) and 2), but PHP_CodeSniffer prints its report to stdout
and Subversion only displays stderr to the user, not stdout. So to make
this pre-commit hook fool proof, I want it to redirect PHP_CodeSniffer's
report to stderr.

Anyone have better suggestions than output buffering?

Much thanks, Jack

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iGUEABECACUFAke/Yv4eGGhrcDovL2NnaS5zZnUuY2E6ODAvfmpkYmF0ZXMvAAoJ
EDQq9j8F5ZSEKGMAnj78XjV/KmFQ/qKGnm4Ra+C1PBckAKDJg58Ih6BT1u1V7L92
a+46+5WGEw==
=Rk1b
-----END PGP SIGNATURE-----

attached mail follows:


Hi Jack,
here is a link that can be of help
http://bugs.php.net/bug.php?id=22839

also you can use custom error handler function , catch errors and
write to stderr
============

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
$ERROR='';
     switch ($errno) {
     case E_USER_ERROR:
         $ERROR = "<b>My ERROR</b> [$errno] $errstr<br />\n";
         $ERROR.= " Fatal error on line $errline in file $errfile";
         $ERROR.= ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
         $ERROR.= "Aborting...<br />\n";

         break;

     case E_USER_WARNING:
         $ERROR= "<b>My WARNING</b> [$errno] $errstr<br />\n";
         break;

     case E_USER_NOTICE:
         $ERROR= "<b>My NOTICE</b> [$errno] $errstr<br />\n";
         break;

     default:
         $ERROR = echo "Unknown error type: [$errno] $errstr<br />\n";
         break;

     }

        if($ERROR){
                  $stderr = fopen('php://stderr', 'w');
                fwrite($stderr, $ERROR );
                fclose($stderr);
         }

     /* Don't execute PHP internal error handler */
     return true;
}

set_error_handler("myErrorHandler");

//code .....
==========================

I guess you can achieve what you need by one of those 2 concepts
Cheers.

On Feb 23, 2008, at 1:04 AM, Jack Bates wrote:

> How can I implement in PHP, a script which redirects stdout to stderr,
> such that echo, etc. print to stderr instead of stdout?
>
> I can redirect stdout to stderr when invoking PHP like so:
>
> php script-name >&2
>
> However I want to perform this redirection within the script itself.
>
> The solution I currently use is output buffering:
>
> ob_start();
>
> // Call library code
>
> fwrite(STDERR, ob_get_contents());
> ob_end_clean();
>
> However I wonder if there's a more efficient way, so that output
> appears
> on stderr immediately, rather than waiting for fwrite(STDERR,
> ob_get_contents());
>
> My reason for wanting this is to create a Subversion pre-commit hook
> using PHP_CodeSniffer: http://pear.php.net/package/PHP_CodeSniffer
>
> I want:
>
> 1) Commits to our Subversion repository to be checked against our
> coding
> standard with PHP_CodeSniffer
> 2) Commits to fail when PHP_CodeSniffer returns an error
> 3) PHP_CodeSniffer's report to be displayed to the Subversion user, so
> they can fix any problems
>
> I achieved 1) and 2), but PHP_CodeSniffer prints its report to stdout
> and Subversion only displays stderr to the user, not stdout. So to
> make
> this pre-commit hook fool proof, I want it to redirect
> PHP_CodeSniffer's
> report to stderr.
>
> Anyone have better suggestions than output buffering?
>
> Much thanks, Jack

Bojan Tesanovic
http://www.classicio.com/
http://www.carster.us/

attached mail follows:


 Hello,

 I have a php process running on lighty that should continue even if the user presses cancel in his browser. The default behavior is that the web-server will kill the cgi process on user cancellation. Is there some way I can prevent the user cancel from interfering with the php process. Can I ignore the web-server's kill in php or is this a configuration that should be handled at the web-server?

 Any help is greatly appreciated.

 Thanks a lot in advance.

attached mail follows:


On Feb 22, 2008, at 6:19 PM, K T Ligesh <ligeshlxlabs.com> wrote:

>
> Hello,
>
> I have a php process running on lighty that should continue even if
> the user presses cancel in his browser. The default behavior is that
> the web-server will kill the cgi process on user cancellation. Is
> there some way I can prevent the user cancel from interfering with
> the php process. Can I ignore the web-server's kill in php or is
> this a configuration that should be handled at the web-server?
>
> Any help is greatly appreciated.
>
> Thanks a lot in advance.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

ignore_user_abort(true);

attached mail follows:


 Yes, that was what I was looking for. Searching google for 'php ignore user interrupt', got me links on CPU interrupt management.

 Thanks again.

On Fri, Feb 22, 2008 at 05:56:45PM -0800, Casey wrote:
> ignore_user_abort(true);
>

attached mail follows:


Oh my gosh!

I¹m scared to death to create a shopping, but was recently referred to some
free shopping cart software. Though I am trying to learn code on my own (
X-HTML, HTML, CSS, PHP, etc.) I¹m not yet very good and am extremely nervous
(originally became acquainted with PHP from a designers perspective‹Thanks
David Powers. I have one page on my website). I have a potential client
and he needs a shopping cart.

I¹m thinking about installing Zen-Cart. Is this a good idea? Does this
mean that I should also download XAMPP for Mac OS X? My system is OS
10.4.11. (I haven¹t yet installed MySQL and I think the version of PHP that
I installed last year needs to be updated.)

I know someone is going to bite my head off for seeking the above
information, but I don¹t know where else to start. I don¹t think I can
learn enough PHP and MySQL in one week on my own. I don¹t want to lose this
client.

Kista

--
Independent Artist

Kista Tucker Dance
http://kistatucker.com
kistarochester.rr.com

Anakeko Productions
http://anakeko.com
designsanakeko.com

attached mail follows:


On Feb 22, 2008, at 9:17 PM, Kista Tucker wrote:

> Oh my gosh!
>
> I’m scared to death to create a shopping, but was recently referred
> to some
> free shopping cart software. Though I am trying to learn code on my
> own (
> X-HTML, HTML, CSS, PHP, etc.) I’m not yet very good and am extremely
> nervous
> (originally became acquainted with PHP from a designers perspective—
> Thanks
> David Powers. I have one page on my website). I have a potential
> client
> and he needs a shopping cart.
>
> I’m thinking about installing Zen-Cart. Is this a good idea? Does
> this
> mean that I should also download XAMPP for Mac OS X? My system is OS
> 10.4.11. (I haven’t yet installed MySQL and I think the version of
> PHP that
> I installed last year needs to be updated.)

I believe the version of php that came with 10.4.* is in the 4.*
range... 5 is out and works wonderfully, and they do have native
installers for OS X.
>
>
> I know someone is going to bite my head off for seeking the above
> information, but I don’t know where else to start. I don’t think I
> can
> learn enough PHP and MySQL in one week on my own. I don’t want to
> lose this
> client.

Seems like alot of hurdles to go through right at first. But there are
a couple of options, one is to install one of the ready made carts
like Zen Cart, another is OSCommerce. I'm sure there are others but
those I think are the two most popular. You can install and use those
while you learn. That way, pleasing the client, getting paid, and
learning all in one shot... It's the three point ringer!

Another option would be to hire someone to install it for you... Lots
of free lancers out there that do this kind of stuff... I can
recommend a couple sites... scriptlance.com and getafreelancer.com are
two that I am registered for.

Also, the people here are extremely friendly... And some would say
funny... I haven't bought the funny part yet... Always willing to
answer questions and help out people who try and stumble...

Hopefully, I have helped you and not scared you... I'm in the learning
process my self...

~JP
japruimraoset.com

attached mail follows:


Hi,

i have a problem with my animated web flash menu (+images+sounds).
basically my menu in embedded into flash, and each time that i click on menu
link, my flash is playing from start as it is integrated into each PHP
pages.
I know that this is not the topic of this forum, but i would like to know
how you cope with such issue from PHP point of view ?

i mean, did you play the flash menu on first page (like index.php e.g.) and
after you have another menu, or do you use it through your complete website
?
basically i found a lot of flash templates but nothing about PHP pages menu
integration.

I guess several of you have already done it so i need just your feedback on
possible solutions.
thanks a lot.

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008