Re: [PHP] Application settings, configuration, and preferences.

2010-10-27 Thread J Ravi Menon
On Wed, Oct 27, 2010 at 11:39 AM, J Ravi Menon wrote: > I am partial to the filesystem but I can see scenarios where the db > approach might be useful (single point of control) with good caching > strategy using apc or other mechanisms. > > One approach I have followed is tha

Re: [PHP] Application settings, configuration, and preferences.

2010-10-27 Thread J Ravi Menon
I am partial to the filesystem but I can see scenarios where the db approach might be useful (single point of control) with good caching strategy using apc or other mechanisms. One approach I have followed is that if the config. field and values are simple key-value pairs, you could store them in

Re: [PHP] Model View Concepts

2010-10-25 Thread J Ravi Menon
On Fri, Oct 22, 2010 at 3:03 AM, Ashley Sheridan wrote: > On Fri, 2010-10-22 at 10:16 +0200, Sebastian Detert wrote: > >> Hi all, >> >> I'm currently searching for any code snippets, tutorials, howtos, >> concepts which explain different ways to collect all type of data/input >> (i.e. inside a cla

Re: [PHP] PHP Email Question

2010-09-30 Thread J Ravi Menon
On Wed, Sep 29, 2010 at 1:37 PM, Joe Jackson wrote: > Hi > > I am trying the following snippet as Bostjan  suggested, and an email is > getting sent when I submit the form however in the body of the email I am > getting none of the form data in the body of the email.  All I am getting is > the let

Re: [PHP] PHP Email Question

2010-09-21 Thread J Ravi Menon
Just on this topic, I found swiftmailer library to be really useful esp. in dealing with 'template' emails with custom variables per recipient: http://swiftmailer.org/ The e.g. on email template processing: http://swiftmailer.org/docs/decorator-plugin-howto There are batchSend() functionalities

Re: [PHP] php cli question

2010-09-15 Thread J Ravi Menon
gt; > b. > > > On 15 September 2010 04:19, J Ravi Menon wrote: >> >> On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen wrote: >> > J Ravi Menon wrote: >> > >> >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >> >>> J Ravi Menon wrot

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen wrote: > J Ravi Menon wrote: > >> On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: >>> J Ravi Menon wrote: >>> >>>> Few questions: >>>> >>>> 1) Does opcode cache really matter in su

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen wrote: > J Ravi Menon wrote: > >> Few questions: >> >> 1) Does opcode cache really matter in such cli-based daemons? As >> 'SomeClass' is instantiated at every loop, I am assuming it is only >> compil

[PHP] Re: php cli question

2010-09-13 Thread J Ravi Menon
On Sat, Sep 11, 2010 at 8:50 PM, Shawn McKenzie wrote: > On 09/10/2010 11:13 AM, J Ravi Menon wrote: >> Hi, >> >> I have some basic questions on running php  (5.2.x series on Linux >> 2.6) as a standalone daemon using posix methods (fork() etc..): >> >&

[PHP] php cli question

2010-09-10 Thread J Ravi Menon
Hi, I have some basic questions on running php (5.2.x series on Linux 2.6) as a standalone daemon using posix methods (fork() etc..): #!/usr/bin/php doSomething() } // shutdown logic. The 'someclass.php' in turn will include other files (via require_once). The above file will be executed dir

Re: [PHP] Re: Best Practices Book, Document, Web Site?

2010-03-05 Thread J Ravi Menon
Other than coding standards, the other good read is: (it seems to cover most topics I have ran into while maintaining a high traffic site implemented in php 5): http://phplens.com/lens/php-book/optimizing-debugging-php.php It is 'best practices' from another angle - use of opcode cache (apc etc..

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread J Ravi Menon
es but not sure it is necessarily guaranteed in future versions. Ravi On Mon, Jan 25, 2010 at 3:49 PM, D. Dante Lorenso wrote: > J Ravi Menon wrote: >> >> PHP does expose sys V shared-memory apis (shm_* functions): >> http://us2.php.net/manual/en/book.sem.php > >

Re: [PHP] memory efficient hash table extension? like lchash ...

2010-01-25 Thread J Ravi Menon
PHP does expose sys V shared-memory apis (shm_* functions): http://us2.php.net/manual/en/book.sem.php If you already have apc installed, you could also try: http://us2.php.net/manual/en/book.apc.php APC also allows you to store user specific data too (it will be in a shared memory). Haven't tr

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread J Ravi Menon
Hi Bob, [Couldn't resist jumping into this topic :)] Even if you look at traditional unix (or similar) kernel internals, although they tend to use functional paradigms, they do have a OOP-like flavor. Example: Everything in a unix system is a 'file' (well not really with networking logic, but it

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-08 Thread J Ravi Menon
Sorry forgot to mention that we used APC with apc.stat turned off which will give a little bit more performance gain, but it does mean flushing the cache on every code push (which is trivial). Ravi On Fri, Jan 8, 2010 at 11:30 AM, J Ravi Menon wrote: > Hi, > > A note on bytecode ca

Re: [PHP] Re: PHP programming strategy; lots of little include files, or a few big ones?

2010-01-08 Thread J Ravi Menon
Hi, A note on bytecode caching and include/include_once performance. A while ago when we were profiling our code, we did notice that file includes do take a noticeable percentage of overall overhead (enough for us to look into it more deep). We are using apc cache on a standard LAMP platform (linu