Archives

Archive for the ‘LAMP’ Category

Before reading this post, I recommend going over part 1 PHP OPCodes Cached with APC – part 1 In the first part we tackled what OPCodes are and how APC helps us streamline webserver performance by caching recurring script execution. In this second part, we will mostly look at the APC configuration main variable and [...]

Oct 21st, 2009 | Filed under LAMP, Unix / Linux
Tags: ,

There are many caching system in use to optimize the execution of PHP script on busy web/database servers. Today we will focus on the OPcode caching method using APC. Before we start… what is an OPcode? The OPcode is an executable code generated each time a PHP script is interpreted and compiled. Each time you [...]

Oct 21st, 2009 | Filed under LAMP, Unix / Linux

Here are just few things to keep in mind when setting up Apache and undergoing a quick security audit. 1. Turn off TRACE or TRACK Methods on Apache A Trace or Track method is a debug method used to debug webserver connections. A server supporting Trace connections can be subject to cross-site scripting attacks, dubbed [...]

Oct 29th, 2008 | Filed under LAMP, Unix / Linux

Weather used in php or any other scripting language… sometimes we have the need to query a database in order to fetch or manipulate certain data. One of the most common request, widely written and used is SELECT * FROM MyTable WHERE ID=’ValueX’ and NAME=’ValueY’; now, ID and NAME are just columns… so nothing special [...]

Oct 6th, 2008 | Filed under LAMP, MySQL, Unix / Linux

1. if you were to use between print or echo… use echo (Echo is known to be faster than print) 2. when doing string searches or action, do not simply/quickly jump on regex, but first have a look at php api’s string functions such as strpbrk, stripos etc.. 3. Display smart error messages… A lot [...]

Oct 6th, 2008 | Filed under LAMP, PHP, Programming, Unix / Linux