When come the time for preparing a new server, there is always the dreaded question of configuration. Which directives have to be configured in php.ini. Certainly, we have (and love) the phpinfo() function, that displays the current configuration of a server. It is so useful to check that one directive has the good value or not. It would be handy to have a review tool with a directive checklist.
Directives check-list for your code only
On the other hand, when you want to review the full list of directives. Frameworks and applications usually come with a check-list in their documentation, (Symfony, Drupal,WordPress, phpMyAdmin), or a system checker that will check all at installation time (Nette framework).
As for your own code, tracking everything that your code requires is a long process. As the developper, you know what features are benefitial to your code, but it takes time and dedication to list them.
Exakat list all important PHP directives
The exakat engine builds an directive checklist for you, and includes a pint of its own wisdom. It review your code, identify all PHP features (and more), then list all the important related directives. Not all directives are included, and for the missing ones, a link to the documentation is provided. Here is an example with zenphoto :
When the code contains call to ob_start and ob_clean, it will suggest reviewing the ‘output_buffering’ directive, which creates a buffer to speed up web processing (set it to 4096 or more). The Output buffering has a lot more directives, but those are the most common and important to review.
When the code accesses the $_FILES variable or the move_uploaded_file() function, then file_uploads should definitely be reviewed, along with upload_max_filesize, max_file_uploads and post_max_size. And if none of those features are used, then it is suggested to set file_uploads to Off, and make the server more secure.
Of course, the classic expose_php and memory_limit are listed, but also realpath_cache_size or report_memleaks or track_errors. Those are frequently left at their default value, and still provide some benefit (performance, speed) when they are adapted to one’s code.
Directive check-list for everyone
From there, you may review your own installation with a list of directive tailored for your code. No more fear to forget any of them. The list is build from the code, and everything that is requires to work.
Exakat is currently a public-beta.