LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Bug Reports (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=9)
-   -   4.013 PHP5 HTTP_POST method no longer works (http://www.litespeedtech.com/support/forum/showthread.php?t=3815)

chernann 02-22-2010 11:05 PM

4.013 PHP5 HTTP_POST method no longer works
 
I just updated to 4.013 and PHP5 HTTP_POST does not work. Verified working fine in 4.012 and Apache.

Here's the code:
Code:

<form method=post action="pictureform.php">
<input type="FILE" name="userpic" size="30">
<input type=submit>
</form>

PHP Code:

        $source $HTTP_POST_FILES['userpic']['tmp_name']; 

Under 4.012 and Apache $source will return the temporary file location of the file (e.g. /tmp/adoije)

4.013 returns a null value. It appears the temporary file is not actually created from the upload form.

edit: Changing the script to the $_FILES super global solved the issue. Although this might be a problem for older scripts.

NiteWave 02-23-2010 07:50 AM

I did tests base on your code. Here's my result:

1. can reproduce if same code as yours
2. following code(i.e., add enctype)
Code:

<form method=post action="pictureform.php" enctype="multipart/form-data">
<input type="FILE" name="userpic" id="userpic" size="30">
<input type=submit>
</form>

working well.

3.tested on 4.0.11/4.0.12/4.0.13, no difference. and, output of $HTTP_POST_FILES and $_FILES are found no difference too.

can you verify once more.

mistwang 02-23-2010 10:28 AM

Quote:

Originally Posted by chernann (Post 18762)
PHP Code:

        $source $HTTP_POST_FILES['userpic']['tmp_name']; 

Under 4.012 and Apache $source will return the temporary file location of the file (e.g. /tmp/adoije)

Maybe it related to

http://www.litespeedtech.com/support...ead.php?t=3757


All times are GMT -7. The time now is 01:00 AM.