[PHP] Re: $$var

2011-03-07 Thread Colin Guthrie
'Twas brillig, and sexyprout at 06/03/11 15:16 did gyre and gimble: > ∞ And beyond! -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hack

[PHP] Re: Quotes in Heredoc

2011-02-28 Thread Colin Guthrie
mages/spacer.gif"> > Actually, in xhtml the tag would need a corresponding tag, or it can be self closing: e.g. (technically the space before the /> bit above is not needed, but used to be needed to stop older versions of IE from exploding... these probably are not worth worrying

[PHP] Re: "public static" or "static public"?

2011-01-29 Thread Colin Guthrie
is all ties in with my view, so I'm not really complaining :D Cheers for the insights. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker

[PHP] "public static" or "static public"?

2011-01-28 Thread Colin Guthrie
then "static", but others may have valid reasons/arguments for preferring the other way. WDYT? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/]

[PHP] Re: Flexible application plugin architecture, is this possible?

2011-01-04 Thread Colin Guthrie
stantiate" function, but > does it have any similar mechanism that would work to automatically > load alternate classes, or have a class dynamically overload > itself during runtime? Well difference techniques require different approaches, but certainly a factory approach is likely the

[PHP] Re: Under which distribution(s) is PHP developed, compiled, and tested?

2010-12-15 Thread Colin Guthrie
has released RHEL 6 which supports PHP 5.3 > CentOS has not released even a beta 6 version yet that supports PHP 5.2+ The *official* RPMs for CentOS 5.5 are PHP 5.1.6 but there are plenty third party repos where never versions are made available. e.g. http://iuscommunity.org/getting-started/ HT

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
ystems :s I'll take the build process for a spin at some point, but they really do need to make it more streamlined. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contribut

[PHP] Re: Apache mod_pagespeed

2010-11-04 Thread Colin Guthrie
r using it than doing all this stuff myself. That said, it's often nice to think about these things rather and learn about the consequences than just blunder on and hope for the best. This module will result in a bit of "dumbing down" of devs, but that's not to say I

[PHP] Re: Looking for an open-source project

2010-10-25 Thread Colin Guthrie
'Twas brillig, and Mert Oztekin at 25/10/10 13:23 did gyre and gimble: > I am looking for an open-source project to help and make some fun. Anyone has > suggestions? How about helping out Zend Framework, adding useful classes for various Service integrations etc.? Col -- Colin Gu

[PHP] Re: daemon

2010-10-07 Thread Colin Guthrie
x27;s what I do too. Of course systemd will change everything "initscript" related, but I don't expect it to hit production servers for a while. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/]

[PHP] Re: Bitwise NOT operator?

2010-08-25 Thread Colin Guthrie
n fact represented by whatever the variable type is. In this case it's a 32 bit integer number. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.m

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:55 did gyre and gimble: > On Fri, Aug 20, 2010 at 10:19 AM, Colin Guthrie wrote: >> The customer is always right -> in his own mind (even if not in his RIGHT >> mind) <- after all! > > Corrected that for you. ;-)

[PHP] Re: Bitwise NOT operator?

