Fast and Secure Web Apps |
|
2024-11-27 |
|
|
12 |
|
|
No Runtime Templating!
- • PHP is a templating system, we don't need another one
- • Ok, sometimes you might, but don't do it at runtime
System Calls - Code Changes
- • No more than 1 stat() per PHP file per request
- • Don't stat if Apache has already stat'ed the file
- • Get rid of excessive stats in the streams code
- • PHP 5.1 now has a stat cache to help this
System Calls - Scripting Changes
- • Use an opcode cache - APC works well
- • Remove ./ from include_path and use relative path includes
- • Use just a single base dir in include_path
- • Avoid include_once/require_once