|
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-help
lists.php.net
Date: Tue Mar 04 2008 - 12:26:40 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 4 Mar 2008 18:26:40 -0000 Issue 5329
Topics (messages 270896 through 270961):
Re: Fatal error: Call to a member function web_order_change() on a non-object
270896 by: Jochem Maas
270906 by: Eric Butera
Re: Crop part of existing pdf
270897 by: gary liang
Re: imap_setflags_full Seen
270898 by: Jochem Maas
270937 by: Richard Lynch
270943 by: Jochem Maas
270947 by: Richard Lynch
270952 by: Richard Lynch
270953 by: Jochem Maas
Re: PHP performance
270899 by: Jochem Maas
270900 by: Thiago Pojda
270902 by: Nathan Rixham
270905 by: Eric Butera
270956 by: Jochem Maas
2 Questions: Static variables and the nature of the online manual
270901 by: Svevo Romano
270903 by: Nathan Rixham
270904 by: Jochem Maas
270916 by: Svevo Romano
270918 by: Daniel Brown
270920 by: Jochem Maas
270922 by: Svevo Romano
270925 by: Svevo Romano
270926 by: Daniel Brown
270930 by: David Giragosian
270932 by: Svevo Romano
270938 by: Thiago Pojda
270940 by: tedd
maintaining [user] state without a session ...
270907 by: Jochem Maas
270908 by: Jay Blanchard
270909 by: Stut
270910 by: Bojan Tesanovic
270915 by: Daniel Brown
270919 by: Stut
270921 by: Daniel Brown
270923 by: Jochem Maas
270924 by: Jochem Maas
270928 by: Stut
270929 by: Daniel Brown
270931 by: Jason Pruim
270941 by: Daniel Brown
270944 by: tedd
270957 by: Nathan Rixham
Re: Get country from Phone number
270911 by: Jim Lucas
Re: Making an interactive RGB color picker
270912 by: tedd
270913 by: Daniel Brown
270935 by: Jim Lucas
Re: Making sure an include file works
270914 by: tedd
270917 by: tedd
270939 by: Daniel Brown
270945 by: tedd
GPS Locator
270927 by: Jay Blanchard
270933 by: Bastien Koert
270934 by: Danny Brow
270949 by: Richard Lynch
270951 by: Paul Scott
RE:
270936 by: Jay Blanchard
270942 by: tedd
Re: Sometimes I wonder why I even started programming...
270946 by: tedd
270948 by: tedd
Re: string effect
270950 by: tedd
Re: imap_setflags_full Seen [SOLVED]
270954 by: Richard Lynch
270958 by: Jochem Maas
Re: Text Color
270955 by: tedd
270959 by: tedd
270960 by: tedd
270961 by: tedd
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Ben Edwards schreef:
> Our server has just been upgraded to PHP 5.2.5 and suddenly I am
> getting the following error:
>
> Fatal error: Call to a member function web_order_change() on a
> non-object in /var/www/vhosts/cultureshop.org/httpdocs/cart.php on
> line 32
>
> The code is:
>
> $SESSION["cart"]->web_order_change( true );
>
> The command 'global $SESSION;' is the first line of the script.
>
> $SESSION is the session variable created with
>
> session_start();
> session_register("SESSION");
don't use session_register(), use the $_SESSION superglobal instead
(notice the underscore) ... you can read in the manual about this.
additionally you need to load in the class before you start the
session.
so the code would look something like:
require 'Cart.class.php';
session_start();
if (!isset($_SESSION['cart']))
$_SESSION['cart'] = new Cart;
function foo()
{
// no need to use global on $_SESSION
$_SESSION["cart"]->web_order_change( true );
}
>
> if ( !isset($SESSION["cart"]) ) {
> $SESSION["cart"] = new Cart;
> }
>
> I am guessing this is a change in OO handling, any idea what is going
> on and how to fix it?
the crux of the problem lies in the use of outdated session semantics, I'm
guess you've just been upgrade from 4.x, is that correct?
>
> Regards,
> Ben
attached mail follows:
On Tue, Mar 4, 2008 at 5:09 AM, Jochem Maas <jochem
iamjochem.com> wrote:
> Ben Edwards schreef:
>
> > Our server has just been upgraded to PHP 5.2.5 and suddenly I am
> > getting the following error:
> >
> > Fatal error: Call to a member function web_order_change() on a
> > non-object in /var/www/vhosts/cultureshop.org/httpdocs/cart.php on
> > line 32
> >
> > The code is:
> >
> > $SESSION["cart"]->web_order_change( true );
> >
> > The command 'global $SESSION;' is the first line of the script.
> >
>
> > $SESSION is the session variable created with
> >
> > session_start();
> > session_register("SESSION");
>
> don't use session_register(), use the $_SESSION superglobal instead
> (notice the underscore) ... you can read in the manual about this.
>
> additionally you need to load in the class before you start the
> session.
>
> so the code would look something like:
>
> require 'Cart.class.php';
> session_start();
>
>
> if (!isset($_SESSION['cart']))
> $_SESSION['cart'] = new Cart;
>
> function foo()
> {
> // no need to use global on $_SESSION
> $_SESSION["cart"]->web_order_change( true );
>
> }
>
> >
> > if ( !isset($SESSION["cart"]) ) {
> > $SESSION["cart"] = new Cart;
> > }
> >
> > I am guessing this is a change in OO handling, any idea what is going
> > on and how to fix it?
>
> the crux of the problem lies in the use of outdated session semantics, I'm
> guess you've just been upgrade from 4.x, is that correct?
>
> >
> > Regards,
> > Ben
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
He might not have loaded the class definition also. That'd lead to
the nasty __PHP_Incomplete_Class. Or maybe it is something to do with
class names in php4 weren't case sensitive whereas in php5 they are.
I've used the unserialize_callback_func feature before to auto load
classes.
Oh I just read that Jim said this earlier, but I'm going to post it
anyways after typing it up. ;)
attached mail follows:
e.g. Draw a box in the middle of page with mouse, then crop it.
----------------------------------------
> CC: php-general
lists.php.net
> From: mydarb
gmail.com
> To: figo2476
hotmail.com
> Date: Mon, 3 Mar 2008 22:25:07 -0800
> Subject: Re: [PHP] Crop part of existing pdf
>
>
> On Mar 3, 2008, at 614PM, gary liang wrote:
>> Is there any command line tool, which is able to crop part of pdf
>> file? I ask for command line tool, because it can be used in php
>> code. Any hint?
>
> Depending on what exactly you mean by "cropping" a pdf, pdftk may be
> what you need.
>
> http://www.accesspdf.com/pdftk/
>
> Brady
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
Overpaid or Underpaid? Check our comprehensive Salary Centre
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fcontent%2Emycareer%2Ecom%2Eau%2Fsalary%2Dcentre%3Fs%5Fcid%3D595810&_t=766724125&_r=Hotmail_Email_Tagline_MyCareer_Oct07&_m=EXT
attached mail follows:
Richard Lynch schreef:
> I am trying to use this:
>
> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable to
> mark message as \\Seen");
3 things:
1. shouldn't it be ST_UID iso FT_UID?
2. the imap bos is opened readonly?
3. er ... I l-i-e-d :-)
> to mark a message as "read"
>
> It does not seem to have any effect on the return values in
> imap_fetch_overview.
>
> Nor does it appear as "read" when I view it with my email client.
>
> The "unseen" count on the mailbox also does not decrease, which I
> would expect if it was "working"
>
> Is there some kind of trick I'm missing?
>
> Is there some OTHER flag/function I'm supposed to be using to mark a
> message as "Read"? I sure can't find it in tfm so far...
>
> The $imap stream is valid, and I can fetch the headers and body just
> fine.
>
> The $uid is from imap_uid and, again, is used to fetch the header and
> body just fine.
>
> I've tried imap_close($imap, CL_EXPUNGE) in the hopes that it would
> "write" the changes, but no such luck.
>
> PHP 4.4.7 Hardened
> Gentoo 2.6.18 hardened R6 SMP
> phpinfo says IMAP c-client Version 2004 w/ SSL support enabled
> Gentoo says courier-imap 4.0.6-r2 is installed, so probably using that.
>
> The versions are out of my control, due to a security and stability
> focus of this install.
>
attached mail follows:
On Tue, March 4, 2008 4:26 am, Jochem Maas wrote:
> Richard Lynch schreef:
>> I am trying to use this:
>>
>> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable to
>> mark message as \\Seen");
>
> 3 things:
>
> 1. shouldn't it be ST_UID iso FT_UID?
Yes, it should...
Fixed that, but no better.
Since FT_UID === ST_UID === 1, that's to be expected, however. :-(
> 2. the imap bos is opened readonly?
I don't think so...
I didn't use the READ_ONLY flag upon opening...
> 3. er ... I l-i-e-d :-)
I do that a lot. :-)
--
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?
attached mail follows:
Richard Lynch schreef:
> On Tue, March 4, 2008 4:26 am, Jochem Maas wrote:
>> Richard Lynch schreef:
>>> I am trying to use this:
>>>
>>> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable to
>>> mark message as \\Seen");
>> 3 things:
>>
>> 1. shouldn't it be ST_UID iso FT_UID?
>
> Yes, it should...
>
> Fixed that, but no better.
>
> Since FT_UID === ST_UID === 1, that's to be expected, however. :-(
I could have guessed that, the manual didn't say what the values were and I
couldn't be bothered to check :-/
>
>> 2. the imap bos is opened readonly?
>
> I don't think so...
>
> I didn't use the READ_ONLY flag upon opening...
I assume you can therefore set 'Seen' flags from other applications?
(might be worth tracing the IMAP conversation to see what your favorite
email app does differently to php's imap extension.
also is it just the 'Seen' flag you can't set or can you not set any kind of
flag? (from my reading I gather there are a few others e.g. 'Flagged' ... which of itself
is rather recursive ;-)
>> 3. er ... I l-i-e-d :-)
>
> I do that a lot. :-)
so that is Dan Brown under the mission impossible mask? :-P
>
attached mail follows:
On Tue, March 4, 2008 11:15 am, Jochem Maas wrote:
> Richard Lynch schreef:
>> On Tue, March 4, 2008 4:26 am, Jochem Maas wrote:
>>> Richard Lynch schreef:
>>>> I am trying to use this:
>>>>
>>>> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable
>>>> to
>>>> mark message as \\Seen");
>>> 2. the imap bos is opened readonly?
>>
>> I don't think so...
>>
>> I didn't use the READ_ONLY flag upon opening...
>
> I assume you can therefore set 'Seen' flags from other applications?
Works fine in webmail anyway.
> (might be worth tracing the IMAP conversation to see what your
> favorite
> email app does differently to php's imap extension.
I mostly use webmail.
I guess I could run Thunderbird and see if it has some kind of trace
mode or something...
> also is it just the 'Seen' flag you can't set or can you not set any
> kind of
> flag? (from my reading I gather there are a few others e.g. 'Flagged'
> ... which of itself
> is rather recursive ;-)
I'm not even sure what the 'Flagged' flag does...
So I could set it, and then wouldn't know for sure how to check it in
another app.
>>> 3. er ... I l-i-e-d :-)
>>
>> I do that a lot. :-)
>
> so that is Dan Brown under the mission impossible mask? :-P
No, it's more that philosophically, almost any non-trivial sentence
contains a certain amount of uncertainty, and is therefore a "lie"
:-)
--
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?
attached mail follows:
On Tue, March 4, 2008 11:39 am, Richard Lynch wrote:
> On Tue, March 4, 2008 11:15 am, Jochem Maas wrote:
>> Richard Lynch schreef:
>>> On Tue, March 4, 2008 4:26 am, Jochem Maas wrote:
>>>> Richard Lynch schreef:
>>>>> I am trying to use this:
>>>>>
>>>>> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable
>>>>> to
>>>>> mark message as \\Seen");
>> also is it just the 'Seen' flag you can't set or can you not set any
>> kind of
>> flag? (from my reading I gather there are a few others e.g.
>> 'Flagged'
>> ... which of itself
>> is rather recursive ;-)
>
> I'm not even sure what the 'Flagged' flag does...
>
> So I could set it, and then wouldn't know for sure how to check it in
> another app.
Well, the "Answered" flag also does not appear to "work", at least as
far as I can see.
PHP IMAP still has 0 for 'answered' and so my webmail client doens't
show a pretty little "A" like it does when I answer email...
--
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?
attached mail follows:
Richard Lynch schreef:
> On Tue, March 4, 2008 11:39 am, Richard Lynch wrote:
>> On Tue, March 4, 2008 11:15 am, Jochem Maas wrote:
>>> Richard Lynch schreef:
>>>> On Tue, March 4, 2008 4:26 am, Jochem Maas wrote:
>>>>> Richard Lynch schreef:
>>>>>> I am trying to use this:
>>>>>>
>>>>>> imap_setflag_full($imap, $uid, "\\\\Seen", FT_UID) or die("Unable
>>>>>> to
>>>>>> mark message as \\Seen");
>
>>> also is it just the 'Seen' flag you can't set or can you not set any
>>> kind of
>>> flag? (from my reading I gather there are a few others e.g.
>>> 'Flagged'
>>> ... which of itself
>>> is rather recursive ;-)
>> I'm not even sure what the 'Flagged' flag does...
I believe it will literally show a little red flag next to a mail in Thunderbird,
at least I have a 'flag this' button and it puts a red flag next to the item ... I never
use it :-)
>>
>> So I could set it, and then wouldn't know for sure how to check it in
>> another app.
>
> Well, the "Answered" flag also does not appear to "work", at least as
> far as I can see.
>
> PHP IMAP still has 0 for 'answered' and so my webmail client doens't
> show a pretty little "A" like it does when I answer email...
so it seems you can't do any kind of 'flagging' with the code you have.
question: what webmail app are you using? written in php by any chance?
worth checking how it sets the flags? maybe break open a copy of roundcube or
something like that and check their code for the tiny little detail you seem
to be missing?
>
attached mail follows:
Eric Butera schreef:
> On Mon, Mar 3, 2008 at 6:18 PM, Chris <dmagick
gmail.com> wrote:
>> > Just FYI, using ADODB will slow down the performance of your app. Any
>> > function calls cost against you and it all adds up.
>>
>> If you remove it, then you remove functionality - so before you go and
>> rip it out, check whether it's the bottleneck using xdebug.
>>
>> I use an abstraction layer all the time and the benefits far outweigh
>> the 'costs'.
>>
>> --
>> Postgresql & php tutorials
>> http://www.designmagick.com/
>>
>
> Hi Chris,
>
> These 'benefits' you talk about really only matter if you switch your
> databases. If this app is written against Oracle and they never plan
> to change it, then it isn't a bad idea to cut out that fat and just
> deal with the native interface. Even writing wrapper functions that
> are very basic that abstract mysql_query or mssql_query end up adding
> a lot of overhead over lots of requests. Look at some of the PDO
> benchmarks. It is slower than the native functions too because it is
> just a wrapper.
>
> Even further if you are writing an app where you care about
> performance you should be writing your SQL to the point where it
> really isn't portable using all the little vendor specific features so
> that you get the most out of it.
>
> From my personal profiling most of my application time is spent in
> data access. So the less layers you have there the faster it runs.
the adodb php layers are insignificant compared to the cost of the db connection
and the round trip to retrieve data from the db. the significant application time
you speak of is undoubtly spent at the database performing and retrieving the
data as opposed to measurable overhead caused by a [number of] wrapper function[s].
high probability that SQL related tweaks (indexing, query restructuring, db tuning)
will win you much, much more than removing any db abstraction layer
>
> But that is just my 2cents on it. :)
>
attached mail follows:
-----Mensagem original-----
De: Jochem Maas [mailto:jochem
iamjochem.com]
Eric Butera schreef:
> On Mon, Mar 3, 2008 at 6:18 PM, Chris <dmagick
gmail.com> wrote:
>> > Just FYI, using ADODB will slow down the performance of your app.
>> Any > function calls cost against you and it all adds up.
>>
>> If you remove it, then you remove functionality - so before you go
>> and rip it out, check whether it's the bottleneck using xdebug.
>>
>> I use an abstraction layer all the time and the benefits far
>> outweigh the 'costs'.
>>
>> --
>> Postgresql & php tutorials
>> http://www.designmagick.com/
>>
>
> Hi Chris,
>
> These 'benefits' you talk about really only matter if you switch your
> databases. If this app is written against Oracle and they never plan
> to change it, then it isn't a bad idea to cut out that fat and just
> deal with the native interface. Even writing wrapper functions that
> are very basic that abstract mysql_query or mssql_query end up adding
> a lot of overhead over lots of requests. Look at some of the PDO
> benchmarks. It is slower than the native functions too because it is
> just a wrapper.
>
> Even further if you are writing an app where you care about
> performance you should be writing your SQL to the point where it
> really isn't portable using all the little vendor specific
features so
> that you get the most out of it.
>
> From my personal profiling most of my application time is spent in
> data access. So the less layers you have there the faster it runs.
the adodb php layers are insignificant compared to the cost of
the db connection and the round trip to retrieve data from the
db. the significant application time you speak of is undoubtly
spent at the database performing and retrieving the data as
opposed to measurable overhead caused by a [number of] wrapper
function[s].
high probability that SQL related tweaks (indexing, query
restructuring, db tuning) will win you much, much more than
removing any db abstraction layer
>
> But that is just my 2cents on it. :)
>
<me>
First of all, thanks for helping me out :)
The vb.net stuff does a lot of business and database stuff, it's
really tied up with the app. Actually I've no idea how it works internally,
all I know is that we send data strings via socket and it returns the
results the same way. It's kind of a black box. :/
I'm going for:
Tune SQL and move a lot of heavy queries directly to
procedures/functions in BD
Tune apache
Perhaps switch from PHP4=>5 (if I'm allowed to)
Try memchache
We had a talk with a sysadmin and tried installing xdebug in the
server, but it's a RHEL4AS w/o php-devel packages (phpize) and we can't find
a RPM for that.... anyone? :)
Thiago
</me>
attached mail follows:
Thiago Pojda wrote:
> -----Mensagem original-----
> De: Jochem Maas [mailto:jochem
iamjochem.com]
> Eric Butera schreef:
>> On Mon, Mar 3, 2008 at 6:18 PM, Chris <dmagick
gmail.com> wrote:
>>> > Just FYI, using ADODB will slow down the performance of your app.
>>> Any > function calls cost against you and it all adds up.
>>>
>>> If you remove it, then you remove functionality - so before you go
>>> and rip it out, check whether it's the bottleneck using xdebug.
>>>
>>> I use an abstraction layer all the time and the benefits far
>>> outweigh the 'costs'.
>>>
>>> --
>>> Postgresql & php tutorials
>>> http://www.designmagick.com/
>>>
>> Hi Chris,
>>
>> These 'benefits' you talk about really only matter if you switch your
>> databases. If this app is written against Oracle and they never plan
>> to change it, then it isn't a bad idea to cut out that fat and just
>> deal with the native interface. Even writing wrapper functions that
>> are very basic that abstract mysql_query or mssql_query end up adding
>> a lot of overhead over lots of requests. Look at some of the PDO
>> benchmarks. It is slower than the native functions too because it is
>> just a wrapper.
>>
>> Even further if you are writing an app where you care about
>> performance you should be writing your SQL to the point where it
>> really isn't portable using all the little vendor specific
> features so
>> that you get the most out of it.
>>
>> From my personal profiling most of my application time is spent in
>> data access. So the less layers you have there the faster it runs.
>
> the adodb php layers are insignificant compared to the cost of
> the db connection and the round trip to retrieve data from the
> db. the significant application time you speak of is undoubtly
> spent at the database performing and retrieving the data as
> opposed to measurable overhead caused by a [number of] wrapper
> function[s].
>
> high probability that SQL related tweaks (indexing, query
> restructuring, db tuning) will win you much, much more than
> removing any db abstraction layer
>
>> But that is just my 2cents on it. :)
>>
>
> <me>
> First of all, thanks for helping me out :)
>
> The vb.net stuff does a lot of business and database stuff, it's
> really tied up with the app. Actually I've no idea how it works internally,
> all I know is that we send data strings via socket and it returns the
> results the same way. It's kind of a black box. :/
>
> I'm going for:
> Tune SQL and move a lot of heavy queries directly to
> procedures/functions in BD
> Tune apache
> Perhaps switch from PHP4=>5 (if I'm allowed to)
> Try memchache
>
> We had a talk with a sysadmin and tried installing xdebug in the
> server, but it's a RHEL4AS w/o php-devel packages (phpize) and we can't find
> a RPM for that.... anyone? :)
>
>
> Thiago
> </me>
>
if its a plesk box, save yourself the time [and the company your wages]
and get a new rhel5 box (if you must stay rhel).
attached mail follows:
On Tue, Mar 4, 2008 at 5:51 AM, Jochem Maas <jochem
iamjochem.com> wrote:
> Eric Butera schreef:
>
>
> > On Mon, Mar 3, 2008 at 6:18 PM, Chris <dmagick
gmail.com> wrote:
> >> > Just FYI, using ADODB will slow down the performance of your app. Any
> >> > function calls cost against you and it all adds up.
> >>
> >> If you remove it, then you remove functionality - so before you go and
> >> rip it out, check whether it's the bottleneck using xdebug.
> >>
> >> I use an abstraction layer all the time and the benefits far outweigh
> >> the 'costs'.
> >>
> >> --
> >> Postgresql & php tutorials
> >> http://www.designmagick.com/
> >>
> >
> > Hi Chris,
> >
> > These 'benefits' you talk about really only matter if you switch your
> > databases. If this app is written against Oracle and they never plan
> > to change it, then it isn't a bad idea to cut out that fat and just
> > deal with the native interface. Even writing wrapper functions that
> > are very basic that abstract mysql_query or mssql_query end up adding
> > a lot of overhead over lots of requests. Look at some of the PDO
> > benchmarks. It is slower than the native functions too because it is
> > just a wrapper.
> >
> > Even further if you are writing an app where you care about
> > performance you should be writing your SQL to the point where it
> > really isn't portable using all the little vendor specific features so
> > that you get the most out of it.
> >
> > From my personal profiling most of my application time is spent in
> > data access. So the less layers you have there the faster it runs.
>
> the adodb php layers are insignificant compared to the cost of the db connection
> and the round trip to retrieve data from the db. the significant application time
> you speak of is undoubtly spent at the database performing and retrieving the
> data as opposed to measurable overhead caused by a [number of] wrapper function[s].
>
> high probability that SQL related tweaks (indexing, query restructuring, db tuning)
> will win you much, much more than removing any db abstraction layer
>
>
> >
> > But that is just my 2cents on it. :)
> >
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hi Jochem,
This is probably true. I was just referring to an old benchmark [1] I
had seen a few years ago.
Of course the biggest win will come from an opcode cache if that is a
possibility.
Just for the record I do use a db wrapper myself but I have weighed
the pros and cons of the situation and determined that it works for
me. I have many low traffic sites so it makes sense to have a wrapper
that delays connections until they're used and such other little
tweaks.
I listen to peoples recoded talks from conferences and I've heard on
many occasions that on single apps they take out the db abstraction.
I wish I could cite references but it is out there if you want to dig
enough.
[1] http://phplens.com/lens/adodb/
attached mail follows:
Eric Butera schreef:
> On Tue, Mar 4, 2008 at 5:51 AM, Jochem Maas <jochem
iamjochem.com> wrote:
>> Eric Butera schreef:
>>
...
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
> Hi Jochem,
>
> This is probably true. I was just referring to an old benchmark [1] I
> had seen a few years ago.
>
> Of course the biggest win will come from an opcode cache if that is a
> possibility.
>
> Just for the record I do use a db wrapper myself but I have weighed
> the pros and cons of the situation and determined that it works for
> me. I have many low traffic sites so it makes sense to have a wrapper
> that delays connections until they're used and such other little
> tweaks.
>
> I listen to peoples recoded talks from conferences and I've heard on
> many occasions that on single apps they take out the db abstraction.
> I wish I could cite references but it is out there if you want to dig
> enough.
duh. ofcourse they do that. remove a layer of abstraction and win some speed.
it a game of dimishing returns, take the big target first - that's usually the
SQL queries, DB tuning. next step might be op-code caching, then data/output caching,
and if that's not enough (or you have enough iron in play to make the numbers add up)
you start to remove maintainability and/or abstraction from your code to win a few
cpu cycles.
php is web-glue, or for the purposes of my metaphor web-butter ... generally the
sandwich is mostly filled with something other than butter.
>
> [1] http://phplens.com/lens/adodb/
>
attached mail follows:
Hello,
I got this e-mail address from the ŒAdd note¹ page within the php.net
website. I was going to post something that was a question and I realised I
was in the wrong place :)
I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit
new to php.
The first question has to do with the static variables. I understand how
this works from the examples, but there is something that I cannot seem to
find clearly stated anywhere on that page.
The example:
<?php
function Test()
{
static $a = 0;
echo $a;
$a++;
}
?>
Of course works (I¹ve tested it on my server), but it is still obscure to
me, according to general programming principles, since I¹m still assigning
zero (0) to $a on each call to the Test function. How does this exactly work
when the static word is found? Is there and index that keeps track of each
call to the function ignoring any assignment in subsequent calls to the
function? Why doens¹t this work when you assign an expression result to the
variable?
The second question has to do with the online manual. I¹ve found several
things on that manual specified in comments and not in the actual manual
part of it. What is the nature of the manual? Contributions from voluteers?
Is there any official manual I can buy that documents everything about the
language from the source? Or any official company that maintains the
language and that possibly offers support as well?
Many thanks in advance for your time.
attached mail follows:
Svevo Romano wrote:
> Hello,
>
> I got this e-mail address from the ŒAdd note¹ page within the php.net
> website. I was going to post something that was a question and I realised I
> was in the wrong place :)
>
> I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit
> new to php.
>
> The first question has to do with the static variables. I understand how
> this works from the examples, but there is something that I cannot seem to
> find clearly stated anywhere on that page.
>
> The example:
>
> <?php
> function Test()
> {
> static $a = 0;
> echo $a;
> $a++;
> }
> ?>
>
> Of course works (I¹ve tested it on my server), but it is still obscure to
> me, according to general programming principles, since I¹m still assigning
> zero (0) to $a on each call to the Test function. How does this exactly work
> when the static word is found? Is there and index that keeps track of each
> call to the function ignoring any assignment in subsequent calls to the
> function? Why doens¹t this work when you assign an expression result to the
> variable?
>
> The second question has to do with the online manual. I¹ve found several
> things on that manual specified in comments and not in the actual manual
> part of it. What is the nature of the manual? Contributions from voluteers?
> Is there any official manual I can buy that documents everything about the
> language from the source? Or any official company that maintains the
> language and that possibly offers support as well?
>
> Many thanks in advance for your time.
>
$static $a = 0;
Here you're essentially saying "new static variable $a with a default
value of 0" - the fact defined staticly means that next time you call
the funtion, $a has a value so therefore doesn't need the default.
:)
attached mail follows:
Svevo Romano schreef:
> Hello,
>
> I got this e-mail address from the ŒAdd note¹ page within the php.net
> website. I was going to post something that was a question and I realised I
> was in the wrong place :)
>
> I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit
> new to php.
>
> The first question has to do with the static variables. I understand how
> this works from the examples, but there is something that I cannot seem to
> find clearly stated anywhere on that page.
>
> The example:
>
> <?php
> function Test()
> {
> static $a = 0;
the preceding line is only run on the first call to the function.
> echo $a;
> $a++;
> }
> ?>
>
> Of course works (I¹ve tested it on my server), but it is still obscure to
> me, according to general programming principles, since I¹m still assigning
> zero (0) to $a on each call to the Test function. How does this exactly work
> when the static word is found? Is there and index that keeps track of each
> call to the function ignoring any assignment in subsequent calls to the
> function? Why doens¹t this work when you assign an expression result to the
> variable?
do something like
function Test()
{
static $a;
if (!isset($a))
$a = 0;
if ($a % 2)
$a = $a * 2;
echo $a++;
}
>
> The second question has to do with the online manual. I¹ve found several
> things on that manual specified in comments and not in the actual manual
> part of it. What is the nature of the manual? Contributions from voluteers?
> Is there any official manual I can buy that documents everything about the
> language from the source? Or any official company that maintains the
> language and that possibly offers support as well?
php.net/ is the official manual. recommended to read it in english so your
looking at the latest version (not always the case in other languages).
user notes/comments are exactly that - notes, tips, gotcha's, examples related
to whatever is documented on a given manual page. occasionally some of the best
user notes are merged into the official documentation.
>
> Many thanks in advance for your time.
>
attached mail follows:
Hi there,
Many thanks for your answer. I've also gone through your example and it took
me 10 minutes to understand how the operator precedence was working there.
Was expecting 1 on the first call :)
But this is not the point. You've nailed my question very preciseley in your
first answer: 'the preceding line is only run on the first call to the
function'.
My only question is (at it is related to the nature of the online manual):
how do you know it and I don't? This thing is the only logical explanation
to the fact the $a doesn't get initialized again to 0 in any subsequent call
to the function, but it's not written anywhere in the manual page. And it
seems the most important statement in my opinion, that justifies what I see
as an exception to a normal flow.
Hope all this makes sense.
Thanks,
S
In 4/3/08 13:14, Jochem Maas, jochem
iamjochem.com ha scritto
> Svevo Romano schreef:
>> Hello,
>>
>> I got this e-mail address from the ŒAdd note¹ page within the php.net
>> website. I was going to post something that was a question and I realised I
>> was in the wrong place :)
>>
>> I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit
>> new to php.
>>
>> The first question has to do with the static variables. I understand how
>> this works from the examples, but there is something that I cannot seem to
>> find clearly stated anywhere on that page.
>>
>> The example:
>>
>> <?php
>> function Test()
>> {
>> static $a = 0;
>
> the preceding line is only run on the first call to the function.
>
>> echo $a;
>> $a++;
>> }
>> ?>
>>
>> Of course works (I¹ve tested it on my server), but it is still obscure to
>> me, according to general programming principles, since I¹m still assigning
>> zero (0) to $a on each call to the Test function. How does this exactly work
>> when the static word is found? Is there and index that keeps track of each
>> call to the function ignoring any assignment in subsequent calls to the
>> function? Why doens¹t this work when you assign an expression result to the
>> variable?
>
> do something like
>
> function Test()
> {
> static $a;
>
> if (!isset($a))
> $a = 0;
> if ($a % 2)
> $a = $a * 2;
>
> echo $a++;
> }
>
>>
>> The second question has to do with the online manual. I¹ve found several
>> things on that manual specified in comments and not in the actual manual
>> part of it. What is the nature of the manual? Contributions from voluteers?
>> Is there any official manual I can buy that documents everything about the
>> language from the source? Or any official company that maintains the
>> language and that possibly offers support as well?
>
> php.net/ is the official manual. recommended to read it in english so your
> looking at the latest version (not always the case in other languages).
>
> user notes/comments are exactly that - notes, tips, gotcha's, examples related
> to whatever is documented on a given manual page. occasionally some of the
> best
> user notes are merged into the official documentation.
>
>>
>> Many thanks in advance for your time.
>>
>
attached mail follows:
On Tue, Mar 4, 2008 at 7:16 AM, Svevo Romano <svevo
svevoromano.it> wrote:
> The second question has to do with the online manual. I¹ve found several
> things on that manual specified in comments and not in the actual manual
> part of it. What is the nature of the manual? Contributions from voluteers?
> Is there any official manual I can buy that documents everything about the
> language from the source? Or any official company that maintains the
> language and that possibly offers support as well?
We (the PHP community) maintain the manual through registered CVS
accounts. As Jochem said, php.net is the official manual - there is
no official manual to buy, and no way for a company to document
everything about the language. This is because, believe it or not,
the language changes multiple times per day, with added functionality
all the time. The best a company could do is document everything on a
specific version.... but by the time that task is complete, the
version documented would be obsolete.
The comments are just posts by whomever feels like typing and
submitting. It's generally a "tips and tricks" sort of thing, and is
an excellent source, but an unofficial source.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Svevo Romano schreef:
> Hi there,
>
> Many thanks for your answer. I've also gone through your example and it took
> me 10 minutes to understand how the operator precedence was working there.
> Was expecting 1 on the first call :)
>
> But this is not the point. You've nailed my question very preciseley in your
> first answer: 'the preceding line is only run on the first call to the
> function'.
>
> My only question is (at it is related to the nature of the online manual):
> how do you know it and I don't? This thing is the only logical explanation
> to the fact the $a doesn't get initialized again to 0 in any subsequent call
> to the function, but it's not written anywhere in the manual page. And it
> seems the most important statement in my opinion, that justifies what I see
> as an exception to a normal flow.
can't remember where I picked up the meaning/working of 'static' - I think I
just worked it out by trial and error, or I read about it sometime on this list :-)
the manual does talk about statics: http://php.net/static
notice you can type 'http://php.net/<FOO>' to go straight to certain docs, replace
<FOO> with a function name, extension name, core concept, or whatever ... if nothing
is found you get a 'did you mean ....?' type page otherwise you go directly to the
relevant manual page.
>
> Hope all this makes sense.
> Thanks,
> S
>
> In 4/3/08 13:14, Jochem Maas, jochem
iamjochem.com ha scritto
>
>> Svevo Romano schreef:
>>> Hello,
>>>
>>> I got this e-mail address from the ŒAdd note¹ page within the php.net
>>> website. I was going to post something that was a question and I realised I
>>> was in the wrong place :)
>>>
>>> I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit
>>> new to php.
>>>
>>> The first question has to do with the static variables. I understand how
>>> this works from the examples, but there is something that I cannot seem to
>>> find clearly stated anywhere on that page.
>>>
>>> The example:
>>>
>>> <?php
>>> function Test()
>>> {
>>> static $a = 0;
>> the preceding line is only run on the first call to the function.
>>
>>> echo $a;
>>> $a++;
>>> }
>>> ?>
>>>
>>> Of course works (I¹ve tested it on my server), but it is still obscure to
>>> me, according to general programming principles, since I¹m still assigning
>>> zero (0) to $a on each call to the Test function. How does this exactly work
>>> when the static word is found? Is there and index that keeps track of each
>>> call to the function ignoring any assignment in subsequent calls to the
>>> function? Why doens¹t this work when you assign an expression result to the
>>> variable?
>> do something like
>>
>> function Test()
>> {
>> static $a;
>>
>> if (!isset($a))
>> $a = 0;
>> if ($a % 2)
>> $a = $a * 2;
>>
>> echo $a++;
>> }
>>
>>> The second question has to do with the online manual. I¹ve found several
>>> things on that manual specified in comments and not in the actual manual
>>> part of it. What is the nature of the manual? Contributions from voluteers?
>>> Is there any official manual I can buy that documents everything about the
>>> language from the source? Or any official company that maintains the
>>> language and that possibly offers support as well?
>> php.net/ is the official manual. recommended to read it in english so your
>> looking at the latest version (not always the case in other languages).
>>
>> user notes/comments are exactly that - notes, tips, gotcha's, examples related
>> to whatever is documented on a given manual page. occasionally some of the
>> best
>> user notes are merged into the official documentation.
>>
>>> Many thanks in advance for your time.
>>>
>
>
attached mail follows:
Hi Daniel,
Many thanks to you as well. I really appreciate your effort in answering my
queries guys. It means I'll do my best with books and the online manual.
And today I've probably found the best resource. The community!
Still, I jusy wonder how Jochem knew that the line is only executed the
first time a function is called while this info is not available on the
online manual. It's maybe all about how close you are to the community and
how many degrees are between yourself and the source?
I mean, I understand the manual is maintained by the community, but I
suppose the language is developed by a small core of programmers that
participate to the general discussion to some extent...
I¹m just trying to figure out the shape of the landscape. I tend to start
from the bigger picture before getting into details. :)
Cheers
In 4/3/08 16:00, Daniel Brown, parasane
gmail.com ha scritto
> On Tue, Mar 4, 2008 at 7:16 AM, Svevo Romano <svevo
svevoromano.it> wrote:
>> The second question has to do with the online manual. I¹ve found several
>> things on that manual specified in comments and not in the actual manual
>> part of it. What is the nature of the manual? Contributions from voluteers?
>> Is there any official manual I can buy that documents everything about the
>> language from the source? Or any official company that maintains the
>> language and that possibly offers support as well?
>
> We (the PHP community) maintain the manual through registered CVS
> accounts. As Jochem said, php.net is the official manual - there is
> no official manual to buy, and no way for a company to document
> everything about the language. This is because, believe it or not,
> the language changes multiple times per day, with added functionality
> all the time. The best a company could do is document everything on a
> specific version.... but by the time that task is complete, the
> version documented would be obsolete.
>
> The comments are just posts by whomever feels like typing and
> submitting. It's generally a "tips and tricks" sort of thing, and is
> an excellent source, but an unofficial source.
attached mail follows:
Ok Jochem,
It makes a lot of sense. Now I know what I can expect from the manual and
what kind of approach I should have. I hope to contribute as well in the
future.
Many thanks,
S
In 4/3/08 16:11, Jochem Maas, jochem
iamjochem.com ha scritto
> Svevo Romano schreef:
>> Hi there,
>>
>> Many thanks for your answer. I've also gone through your example and it took
>> me 10 minutes to understand how the operator precedence was working there.
>> Was expecting 1 on the first call :)
>>
>> But this is not the point. You've nailed my question very preciseley in your
>> first answer: 'the preceding line is only run on the first call to the
>> function'.
>>
>> My only question is (at it is related to the nature of the online manual):
>> how do you know it and I don't? This thing is the only logical explanation
>> to the fact the $a doesn't get initialized again to 0 in any subsequent call
>> to the function, but it's not written anywhere in the manual page. And it
>> seems the most important statement in my opinion, that justifies what I see
>> as an exception to a normal flow.
>
> can't remember where I picked up the meaning/working of 'static' - I think I
> just worked it out by trial and error, or I read about it sometime on this
> list :-)
>
> the manual does talk about statics: http://php.net/static
>
> notice you can type 'http://php.net/<FOO>' to go straight to certain docs,
> replace
> <FOO> with a function name, extension name, core concept, or whatever ... if
> nothing
> is found you get a 'did you mean ....?' type page otherwise you go directly to
> the
> relevant manual page.
>
>>
>> Hope all this makes sense.
>> Thanks,
>> S
>>
>> In 4/3/08 13:14, Jochem Maas, jochem
iamjochem.com ha scritto
>>
>>> Svevo Romano schreef:
>>>> Hello,
>>>>
>>>> I got this e-mail address from the ŒAdd note¹ page within the php.net
>>>> website. I was going to post something that was a question and I realised I
>>>> was in the wrong place :)
>>>>
>>>> I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a
>>>> bit
>>>> new to php.
>>>>
>>>> The first question has to do with the static variables. I understand how
>>>> this works from the examples, but there is something that I cannot seem to
>>>> find clearly stated anywhere on that page.
>>>>
>>>> The example:
>>>>
>>>> <?php
>>>> function Test()
>>>> {
>>>> static $a = 0;
>>> the preceding line is only run on the first call to the function.
>>>
>>>> echo $a;
>>>> $a++;
>>>> }
>>>> ?>
>>>>
>>>> Of course works (I¹ve tested it on my server), but it is still obscure to
>>>> me, according to general programming principles, since I¹m still assigning
>>>> zero (0) to $a on each call to the Test function. How does this exactly
>>>> work
>>>> when the static word is found? Is there and index that keeps track of each
>>>> call to the function ignoring any assignment in subsequent calls to the
>>>> function? Why doens¹t this work when you assign an expression result to the
>>>> variable?
>>> do something like
>>>
>>> function Test()
>>> {
>>> static $a;
>>>
>>> if (!isset($a))
>>> $a = 0;
>>> if ($a % 2)
>>> $a = $a * 2;
>>>
>>> echo $a++;
>>> }
>>>
>>>> The second question has to do with the online manual. I¹ve found several
>>>> things on that manual specified in comments and not in the actual manual
>>>> part of it. What is the nature of the manual? Contributions from voluteers?
>>>> Is there any official manual I can buy that documents everything about the
>>>> language from the source? Or any official company that maintains the
>>>> language and that possibly offers support as well?
>>> php.net/ is the official manual. recommended to read it in english so your
>>> looking at the latest version (not always the case in other languages).
>>>
>>> user notes/comments are exactly that - notes, tips, gotcha's, examples
>>> related
>>> to whatever is documented on a given manual page. occasionally some of the
>>> best
>>> user notes are merged into the official documentation.
>>>
>>>> Many thanks in advance for your time.
>>>>
>>
>>
>
attached mail follows:
On Tue, Mar 4, 2008 at 11:12 AM, Svevo Romano <svevo
svevoromano.it> wrote:
> Still, I jusy wonder how Jochem knew that the line is only executed the
> first time a function is called while this info is not available on the
> online manual. It's maybe all about how close you are to the community and
> how many degrees are between yourself and the source?
Check the section "Using static variables" in the Variable Scope entry here:
http://us.php.net/manual/en/language.variables.scope.php
> I mean, I understand the manual is maintained by the community, but I
> suppose the language is developed by a small core of programmers that
> participate to the general discussion to some extent...
Actually, a good portion of us who maintain the manual maintain
the code, as well. Everything about the language, from the core
engine to web scripting support, is handled entirely by the community.
That's the beauty of open source.
> I'm just trying to figure out the shape of the landscape. I tend to start
> from the bigger picture before getting into details. :)
And welcome to the community, Svevo!
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
I would hazard a guess that the 'static' keyword and functionality
comes from ANSI C. I just pulled "The C Programming Language" by
Kernighan and Ritchie from the book case and it is described there in
it.
Essential book, by the way, IMHO.
--
-David.
When the power of love
overcomes the love of power,
the world will know peace.
-Jimi Hendrix
attached mail follows:
Just one word,
Thanks :)
S
In 4/3/08 16:22, David Giragosian, dgiragosian
gmail.com ha scritto
> I would hazard a guess that the 'static' keyword and functionality
> comes from ANSI C. I just pulled "The C Programming Language" by
> Kernighan and Ritchie from the book case and it is described there in
> it.
>
> Essential book, by the way, IMHO.
attached mail follows:
-----Mensagem original-----
De: Svevo Romano [mailto:svevo
svevoromano.it]
Hi there,
Many thanks for your answer. I've also gone through your
example and it took me 10 minutes to understand how the
operator precedence was working there.
Was expecting 1 on the first call :)
But this is not the point. You've nailed my question very
preciseley in your first answer: 'the preceding line is only
run on the first call to the function'.
My only question is (at it is related to the nature of the
online manual):
how do you know it and I don't? This thing is the only logical
explanation to the fact the $a doesn't get initialized again to
0 in any subsequent call to the function, but it's not written
anywhere in the manual page. And it seems the most important
statement in my opinion, that justifies what I see as an
exception to a normal flow.
Hope all this makes sense.
Thanks,
S
<me>
You can use http://bugs.php.net/report.php to report a documentation
"bug" and they'll change the docs :)
Thiago
</me>
attached mail follows:
At 4:12 PM +0000 3/4/08, Svevo Romano wrote:
>Hi Daniel,
>
>Many thanks to you as well. I really appreciate your effort in answering my
>queries guys. It means I'll do my best with books and the online manual.
>And today I've probably found the best resource. The community!
>
>Still, I jusy wonder how Jochem knew that the line is only executed the
>first time a function is called while this info is not available on the
>online manual. It's maybe all about how close you are to the community and
>how many degrees are between yourself and the source?
>
>I mean, I understand the manual is maintained by the community, but I
>suppose the language is developed by a small core of programmers that
>participate to the general discussion to some extent...
>
>I'm just trying to figure out the shape of the landscape. I tend to start
>from the bigger picture before getting into details. :)
>
>Cheers
Maybe he did the way I do -- and that is by writing code to
investigate these things.
Nothing teaches you better than writing code. It takes all you think
you know and either confirms it or makes you relearn it.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
hi people, hi Stut!
Stut mentioned a little while back that he avoids using the built-in session
mechanism if at all possible, but still manages to track user state ... now I
can think of a way or two that he might do that but I was wondering if
any one could give an idea about the write way to do it in terms of
high performance :-)
tia,
Jochem
attached mail follows:
[snip]
Stut mentioned a little while back that he avoids using the built-in
session
mechanism if at all possible, but still manages to track user state ...
now I can think of a way or two that he might do that but I was
wondering if
any one could give an idea about the write way to do it in terms of
high performance :-)
[/snip]
User state without sessions? This should be interesting....
attached mail follows:
On 4 Mar 2008, at 14:05, Jay Blanchard wrote:
> [snip]
> Stut mentioned a little while back that he avoids using the built-in
> session
> mechanism if at all possible, but still manages to track user
> state ...
> now I can think of a way or two that he might do that but I was
> wondering if
> any one could give an idea about the write way to do it in terms of
> high performance :-)
> [/snip]
>
> User state without sessions? This should be interesting....
That's not quite what I or Jochem said. What I do is basically a
session system but it keeps the session data in encrypted cookies
rather than using a server-side solution. I'm working on an article
for my website that describes exactly how I'm doing it and what the
issues are but it's not ready yet. I'll let the list know when it's
done.
-Stut
--
http://stut.net/
attached mail follows:
Hi,
It depends what do you need to track,
if you need to track small amount of variables you can do it by cookie
I often use it eg here is the state for one user
$state = array{
'logedin'=>true,
'n'=>'Peter',
'id'=>'5',
//anything else you need
}
//at end of you script before outputing any content
//set cookie only for browser session and set path to '/' so it is
available through whole site
setcookie('user_data',serialize($state),null,'/');
At the begining of a script
$state = isset($_GET['user_data']) ? $_GET['user_data'] : null;
if( ! $state ) {
//user doesnt support cookies or this is a search engine set
default $params
$state = array{
'logedin'=>false,
'n'=>null,
'id'=>null,
//anything else you need
}
}
Also you can use some way to detect if the user is not Search engine
to display message like
"To properly use this site you need to enable cookies in your browser
bla bla ...."
This can be done via JS alert message which will not be triggered by
SE but only by real user
On Mar 4, 2008, at 2:57 PM, Jochem Maas wrote:
> hi people, hi Stut!
>
> Stut mentioned a little while back that he avoids using the built-
> in session
> mechanism if at all possible, but still manages to track user
> state ... now I
> can think of a way or two that he might do that but I was wondering if
> any one could give an idea about the write way to do it in terms of
> high performance :-)
>
> tia,
> Jochem
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Bojan Tesanovic
http://www.classicio.com/
attached mail follows:
On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
> I'm working on an article
> for my website that describes exactly how I'm doing it and what the
> issues are but it's not ready yet. I'll let the list know when it's
> done.
Is it done yet?
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On 4 Mar 2008, at 15:52, Daniel Brown wrote:
> On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
>> I'm working on an article
>> for my website that describes exactly how I'm doing it and what the
>> issues are but it's not ready yet. I'll let the list know when it's
>> done.
>
> Is it done yet?
No. I have a day job, that takes priority.
-Stut
--
http://stut.net/
attached mail follows:
On Tue, Mar 4, 2008 at 11:09 AM, Stut <stuttle
gmail.com> wrote:
> On 4 Mar 2008, at 15:52, Daniel Brown wrote:
> > On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
> >> I'm working on an article
> >> for my website that describes exactly how I'm doing it and what the
> >> issues are but it's not ready yet. I'll let the list know when it's
> >> done.
> >
> > Is it done yet?
>
> No. I have a day job, that takes priority.
You're full of crap. I have a day job, too, but I still feel like
I spend half of my time reading and responding to list posts. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Stut schreef:
> On 4 Mar 2008, at 15:52, Daniel Brown wrote:
>> On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
>>> I'm working on an article
>>> for my website that describes exactly how I'm doing it and what the
>>> issues are but it's not ready yet. I'll let the list know when it's
>>> done.
>>
>> Is it done yet?
>
> No. I have a day job, that takes priority.
everyone has an excuse these days ;-)
look forward to reading about it when your done :-)
>
> -Stut
>
attached mail follows:
Daniel Brown schreef:
> On Tue, Mar 4, 2008 at 11:09 AM, Stut <stuttle
gmail.com> wrote:
>> On 4 Mar 2008, at 15:52, Daniel Brown wrote:
>> > On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
>> >> I'm working on an article
>> >> for my website that describes exactly how I'm doing it and what the
>> >> issues are but it's not ready yet. I'll let the list know when it's
>> >> done.
>> >
>> > Is it done yet?
>>
>> No. I have a day job, that takes priority.
>
> You're full of crap. I have a day job, too, but I still feel like
> I spend half of my time reading and responding to list posts. ;-P
you should check the stats mail you send out
... I think it will confirm your feeling ;-)
>
attached mail follows:
On 4 Mar 2008, at 16:11, Daniel Brown wrote:
> On Tue, Mar 4, 2008 at 11:09 AM, Stut <stuttle
gmail.com> wrote:
>> On 4 Mar 2008, at 15:52, Daniel Brown wrote:
>>> On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
>>>> I'm working on an article
>>>> for my website that describes exactly how I'm doing it and what the
>>>> issues are but it's not ready yet. I'll let the list know when it's
>>>> done.
>>>
>>> Is it done yet?
>>
>> No. I have a day job, that takes priority.
>
> You're full of crap. I have a day job, too, but I still feel like
> I spend half of my time reading and responding to list posts. ;-P
Your employer must be so ... erm ... proud.
Anyways, it's a bad time. I have a deadline for the first time in
months, and I intend to hit it!
-Stut
--
http://stut.net/
attached mail follows:
On Tue, Mar 4, 2008 at 11:14 AM, Jochem Maas <jochem
iamjochem.com> wrote:
> Daniel Brown schreef:
> > You're full of crap. I have a day job, too, but I still feel like
> > I spend half of my time reading and responding to list posts. ;-P
>
> you should check the stats mail you send out
> ... I think it will confirm your feeling ;-)
Yeah.... people are going to start thinking Richard Lynch and I
are the same person (like Michael and Janet Jackson). The same week
he goes under the radar, I hit 123 posts.
Ludicrous.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Mar 4, 2008, at 11:11 AM, Daniel Brown wrote:
> On Tue, Mar 4, 2008 at 11:09 AM, Stut <stuttle
gmail.com> wrote:
>> On 4 Mar 2008, at 15:52, Daniel Brown wrote:
>>> On Tue, Mar 4, 2008 at 9:10 AM, Stut <stuttle
gmail.com> wrote:
>>>> I'm working on an article
>>>> for my website that describes exactly how I'm doing it and what the
>>>> issues are but it's not ready yet. I'll let the list know when it's
>>>> done.
>>>
>>> Is it done yet?
>>
>> No. I have a day job, that takes priority.
>
> You're full of crap. I have a day job, too, but I still feel like
> I spend half of my time reading and responding to list posts. ;-P
Ummm... Mr. Brown... I'm pretty sure you do :P You need to talk to
Richard and get the code for his AI so you don't get in trouble for
not getting your work done :)
>
>
> --
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Tue, Mar 4, 2008 at 11:22 AM, Jason Pruim <japruim
raoset.com> wrote:
> On Mar 4, 2008, at 11:11 AM, Daniel Brown wrote:
> > You're full of crap. I have a day job, too, but I still feel like
> > I spend half of my time reading and responding to list posts. ;-P
>
> Ummm... Mr. Brown... I'm pretty sure you do :P You need to talk to
> Richard and get the code for his AI so you don't get in trouble for
> not getting your work done :)
Amazingly, I do get all of my stuff done. Granted, I'm in front
of a computer seven days per week, and usually a minimum of 10-12
hours per day, but what else would I do? Spend time with the
pre-wife?
Shyeah, right.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
At 12:15 PM -0500 3/4/08, Daniel Brown wrote:
> Amazingly, I do get all of my stuff done. Granted, I'm in front
>of a computer seven days per week, and usually a minimum of 10-12
>hours per day, but what else would I do? Spend time with the
>pre-wife?
You're working on wife 1.0 beta -- wait until you're fully developed
into wife 2.0.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
tedd wrote:
> At 12:15 PM -0500 3/4/08, Daniel Brown wrote:
>> Amazingly, I do get all of my stuff done. Granted, I'm in front
>> of a computer seven days per week, and usually a minimum of 10-12
>> hours per day, but what else would I do? Spend time with the
>> pre-wife?
>
>
> You're working on wife 1.0 beta -- wait until you're fully developed
> into wife 2.0.
>
> Cheers,
>
> tedd
>
If I ever had any doublt I was reading a programmer's list, I don't now.
ps: I'm on RC4
attached mail follows:
Dani Castaños wrote:
>
>> As a little project, I took the link provided by "the other" Rob and
>> make this little search tool.
>>
>> It only looks at the beginning numbers. It does no number
>> validation. I don't validate the length of the number. ie: I would
>> have to know the min/max lenth of each phone number for that given
>> country/region, and I didn't search for that information.
>>
>> Let me know what you'll think.
>>
>> http://www.cmsws.com/examples/php/areacodes/countrycodes.php
>>
>
> It's enough for me... Can you send me the code please?
>
I am making the source available here.
http://www.cmsws.com/examples/php/areacodes/countrycodes.phps
Take note, this is not a complete list of all the possible country/region codes,
I made it more specific where needed. A couple countries have the same country
code, so from the page mentioned before, I took and got a little more specific,
just so there wasn't any collisions. There still are, and in that case, I
"join" all the country names together with " or ". Should work for most cases,
you could always just pull the first country name listed. You will see what I
mean when you look at the code.
--
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:
At 4:42 PM -0500 3/3/08, Daniel Brown wrote:
>On Mon, Mar 3, 2008 at 3:13 PM, Keikonium <Keikonium
hotmail.com> wrote:
>> This may not be exactly what you think, but I didn't know how else to word
>> the title. I basically need to make a script that will go through every
>> possible color combination and print them to look just like (or similar) to
> > the windows color picker. I need it in the format X-Y-Z. For example:
>
>
> It's also available to view here (but the demo is limited to save
>my server from Yahoo! Slurps, Google grabs, etc.):
> [Demo] http://www.pilotpig.net/code-library/colorpicker.php
> [Source]
>http://www.pilotpig.net/code-library/source.php?f=colorpicker.php
While people are giving demo's, check this out:
http://webbytedd.com/c/access-color/
The code is there, it's javascript.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, Mar 4, 2008 at 10:44 AM, tedd <tedd.sperling
gmail.com> wrote:
> While people are giving demo's, check this out:
>
> http://webbytedd.com/c/access-color/
>
> The code is there, it's javascript.
Ooh, it's purdy and shiny and I like it.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Along the lines of tedd, I will share this one.
http://www.colourlovers.com/blog/2008/01/16/free-advanced-dhtml-color-picker/
--
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:
At 6:58 PM -0800 2/28/08, Richard S. Crawford wrote:
>I'm trying to figure out a way to make sure an included PHP file has no syntax
>errors before actually including it as a part of project. Is this even
>possible? I'm running into brick walls.
I'm not sure if this is what you are asking for, but occasionally I
have an include file that just brings functions and sometimes I want
to know if that file has any errors in it.
As such, I simply add echo('a'); at the beginning of the file. If I
run the script that includes that include and see an 'a' printed at
the top of the page, then I know that the include has no syntax
errors. Then it's simple to comment out that line.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 7:52 PM +0000 2/29/08, Richard Heyes wrote:
>>1. My host does not allow command line access and has disabled shell
>>execution of PHP;
>>
>>2. Error reporting has been turned off and I can't seem to turn that on
>>with ini_set or error_reporting (which is fun when I have minor syntax
>>errors to fix); and
>>
>>3. My host is also stuck in PHP 4.3, so the check_syntax function isn't
>>available to me either (although I understand that this function has been
>>deprecated in the most recent builds of PHP).
>
>To be quite honest, your host sounds like it sucks donkey dick. Get
>another if you can.
Try:
http://www.pilotpig.com/
They do it much better (hosting, not the donkey thing). :-)
Cheers,
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Tue, Mar 4, 2008 at 11:29 AM, Mike Potter <ssskibeh
gmail.com> wrote:
> On Fri, Feb 29, 2008 at 2:25 PM, Daniel Brown wrote:
> > On Thu, Feb 28, 2008 at 9:58 PM, Richard S. Crawford
> > > I'm trying to figure out a way to make sure an included PHP file has no syntax
> > > errors before actually including it as a part of project. Is this even
> > > possible? I'm running into brick walls.
> >
> > As far as I know, the only way to do that is via the CLI (or
> > accessing the include file directly in the browser).
>
> I'm wondering why the include couldn't be given a dry run in a test
> file, migrated to the live file if all goes well. Am I missing
> something obvious?
No, that would work fine in any case. In fact, code should always
be thoroughly tested before going into production.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
At 12:05 PM -0500 3/4/08, Daniel Brown wrote:
> No, that would work fine in any case. In fact, code should always
>be thoroughly tested before going into production.
Yeah, but that rules out all the fun.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
Howdy group!
I know that this is not a PHP question (but it will work with a PHP app)
but I thought I would ask the smartest group of people I know if they
have any clue or would be familiar with a device I can use. I need to
purchase a small GPS receiver/antenna that will plug into a USB port.
Then I need to access the port (Ajax? Java?) while in my web application
to deliver the coordinates to my PHP application. That will give me the
physical location of the machine accessing the application.
Any insight will be valuable.
attached mail follows:
http://www.phpclasses.org/browse/package/3507.html
bastien> Date: Tue, 4 Mar 2008 10:18:15 -0600> From: jblanchard
pocket.com> To: php-general
lists.php.net> Subject: [PHP] GPS Locator> > Howdy group!> > I know that this is not a PHP question (but it will work with a PHP app)> but I thought I would ask the smartest group of people I know if they> ha