php-general Digest 27 Feb 2011 07:35:22 -0000 Issue 7202

Topics (messages 311587 through 311589):

Re: Quotes in Heredoc
        311587 by: Ashley Sheridan
        311589 by: Ashim Kapoor

Re: Log Rotation, leave it to OS or do it in PHP code?
        311588 by: Ashley Sheridan

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On Sat, 2011-02-26 at 16:27 +0530, Ashim Kapoor wrote:

> The quotes you mention are in the HTML, nothing to do with PHP. HTML will
> work without the quotes in most cases (unless there's a space in the value
> for the attribute) but the quotes are required in XHTML and will cause
> unexpected results.
> 
> Can you elaborate on the XHTML part? Do you mean they are required in XHTML
> but optional in HTML ?
> 
> Many thanks,
> Ashim.


Yes, in HTML the quotes are optional, but they are required in XHTML
documents:
http://www.w3.org/TR/xhtml1/diffs.html#h-4.4


Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Yes, in HTML the quotes are optional, but they are required in XHTML
documents:

> http://www.w3.org/TR/xhtml1/diffs.html#h-4.4
>

Ok Thank you,
Ashim

--- End Message ---
--- Begin Message ---
On Sat, 2011-02-26 at 16:37 +0330, AmirBehzad Eslami wrote:

> Dear list,
> 
> It seems that Python has already a Log Rotation mechanism,
> which solves the problem of log file growth.
> 
> I'm wondering whether there is any PHP-based solution around?
> Now let me ask from a different view:
> 
> Is it a good approach to implement the Rotation mechanism to PHP? (Code Level)
> Or leave the job to the operating system and other utilities?
> 
> Where is the right place to implmenet the Rotation? In Code? In OS?
> PHP? or a Bash Script?
> 
> Thanks,
> 


Personally, I would leave it to the OS and other tools, the reason being
that it may not necessarily be the programmer who is managing the server
as well. I've worked in a couple of places large enough to have
dedicated server guys (and gals) who dealt with deploying managing the
servers and their services. They may have a preferred way of rotating
and archiving logs that is managed on all the log files, regardless of
what scripting language was used to create them.

If you're working in a smaller environment that doesn't have different
staff supporting the servers, I would still keep the log rotation
separate, but you manage this in a number of ways, either leaving it to
the OS, write a bash script, PHP script, or some sort of off-the-shelf
solution. I would be careful not to clutter an app too much with things
it may not need to, and having the rotation dealt with independently
means that it can be a utility shared by many of your scripts.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---

Reply via email to