2010-08-20 Thread Colin Guthrie
actual fact you are working with a 32-bit number. If you did $bin = 2; $notbin = ~$bin & 3; Then this should get the results you want. The bitwise & 3 bit essentially limits things to a 2-bit number. (3 in binary is represented by 1's for the two LSBs and 0's for all oth

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
t;thing" names for some clients. This allowed our clients to keep a solid control over it and make sure that the name were relevant and accurate! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source:

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
'Twas brillig, and Andrew Ballard at 20/08/10 15:04 did gyre and gimble: > On Fri, Aug 20, 2010 at 9:31 AM, Colin Guthrie wrote: >> Speaking of SEO, that was one of our concerns about randomising listings >> too. What impact do you think such randomised listings will have on

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
this actually result in SEO penalties? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac

[PHP] Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
..32 as my seed, then I still get the same net result as a 32 column table. If I just change my "seed offset" then I get the same result as re-generating my random data tables. >From an operational perspective, RAND(seed) is certainly easier. I'll certainly look into th

[PHP] Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

2010-08-20 Thread Colin Guthrie
es I've missed? Is there some cunning, cleverness that eludes me? Are there any problems with the above approach? Would a caching proxy ultimately cause problems for some users (i.e. storing a cache for page 1 and page 2 of the same listing but with different randomisations)? And if s

[PHP] Re: tutorial failure

2010-08-20 Thread Colin Guthrie
command line. There is no such thing as "installing php" - you install which system you want: command line (php-cli), apache module (apache-mod_php) or cgi (php-cgi). I work with LAMP stacks on various flavours servers and I find the Mandriva one to be very, very well thought out, and

[PHP] Re: tutorial failure

2010-08-19 Thread Colin Guthrie
es (especially your apache configuration) then you really do need to sit down and learn how everything works and how things fit together. As you're presumably just starting out, I'd recommend sticking to the basics, install task-lamp and then go from there. HTHs Col --

[PHP] Re: Including files on NFS mount slow with APC enabled

2010-08-17 Thread Colin Guthrie
Is this a > bug? I don't know the internals of APC but that smells like a bug to me. Can you post the bug number here if you report one? Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Op

[PHP] Re: PHP images server

2010-08-05 Thread Colin Guthrie
ecessary stuff to generate it and upload to AWS, then carry on. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaud

[PHP] Re: php array in different OS

2010-07-23 Thread Colin Guthrie
o is something like: ini_set('memory_limit', '50M'); and you'll be fine. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http:/

[PHP] Re: Logical reason for strtotime('east') and strtotime('west') returning valid results?

2010-04-06 Thread Colin Guthrie
ity? Yeah, that's why I said "the relevant authorities". I couldn't remember off-hand where it came from so figured I'd not blame "PHP" just yet :p Cheers Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http:

[PHP] Logical reason for strtotime('east') and strtotime('west') returning valid results?

2010-04-05 Thread Colin Guthrie
928) The last one is valid! But the other two appear to do much the same thing... Can anyone think of why this would be valid results before I report this to the relevant authorities? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www

[PHP] Re: I need a fresh look at storing variables in MySQL

2010-03-15 Thread Colin Guthrie
rything that needs escaping and no logic for the "is it or is it not already escaped" leaks into this layer. (I appreciate strip tags and htmlspecialchars are not the same and my general usage may not apply to a pure striptags usage). > at any rate, strip_tags() doesn't belong

[PHP] Re: Uninstalling PHP?

2010-02-28 Thread Colin Guthrie
likely want to pass it through "sudo" first. e.g. sudo ./apachectl graceful. You should be prompted for you *user* password. If you user is allowed to administer the machine, you should become root temporarily and run the command. If you run several sudo commands in relatively quick s

[PHP] Re: Enforce a constant in a class.

2010-01-25 Thread Colin Guthrie
n other methods you want to provide in the base class. I don't see why constants specifically are needed here. Rather than using reflection you can just use instanceof or similar to tell if a given object implements the interface or simply use the interface name as a type specifier on an argum

[PHP] Re: Emergency! Performance downloading big files

2009-12-02 Thread Colin Guthrie
sult I found on this issue which explains it a bit. http://codeutopia.net/blog/2009/03/06/sending-files-better-apache-mod_xsendfile-and-php/ Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Lin

[PHP] Re: Is select_db necessary?

2009-08-13 Thread Colin Guthrie
matching/replacing, concatenation or whatever). So perhaps it depends on your view point and preconceptions and we're both coming at the "flexible" and "offloading" arguments with different starting views. Anyway, I only asked out of curiosity which I thin

[PHP] Re: Is select_db necessary?

2009-08-12 Thread Colin Guthrie
ify it once in your bootstrap/connection code? Thus doing tests on other dbs etc. is a pretty simple switch of the connection code. Also telling the db engine what database you want to use in every query is not, IMO, leaving the selection in the the database's hands. Just curious as to the

[PHP] Re: Upgrading to PHP5.2.x

2009-08-11 Thread Colin Guthrie
ly working system. HTHs Col. -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Ha

[PHP] Re: Array

2009-08-10 Thread Colin Guthrie
ivate", ); Ahh someone else who always puts a closing , on the end of array definitions to cut down on VCS diff/patch churn. Excellent :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: M

[PHP] Re: Dan Brown

2009-08-04 Thread Colin Guthrie
e now bobbing around downstairs. I hope they've gone to Silicon Heaven. Sad news indeed. Col PS Oh yeah and congrats on the whole baby thing too although it's hardly the most poignant story :p -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogi

