Uploading files at Powweb (Drupal image module)

Drupal's image module failed when I tried to use it to upload images to a Drupal installation at a Powweb.com hosting account.

After some digging and searching, it turns out that Powweb's base version of php.ini does not include setting the 'upload_tmp_dir' variable. Trying to set that using Drupal's settings.php or in .htaccess didn't work (discussion). Instead, I got the error described here.

However, I was able to resolve this issue by uploading a file named php.ini to the htdocs directory containing the following:

upload_tmp_dir = SOMEDIRECTORY

You need to replace SOMEDIRECTORY with the full path to a temp directory in your account. A partial path may work, but if it doesn't try the full path. Try the most restrictive permissions that will work. Note also that this issue will exist not just for Drupal but for any PHP script that uploads images using the standard method.