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] Application settings, configuration, and preferences.

2010-10-27 Thread J Ravi Menon
On Wed, Oct 27, 2010 at 11:39 AM, J Ravi Menon jravime...@gmail.com 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

Re: [PHP] PHP Email Question

2010-09-30 Thread J Ravi Menon
On Wed, Sep 29, 2010 at 1:37 PM, Joe Jackson priory...@googlemail.com 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

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()

Re: [PHP] php cli question

2010-09-15 Thread J Ravi Menon
Menon jravime...@gmail.com wrote: On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen p...@computer.org wrote: J Ravi Menon wrote: On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen p...@computer.org wrote: J Ravi Menon wrote: Few questions: 1) Does opcode cache really matter in such cli-based

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen p...@computer.org 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 compiled once as it has already been 'seen'. Yup

Re: [PHP] php cli question

2010-09-14 Thread J Ravi Menon
On Tue, Sep 14, 2010 at 1:15 PM, Per Jessen p...@computer.org wrote: J Ravi Menon wrote: On Tue, Sep 14, 2010 at 12:43 AM, Per Jessen p...@computer.org wrote: J Ravi Menon wrote: Few questions: 1) Does opcode cache really matter in such cli-based daemons? As 'SomeClass' is instantiated

[PHP] Re: php cli question

2010-09-13 Thread J Ravi Menon
On Sat, Sep 11, 2010 at 8:50 PM, Shawn McKenzie nos...@mckenzies.net 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..): #!/usr/bin/php ?php require_once

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

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

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

2010-01-25 Thread J Ravi Menon
versions. Ravi On Mon, Jan 25, 2010 at 3:49 PM, D. Dante Lorenso da...@lorenso.com wrote: J Ravi Menon wrote: PHP does expose sys V shared-memory apis (shm_* functions): http://us2.php.net/manual/en/book.sem.php I will look into this.  I really need a key/value map, though and would rather

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

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

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 jravime...@gmail.com wrote: Hi, A note