[PHP] Re: 2 ifs embedded? (RESOLVED)

2009-08-01 Thread Colin Guthrie
7;) == true empty(0) == true empty('0') == true empty(1) == false empty(2) == false empty('foo') == false I suspect you were just being bitten by a misconception of what empty() was supposed to do when you passed certain values to it. isset() and empty() are subtly different. Co

[PHP] Re: Progressbar

2009-06-25 Thread Colin Guthrie
ogress bar for file upload built in. http://www.framework.zend.com/manual/en/zend.file.html#zend.file.transfer.introduction.uploadprogress HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mand

[PHP] Re: I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-23 Thread Colin Guthrie
hen perhaps spend two or three sessions at the end covering the newer stuff from PHP 5.3. That's probably the way I'd go, and you can give people some prior warning to try and get a PHP 5.3 install up and running for the x'th week of the course. Col -- Colin Guthrie gmane(at

[PHP] Re: Periodic Actions in PHP?

2009-06-13 Thread Colin Guthrie
ient is pulling periodically so it's the client that sets the timer. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http:/

[PHP] Re: SHOULD I NOT USE "ELSE" IN IF STATEMENTS....?

2009-06-09 Thread Colin Guthrie
in the opposite, it's the same amount of tracking to look through the code itself. As with everything in programming style, this mostly comes down to personal preference. So just stick with a style you like :) People get almost as emotive about this topic as top-posting on mailing lists

[PHP] Re: Paypal and Php

2009-05-02 Thread Colin Guthrie
interact with PayPal? Proposal and discussion page is here for the overall Zend_Payment concept: http://framework.zend.com/wiki/display/ZFPROP/Zend_Payment+-+Vadim+Gabriel But check the zend framework general mailing list archive for better information. Col -- Colin Guthrie gmane(at

[PHP] Re: PHP6 return by reference deprecation

2009-05-02 Thread Colin Guthrie
'Twas brillig, and Larry Garfield at 02/05/09 20:00 did gyre and gimble: On Saturday 02 May 2009 9:30:09 am Colin Guthrie wrote: 'Twas brillig, and Paul M Foster at 02/05/09 06:07 did gyre and gimble: If this is going away, how do you return things by reference, so as to ensure a s

[PHP] Re: PHP6 return by reference deprecation

2009-05-02 Thread Colin Guthrie
private constructor and which enforces the use of the getInstance() method. This is a very common design pattern, and is ideally suited to this use case. HTHs Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/]

[PHP] Re: Two very useful PHP functions

2009-04-30 Thread Colin Guthrie
out knowing an API function. Also, most of the cases that you would use these functions are with input from GET args and the like. Most frameworks provides wrappers for this with handy ways to get the defaults etc. So overall, I can't see this becoming a core PHP feature. Col -- Co

[PHP] Re: PHP task manager

2009-03-31 Thread Colin Guthrie
ng you can get involved with? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hac

[PHP] Re: linux sha1sum .vs php sha1

2009-03-20 Thread Colin Guthrie
, echo a.dat will echo the file *name* a.dat not it's contents. You probably want to use "cat" instead. 3. You care redirecting (>) rather than piping (|). So waht you really want is: cat a.dat | sha1sum (the -t is not needed). You can also do: echo -n "1234567

[PHP] Re: Unique User Hashes

2009-02-18 Thread Colin Guthrie
airly easy to guess ;) Of course this may not be appropriate in this circumstance. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] Pul

[PHP] Re: XSLTProcessor help

2009-02-17 Thread Colin Guthrie
hicle: Hellooo Works fine. Are you sure you are not doing something odd in the calling code? e.g. make sure you are calling transformToXML() properly. Perhaps slap all your files somewhere so we can download and test for you. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/

[PHP] Re: ssh2_tunnel

2009-02-17 Thread Colin Guthrie
you can access your webserver via "http://private.office.com/";. If you wanted to access the office web server on your local machine you would do: ssh -L 8080:private.office.com:80 m...@my.office.com Then you would point your browser at: http://localhost:8080/ And you should see your of

[PHP] Re: inset data to multiple tables

2009-02-16 Thread Colin Guthrie
;SQL Injection Attacks". You should look into using the function mysql_real_escape_string() to escape all your inputs. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Co

