Team LiB
Previous Section Next Section

Checking Your php.ini File

Before you start uploading files, check a few values in your php.ini file. Look for this section of text:

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
File_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
Upload_max_filesize = 2M

To ensure the file upload process will work smoothly, make the following modifications:

  1. Uncomment the upload_tmp_dir line by deleting the initial semicolon.

  2. Enter a directory name after the = for upload_tmp_dir.

  3. If you want to allow larger uploads, change the number of bytes for upload_max_filesize.

For example, on a Windows system, this section of the php.ini file might look like this:

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On

;Temporary directory for HTTP uploaded files (will use system default if not
;specified).
upload_tmp_dir = /temp
; Maximum allowed size for uploaded files.
ipload_max_filesize = 2M

If you are not using Windows, you don't have to modify the value for upload_tmp_dir, as long as you want files to be placed in /tmp (the default).


Team LiB
Previous Section Next Section