Problem in uploading files in php 4.5

This is a discussion on Problem in uploading files in php 4.5 within the PHP Language forums, part of the PHP Programming Forums category; Hello I am using PHP 4.6 and trying to upload photograph on webpage but getting $_FILES empty. checked php....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-20-2004
Inpreet
 
Posts: n/a
Default Problem in uploading files in php 4.5

Hello

I am using PHP 4.6 and trying to upload photograph on webpage but
getting $_FILES empty. checked php.ini file also hopefully its
correct.
*******************************
; 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

*******************************

Also I have used this same function with PHP 4.1 where it worked fine.
but don't know why it is returning null value of $_FILES in php4.6
Reply With Quote
  #2 (permalink)  
Old 12-20-2004
badr
 
Posts: n/a
Default Re: Problem in uploading files in php 4.5

hi,
i think you have to spacify the temp directory in php.ini file first so
check this
upload_tmp_dir ="C:\php\your_temp_dir" (windows paltform)
where (your_temp_dir) is the temprory directory on your server if you
fix this we can check the following :
1-check $_FILES if it have data or not by using
-------------------------------------------------------------------------
echo "<pre>"; //nothing imoprtant only HTML tag
print_r($_FILES ); //to print the array (keys and values)
echo "</pre>"; //nothing imoprtant only HTML tag
------------------------------------------------------------------------
if $_FILES array is not empty you will find somthing like this

Array
(
[mycontrol] => Array
(
[name] => php.gif
[type] => image/gif
[tmp_name] => C:\php\upload\phpB.tmp
[error] => 0
[size] => 3872
)

)
--------------------------------------------
if you have somthing like this that mean you are ok and the $_FILES
array is filled
--------------------------------------------
have good time.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0