[PHP] Re:

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Eric Butera at 16/02/09 20:01 did gyre and gimble: On Mon, Feb 16, 2009 at 2:58 PM, Colin Guthrie wrote: 'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: Those reply lines are funny. =) Can't take credit as I saw someone else wi

[PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Per Jessen at 16/02/09 13:49 did gyre and gimble: Colin Guthrie wrote: Yeah the cheap CA's are IMO actually a problem. I (personally) think we should have a new system for this scenario: http:// = totally insecure https:// = secure and to a reasonable degree of

[PHP] Re:

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: ... Sorry, should've mentioned, I'm talking about PHP6. Not heard about it but I'd like it. Short tags are evil but the thing is pretty handy so having a Col -- Colin Guthrie gmane(at

[PHP] Re: for the security minded web developer - secure way to login?

2009-02-16 Thread Colin Guthrie
'Twas brillig, and Michael A. Peters at 16/02/09 00:10 did gyre and gimble: Colin Guthrie wrote: 'Twas brillig, and German Geek at 15/02/09 22:32 did gyre and gimble: Please enlighten me why it is so expensive? Is it maybe just the hassle of setting it up? The whole thing is a

[PHP] Re: XSLTProcessor help

2009-02-16 Thread Colin Guthrie
that you are outputting XML-derived data... eg. try putting this before your : omit-xml-declaration="yes"/> Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributo

[PHP] Re: for the security minded web developer - secure way to login?

2009-02-15 Thread Colin Guthrie
individual manages to get a secure certificate for a domain they do not own they could then use some form of DNS hijacking (e.g. via an open wireless network or similar) to perform some pretty convincing phishing scams. So it's not just about the cert. It's the trust that goes with it. Co

[PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Colin Guthrie
'Twas brillig, and Jochem Maas at 12/02/09 12:47 did gyre and gimble: Colin Guthrie schreef: 'Twas brillig, and Nick Cooper at 12/02/09 11:38 did gyre and gimble: Outputs: a1: 09d264fcececf51c822c9382b40e3edf a2: 45701af64172cbc2a33069dfed73fd07 a3: 09d264fcececf51c822c9382b

[PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Colin Guthrie
-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies You should report the bug: http://bugs.php.net/ Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contri

[PHP] Re: APC problem with PHP

2009-02-11 Thread Colin Guthrie
solid threading wise. It has various locking mechanisms that you can compile in to APC, including filelocks, IPC semaphores, spinlocks and pthread mutexes. So while I don't want to comment inaccurately, I suspect that APC is pretty solid in this area. Col -- Colin Guthrie gmane(at)coli

[PHP] Re: Throwing an exception seems to defeat output buffering

2009-02-03 Thread Colin Guthrie
flushed (displayed). If you don't want any output, make sure your catch block first calls ob_end_clean() before it exits. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandri

[PHP] Re: [PROJECT HELP] - JotBug - A Project Management & Issue Tracker written 100% with Zend Framework

2009-01-28 Thread Colin Guthrie
t too much invested in Trac (and the plugins I wrote) to jump ship right now. I wish you all the best of luck tho', and I'll monitor this to see what progress you make :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.t

[PHP] Re: Zend Framework...where to start? -- do

2009-01-15 Thread Colin Guthrie
quot; (remember "better" != "raw performance") for you. Col PS FWIW, I have adopted Zend_Framework and while some of the paradigms don't fully suit me I have extended and adapted them to make it work very well for me. -- Colin Guthrie gmane(at)coli

[PHP] Re: FirePHP -- pretty cool

2009-01-11 Thread Colin Guthrie
deoffs. If you really want it to be efficient, you can format your code in such a way that a script would process your files and comment out all the log calls. Depends whether it's worth the effort to do this really! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.i

[PHP] Re: Unique Object Instance ID..?

2009-01-10 Thread Colin Guthrie
extension php-uuid. The other way of doing it would be to insert a row into a database row with an auto-increment field and use the value of that auto-incrment field as your identifier (SELECT LAST_INSERT_ID() in mysql or via the db layers API). HTHs Col -- Colin Guthrie gmane(at

[PHP] Re: Zend framework

2008-12-24 Thread Colin Guthrie
ly when you are trying to retro fit it to an existing project). But if you just spend a few days reading through the manual you'll be totally fine. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source

[PHP] Re: MERRY XMAS

2008-12-24 Thread Colin Guthrie
'Twas brillig, and Jay Blanchard at 24/12/08 12:07 did gyre and gimble: [snip] ...greetings from around the world [/snip] Merry Chrismakwanzica! Happy Festivus! Indeed. Happy Annual Gift Giving Day (when it comes!) to one and all. Col -- Colin Guthrie gmane(at)colin.guthr.ie

[PHP] Re: ACL Framework / Library

2008-12-24 Thread Colin Guthrie
ks, Feris Zend has their ACL as part of the framework http://framework.zend.com/manual/en/zend.acl.html +1 on that one. Remember that you don't need to use the whole framework... you can just pick out the Zend_Acl stuff easily enough. Col -- Colin Guthrie gmane(at)coli

[PHP] Re: Foreign Keys Question

2008-12-12 Thread Colin Guthrie
activated" Facebook accounts etc. to realise that hiding or disabling data is not enough in many cases. Food for thought! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contribut

[PHP] Re: Foreign Keys Question

2008-12-12 Thread Colin Guthrie
o NULL). All three are useful in different contexts. I use them extensively to ensure good data integrity. The trade off on extra load on insert/update is IMO well worth it. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.trib

[PHP] Re: Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-12 Thread Colin Guthrie
s I'm poked with a pointy stick!) but I hear good things. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacke

[PHP] Re: How serialize DOMDocument object?

2008-12-12 Thread Colin Guthrie
p and __wakup functions that essentially do the save/load for you. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
'Twas brillig, and Chris at 12/12/08 01:20 did gyre and gimble: Micah Gersten wrote: Colin Guthrie wrote: The ON DELETE CASCADE option is key here... "DELETE FROM students where student_id=1" will remove all traces of that student from the db... all the course they'

[PHP] Re: Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-11 Thread Colin Guthrie
erver, basically I want to know which is easiest? LOL... Personally I'm a ZF fan, but each to their own. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.ma

[PHP] Re: Foreign Keys Question

2008-12-11 Thread Colin Guthrie
... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the structure in your code all over the place. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://

[PHP] Re: converting a vid with ffmpeg - howto do progress bars?

2008-12-10 Thread Colin Guthrie
- with the cron job/daemon approach you can control how many jobs are performed at the same time and thus limit the load. Just some thoughts. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandri

[PHP] Re: Convert .docx /.pdf file to .txt

2008-12-06 Thread Colin Guthrie
conds on google I found: http://sourceforge.net/project/showfiles.php?group_id=235455 If it works or not I have no idea! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor

[PHP] Re: Accessing the 'media' attribute in php

2008-12-03 Thread Colin Guthrie
entries" each with 5 mini-pages and you add a print version you are changing the number from 5 to 6, not 5000 to 6000. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contrib

[PHP] Re: Memcached as Session Handler

2008-11-10 Thread Colin Guthrie
tainly can help in some circumstances. If you want to expand to a dual server with round-robin DNS load balancing, then memcache will defo help. No idea about benchmarks and performance vs files tho' so can't really help with that! Col -- Colin Guthrie gmane(at)colin.guthr.ie h

[PHP] Re: PHP / Procmail / MIME decoder, Imagemagick, MySQL, PDF fax management system

2008-11-10 Thread Colin Guthrie
said, the PEAR MimeDecode classes do a fair job of this. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/

[PHP] Re: It's Sunday, and I'm bored...

2008-11-09 Thread Colin Guthrie
Jochem Maas wrote: you're not 'loose' the asylum is just bigger than you realise ... most people know it by it's other name ... Earth. Yeah the "outside" of the Asylum is pretty small... if you don't believe me, ask Wonko the Sane... So long :

[PHP] Re: PHP and Cyrus problem

2008-11-07 Thread Colin Guthrie
urged from the inbox, because the inbox is just a "new mail" filter etc. etc. As the original problem showed a IMAP+Webmail solution, I'd imagine IMAP support and a dedicated client is important. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job:

[PHP] Re: PHP and Cyrus problem

2008-11-07 Thread Colin Guthrie
-- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] -- PHP

[PHP] Re: PHP XSLT caching

2008-10-27 Thread Colin Guthrie
ded. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] -- P

