PHP, for some reason, wants to see its config file in /usr/local/lib. Not exactly where you or I would look for it. I prefer to symlink it to /etc:
ln -s /etc/php.ini /usr/local/lib/php.ini
Once you've decided where you want to put the PHP config file (and perhaps set up the symlink described above), copy the php.ini prototype file from the build directory top level. Use either the distribution or recommended files:
cp .../php.ini-dist /etc/php.ini
or
cp .../php.ini-recommended /etc/php.ini
You'll probably want to set the following options in the PHP config file:
; Under Unix, the default save path can be used, if set. Otherwise, pick ; something like: session.save_path = /tmp ; Allow short tags to be used to open PHP code. This allows the system's ; code to be much less verbose and more aescetically pleasing. short_open_tag = On
If the PHP extensions directory defined in the default config file does not point to the correct directory where you installed your extensions, aim it at your actual extensions directory:
extension_dir = /usr/local/lib/php/extensions
or
extension_dir = "c:/my/extension/dir/"
Under Windows, if you are using the graphics drawing extensions, despite the fact that they are bundled with the distribution, you will still need to include the extension. If the extension line is already in your PHP config file, just uncomment it. Otherwise, add the following:
extension=php_gd2.dll
Under Unix/Linux, if you are using the CUPS extensions, load phpcups.so as an extension:
extension=phpcups.so
You must enable php_printer.dll inside of php.ini in order to use the Windoze printing functions. If the line is already in your config file, just uncomment it. Otherwise, add the following:
extension=php_printer.dll
That's pretty much it, unless you want to set some other options after consulting the PHP documentation.