Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File upload problem. 1

Status
Not open for further replies.

NVSbe

Programmer
Sep 9, 2002
153
BE
Hi. I have the current form for uploading a file to the server:

Code:
        <FORM action=&quot;addpic.php&quot; method=&quot;POST&quot;  enctype=&quot;multipart/form-data&quot;>
		<input type=&quot;hidden&quot; name=&quot;cid&quot; value=<?php echo &quot;\&quot;$cid\&quot;&quot;; ?>>
        <TABLE BORDER=&quot;0&quot;>
		<TR><TD><font class=&quot;text&quot;>Upload File:</font><TD><input type=&quot;file&quot; class=&quot;textbox&quot; name=&quot;userfile&quot;>
        <TR><TD><font class=&quot;text&quot;>File Title:</FONT><TD><input type=&quot;title&quot; class=&quot;textbox&quot; name=&quot;title&quot;><br>
        <TR><TD COLSPAN=&quot;2&quot;><input class=&quot;textbox&quot; type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;></TD>
        </TABLE>
		</FORM>

However, when I submit, and check what's in $_POST, I notice that it's empty. It all works fine on my test-environment (Win98), but it just doesn't seem to upload anything to the real server (which is a Linux, I think, I don't know). Is there perhaps a setting in php.ini that I need to know about, or has it something to do with the webserver? Any hints?

--------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
 
Probably this one - its a case of talk nicely to your ISP/Hosting provider.

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thank you.

I turned off this parameter in my test environment, and I indeed get an error from my script. However, the $_POST variable still seems to contain the title of the image. On the host, $_POST is completely empty.

Either way, I sent an email to my ISP about this, and I hope they can help me further. They're a free host though, so I doubt they'll change their php setup to my wishes, but I can always try.

Thank you for your suggestion.

--------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
 
Idetify what version of PHP your host uses .. if is less that PHP 4 , the environment variables are different. (HTTP_POST_VARS)

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top