[PHP] Re: PHP XSLT caching

2008-10-26 Thread Colin Guthrie
vladimirn wrote: Thank you Col I will go into Zend_Cache as you suggested. One more thing- does Zend_Cache saces data into file or use a server memory? As I said in my original mail, but perhaps wasn't clear, Zend_Cache can support file, memcache, APC and other backends. Col --

[PHP] Re: PHP XSLT caching

2008-10-26 Thread Colin Guthrie
#x27;d strongly recommend using the Zend_Cache system. http://www.framework.zend.com/manual/en/zend.cache.html Zend cache will support disk-based caching and memcache or APC too all via the same API. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogi

[PHP] Re: Replacing with f*ck and f*cking

2008-10-26 Thread Colin Guthrie
;Scunthorpe" as your example :p Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-24 Thread Colin Guthrie
a while, check for entries with this field empty and generate it. Yeah I'd suspect that the storage overhead is nothing compared to the speed increase you'll get during the read operations if you don't have to "dick around" with the data :) (yes I'm comparing bits t

[PHP] Re: Politics

2008-10-23 Thread Colin Guthrie
Daniel P. Brown wrote: Mandriva Linux Contributor [http://www.mandriva.com/] Hooray for Cooker! :D -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http

[PHP] Re: Politics

2008-10-23 Thread Colin Guthrie
while I was in the hospital. Internal bleeding is overrated. Some day I'll have to check the archives. Ohh dear, doesn't sound like fun :s Hope you're on the mend now. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http

[PHP] Re: XCache, APC, Memcached... confused

2008-10-23 Thread Colin Guthrie
P6, which is why I'm currently backing that particular horse), but for an application-level caching strategy, I think Zend_Cache has a lot going for it :) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open

[PHP] Re: Singletons

2008-10-22 Thread Colin Guthrie
etely crap. I didn't realise there was such a limitation in PHP's object heirarchy. Wonder why it's like this... Can't think of a valid reason... Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/

[PHP] Re: Singletons

2008-10-22 Thread Colin Guthrie
__construct() { parent::__construct("Singleton"); } public static function getInstance() { static $instance = null; if (!isset($instance)) $instance = new self(); return $instance; } } $bar = Singleton::getInstance(); $bar->getFoo(); // "Single

