These settings are contained in the default .htaccess file that ships with Drupal, so you shouldn't need to set them explicitly. Note, however, that setting PHP configuration options from .htaccess only works:
with Apache (or a compatible web server),
if the .htaccess file is actually read, i.e. AllowOverride is not None,
if PHP is installed as an Apache module.
See here for how to change configuration settings for other interfaces to PHP.
Using a PEAR-supported Database (see below) requires (of course) PEAR to be installed.
Drupal makes use of features not available on some inexpensive hosting plans, like LOCK TABLE
Working well since 4.7: PostgreSQL, version 7.3 or newer (7.2 will probably work too, but you'll get some errors when updating from 4.6). Experiences with other databases are greatly welcome.