[PHP] Re: 1 last error to fix before the application is done!

2008-10-15 Thread Colin Guthrie
Jochem Maas wrote: Colin Guthrie schreef: if(!empty($_SESSION['userInfo']['loggedin'])) { if (Sess::userLoggedIn()) { /* ... :-) */ } Well, yes, that's how I do it in my apps too, but in internally in that function you may want to use the empty() call :) I agr

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
ay test, I still get ~3x speed improvement using empty() vs. array_key_exists(). Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
Done: 1000 3.01user 0.01system 0:03.06elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2797minor)pagefaults 0swaps There's a benchmark for you (not sure if it's the one you wanted) which proves that the !empty() is ~4.5x faster. Use !empty() :p Col --

[PHP] Re: BarcodeDB.com - a Barcode Database

2008-10-14 Thread Colin Guthrie
this is you can setup various things in your app as you see fit, like a TTL (time to live) or specific (i.e. restricted) permissions assigned to different API keys generated by a user. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http:/

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
elsewhere on this thread, !empty(..) is a better way of doing this as it works in the case when the value is set to FALSE too. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Li

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
Colin, Does the ! reverse the empty in this case? such as !empty = not empty? Yes. That's what the ! always does. It's the "not" operator in PHP (and most languages): http://uk3.php.net/manual/en/language.operators.logical.php Col -- Colin Guthrie gmane(at

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
ere you may want to use array_key_exists where isset() and empty() would fail, e.g. $arr['foo'] = null; isset($arr['foo']) == false !empty($arr['foo']) == false array_key_exists('foo', $arr) == true Col -- Colin Guthrie gmane(at)colin.guthr.ie http://

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Colin Guthrie
kler for compact code: if(!empty($_SESSION['userInfo']['loggedin'])) { empty() is like isset() but tests for all sorts of "empty" cases ('', false, null and 0 are all considered, "empty"). Col -- Colin Guthrie gmane(at)colin.guthr.ie htt

Re: [PHP] Re: 37 Pictures the World must see

2008-10-04 Thread Colin Guthrie
think what I have to say spam without actually taking a little time to consider it. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hac

  1   2   3   4   5   6   >