f



I can not get file uploads to show up when I upload a file

I've a form that starts off like this:


<form method="post" action="profile.php?
id=5&formName=my_story_edit.htm" enctype="multipart/form-data">

	<p>Email address:<br />
		 <input type="text" name="totalFormInputs[users][5][email_address]"
value="lawrence@krubner.com" /></p>

	<p>Zip code:<br />
		<input type="text" name="totalFormInputs[users][5][zip_code]"
value="22902" /></p>

	<p>Personal image:<br />
		<input type="file" name="totalFormInputs[users][5][upload_file]" /></
p>





Oddly enough, the "upload_file" has suddenly disappeared from the
uploaded array. When I hit $totalFormInputs with print_r, this is what
I get:



Array
(
    [users] => Array
        (
            [5] => Array
                (
                    [description] => I grew up in New Jersey.
                    [email_address] => lawrence@krubner.com
                    [zip_code] => 22902
                    [time] => 1187380627
                )

        )

)



Why is the file input not show up?

Everything was working fine a month ago, and now it is broke.

Any help is very much appreciated.

0
lkrubner (905)
8/23/2007 3:11:56 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

13 Replies
1259 Views

Similar Articles

[PageSpeed] 49

lawrence k wrote:
> I've a form that starts off like this:
> 
> 
> <form method="post" action="profile.php?
> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> 
> 	<p>Email address:<br />
> 		 <input type="text" name="totalFormInputs[users][5][email_address]"
> value="lawrence@krubner.com" /></p>
> 
> 	<p>Zip code:<br />
> 		<input type="text" name="totalFormInputs[users][5][zip_code]"
> value="22902" /></p>
> 
> 	<p>Personal image:<br />
> 		<input type="file" name="totalFormInputs[users][5][upload_file]" /></
> p>
> 
> 
> 
> 
> 
> Oddly enough, the "upload_file" has suddenly disappeared from the
> uploaded array. When I hit $totalFormInputs with print_r, this is what
> I get:
> 
> 
> 
> Array
> (
>     [users] => Array
>         (
>             [5] => Array
>                 (
>                     [description] => I grew up in New Jersey.
>                     [email_address] => lawrence@krubner.com
>                     [zip_code] => 22902
>                     [time] => 1187380627
>                 )
> 
>         )
> 
> )
> 
> 
> 
> Why is the file input not show up?
> 
> Everything was working fine a month ago, and now it is broke.
> 
> Any help is very much appreciated.
> 

Nothing entered into the field?  If it's empty, nothing will be returned.

What does print_r($_POST) show?

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
8/23/2007 3:48:05 AM
On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > I've a form that starts off like this:
>
> > <form method="post" action="profile.php?
> > id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
>
> >    <p>Email address:<br />
> >             <input type="text" name="totalFormInputs[users][5][email_address]"
> > value="lawre...@krubner.com" /></p>
>
> >    <p>Zip code:<br />
> >            <input type="text" name="totalFormInputs[users][5][zip_code]"
> > value="22902" /></p>
>
> >    <p>Personal image:<br />
> >            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> > p>
>
> > Oddly enough, the "upload_file" has suddenly disappeared from the
> > uploaded array. When I hit $totalFormInputs with print_r, this is what
> > I get:
>
> > Array
> > (
> >     [users] => Array
> >         (
> >             [5] => Array
> >                 (
> >                     [description] => I grew up in New Jersey.
> >                     [email_address] => lawre...@krubner.com
> >                     [zip_code] => 22902
> >                     [time] => 1187380627
> >                 )
>
> >         )
>
> > )
>
> > Why is the file input not show up?
>
> > Everything was working fine a month ago, and now it is broke.
>
> > Any help is very much appreciated.
>
> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> What does print_r($_POST) show?


Good question.

print_r($_POST) gives me this:

Array
(
    [totalFormInputs] => Array
        (
            [users] => Array
                (
                    [5] => Array
                        (
                            [description] => I grew up in New Jersey.
                            [email_address] => lawrence@krubner.com
                            [zip_code] => 22902
                            [time] => 1187380627
                        )

                )

        )

    [day] => 05
    [month] => 07
    [year] => 2006
    [choiceMade] => Array
        (
            [0] => createRecordsForMultipleDatabaseTables
        )

)


I click the browse button (by the "file" input) and choose a JPEG
called "car_derby.jpg". But it doesn't show up in POST.

Why?








0
lkrubner (905)
8/23/2007 3:55:02 AM
lawrence k wrote:
> On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> lawrence k wrote:
>>> I've a form that starts off like this:
>>> <form method="post" action="profile.php?
>>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
>>>    <p>Email address:<br />
>>>             <input type="text" name="totalFormInputs[users][5][email_address]"
>>> value="lawre...@krubner.com" /></p>
>>>    <p>Zip code:<br />
>>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
>>> value="22902" /></p>
>>>    <p>Personal image:<br />
>>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
>>> p>
>>> Oddly enough, the "upload_file" has suddenly disappeared from the
>>> uploaded array. When I hit $totalFormInputs with print_r, this is what
>>> I get:
>>> Array
>>> (
>>>     [users] => Array
>>>         (
>>>             [5] => Array
>>>                 (
>>>                     [description] => I grew up in New Jersey.
>>>                     [email_address] => lawre...@krubner.com
>>>                     [zip_code] => 22902
>>>                     [time] => 1187380627
>>>                 )
>>>         )
>>> )
>>> Why is the file input not show up?
>>> Everything was working fine a month ago, and now it is broke.
>>> Any help is very much appreciated.
>> Nothing entered into the field?  If it's empty, nothing will be returned.
>>
>> What does print_r($_POST) show?
> 
> 
> Good question.
> 
> print_r($_POST) gives me this:
> 
> Array
> (
>     [totalFormInputs] => Array
>         (
>             [users] => Array
>                 (
>                     [5] => Array
>                         (
>                             [description] => I grew up in New Jersey.
>                             [email_address] => lawrence@krubner.com
>                             [zip_code] => 22902
>                             [time] => 1187380627
>                         )
> 
>                 )
> 
>         )
> 
>     [day] => 05
>     [month] => 07
>     [year] => 2006
>     [choiceMade] => Array
>         (
>             [0] => createRecordsForMultipleDatabaseTables
>         )
> 
> )
> 
> 
> I click the browse button (by the "file" input) and choose a JPEG
> called "car_derby.jpg". But it doesn't show up in POST.
> 
> Why?
> 
> 
> 
> 
> 
> 
> 
> 

Are you sure the field is still within the form?  Or did you perhaps 
move the </form> back too far?

Does the HTML validate?

If the HTML is correct, it should show up in the $_POST variable.  But 
since it isn't, you have an HTML problem - not a PHP one.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
8/23/2007 4:05:07 AM
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> I've a form that starts off like this:
> >>> <form method="post" action="profile.php?
> >>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>    <p>Email address:<br />
> >>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>> value="lawre...@krubner.com" /></p>
> >>>    <p>Zip code:<br />
> >>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>> value="22902" /></p>
> >>>    <p>Personal image:<br />
> >>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>> p>
> >>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>> I get:
> >>> Array
> >>> (
> >>>     [users] => Array
> >>>         (
> >>>             [5] => Array
> >>>                 (
> >>>                     [description] => I grew up in New Jersey.
> >>>                     [email_address] => lawre...@krubner.com
> >>>                     [zip_code] => 22902
> >>>                     [time] => 1187380627
> >>>                 )
> >>>         )
> >>> )
> >>> Why is the file input not show up?
> >>> Everything was working fine a month ago, and now it is broke.
> >>> Any help is very much appreciated.
> >> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> >> What does print_r($_POST) show?
>
> > Good question.
>
> > print_r($_POST) gives me this:
>
> > Array
> > (
> >     [totalFormInputs] => Array
> >         (
> >             [users] => Array
> >                 (
> >                     [5] => Array
> >                         (
> >                             [description] => I grew up in New Jersey.
> >                             [email_address] => lawre...@krubner.com
> >                             [zip_code] => 22902
> >                             [time] => 1187380627
> >                         )
>
> >                 )
>
> >         )
>
> >     [day] => 05
> >     [month] => 07
> >     [year] => 2006
> >     [choiceMade] => Array
> >         (
> >             [0] => createRecordsForMultipleDatabaseTables
> >         )
>
> > )
>
> > I click the browse button (by the "file" input) and choose a JPEG
> > called "car_derby.jpg". But it doesn't show up in POST.
>
> > Why?
>
> Are you sure the field is still within the form?  Or did you perhaps
> move the </form> back too far?
>
> Does the HTML validate?
>
> If the HTML is correct, it should show up in the $_POST variable.  But
> since it isn't, you have an HTML problem - not a PHP one.


You can see the form here:

http://www.bluewalldev.com/secondroad/profile.php?id=5&formName=my_story_edit.htm

I apologize that the site is so rough. We are at an early point of
construction. The site is ultimately suppose to be an online social
network for people recovering from addiction.





0
lkrubner (905)
8/23/2007 4:10:54 AM
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> I've a form that starts off like this:
> >>> <form method="post" action="profile.php?
> >>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>    <p>Email address:<br />
> >>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>> value="lawre...@krubner.com" /></p>
> >>>    <p>Zip code:<br />
> >>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>> value="22902" /></p>
> >>>    <p>Personal image:<br />
> >>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>> p>
> >>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>> I get:
> >>> Array
> >>> (
> >>>     [users] => Array
> >>>         (
> >>>             [5] => Array
> >>>                 (
> >>>                     [description] => I grew up in New Jersey.
> >>>                     [email_address] => lawre...@krubner.com
> >>>                     [zip_code] => 22902
> >>>                     [time] => 1187380627
> >>>                 )
> >>>         )
> >>> )
> >>> Why is the file input not show up?
> >>> Everything was working fine a month ago, and now it is broke.
> >>> Any help is very much appreciated.
> >> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> >> What does print_r($_POST) show?
>
> > Good question.
>
> > print_r($_POST) gives me this:
>
> > Array
> > (
> >     [totalFormInputs] => Array
> >         (
> >             [users] => Array
> >                 (
> >                     [5] => Array
> >                         (
> >                             [description] => I grew up in New Jersey.
> >                             [email_address] => lawre...@krubner.com
> >                             [zip_code] => 22902
> >                             [time] => 1187380627
> >                         )
>
> >                 )
>
> >         )
>
> >     [day] => 05
> >     [month] => 07
> >     [year] => 2006
> >     [choiceMade] => Array
> >         (
> >             [0] => createRecordsForMultipleDatabaseTables
> >         )
>
> > )
>
> > I click the browse button (by the "file" input) and choose a JPEG
> > called "car_derby.jpg". But it doesn't show up in POST.
>


> If the HTML is correct, it should show up in the $_POST variable.  But
> since it isn't, you have an HTML problem - not a PHP one.

That is a good point. I usually leave validation to the graphic
designer, but we might have to do it early in this case, to figure out
this problem.

0
lkrubner (905)
8/23/2007 4:12:02 AM
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> I've a form that starts off like this:
> >>> <form method="post" action="profile.php?
> >>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>    <p>Email address:<br />
> >>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>> value="lawre...@krubner.com" /></p>
> >>>    <p>Zip code:<br />
> >>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>> value="22902" /></p>
> >>>    <p>Personal image:<br />
> >>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>> p>
> >>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>> I get:
> >>> Array
> >>> (
> >>>     [users] => Array
> >>>         (
> >>>             [5] => Array
> >>>                 (
> >>>                     [description] => I grew up in New Jersey.
> >>>                     [email_address] => lawre...@krubner.com
> >>>                     [zip_code] => 22902
> >>>                     [time] => 1187380627
> >>>                 )
> >>>         )
> >>> )
> >>> Why is the file input not show up?
> >>> Everything was working fine a month ago, and now it is broke.
> >>> Any help is very much appreciated.
> >> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> >> What does print_r($_POST) show?
>
> > Good question.
>
> > print_r($_POST) gives me this:
>
> > Array
> > (
> >     [totalFormInputs] => Array
> >         (
> >             [users] => Array
> >                 (
> >                     [5] => Array
> >                         (
> >                             [description] => I grew up in New Jersey.
> >                             [email_address] => lawre...@krubner.com
> >                             [zip_code] => 22902
> >                             [time] => 1187380627
> >                         )
>
> >                 )
>
> >         )
>
> >     [day] => 05
> >     [month] => 07
> >     [year] => 2006
> >     [choiceMade] => Array
> >         (
> >             [0] => createRecordsForMultipleDatabaseTables
> >         )
>
> > )
>
> > I click the browse button (by the "file" input) and choose a JPEG
> > called "car_derby.jpg". But it doesn't show up in POST.
>
> > Why?
>
> Are you sure the field is still within the form?  Or did you perhaps
> move the </form> back too far?
>
> Does the HTML validate?

Hmm, no.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.bluewalldev.com%2Fsecondroad%2Fprofile.php%3Fid%3D5%26formName%3Dmy_story_edit.htm&charset=%28detect+automatically%29&doctype=Inline&group=0

The errors are mostly missing alt tags on the images and some li tags
used outside of ul tags. I can't see how it would effect one input in
the middle of a form, as opposed to all the inputs on a form, but I
suppose we should clean this up. It'll be next week before we get to
it, I suspect.




0
lkrubner (905)
8/23/2007 4:28:16 AM
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> I've a form that starts off like this:
> >>> <form method="post" action="profile.php?
> >>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>    <p>Email address:<br />
> >>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>> value="lawre...@krubner.com" /></p>
> >>>    <p>Zip code:<br />
> >>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>> value="22902" /></p>
> >>>    <p>Personal image:<br />
> >>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>> p>
> >>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>> I get:
> >>> Array
> >>> (
> >>>     [users] => Array
> >>>         (
> >>>             [5] => Array
> >>>                 (
> >>>                     [description] => I grew up in New Jersey.
> >>>                     [email_address] => lawre...@krubner.com
> >>>                     [zip_code] => 22902
> >>>                     [time] => 1187380627
> >>>                 )
> >>>         )
> >>> )
> >>> Why is the file input not show up?
> >>> Everything was working fine a month ago, and now it is broke.
> >>> Any help is very much appreciated.
> >> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> >> What does print_r($_POST) show?
>
> > Good question.
>
> > print_r($_POST) gives me this:
>
> > Array
> > (
> >     [totalFormInputs] => Array
> >         (
> >             [users] => Array
> >                 (
> >                     [5] => Array
> >                         (
> >                             [description] => I grew up in New Jersey.
> >                             [email_address] => lawre...@krubner.com
> >                             [zip_code] => 22902
> >                             [time] => 1187380627
> >                         )
>
> >                 )
>
> >         )
>
> >     [day] => 05
> >     [month] => 07
> >     [year] => 2006
> >     [choiceMade] => Array
> >         (
> >             [0] => createRecordsForMultipleDatabaseTables
> >         )
>
> > )
>
> > I click the browse button (by the "file" input) and choose a JPEG
> > called "car_derby.jpg". But it doesn't show up in POST.
>
> > Why?
>
> Are you sure the field is still within the form?  Or did you perhaps
> move the </form> back too far?
>
> Does the HTML validate?
>
> If the HTML is correct, it should show up in the $_POST variable.  But
> since it isn't, you have an HTML problem - not a PHP one.


What's even more odd is that I'm getting the correct results in
$_FILES. The temp name of the file is there. But it doesn't show up in
$_POST. What is that about?






0
lkrubner (905)
8/23/2007 4:48:35 AM
On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> I've a form that starts off like this:
> >>> <form method="post" action="profile.php?
> >>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>    <p>Email address:<br />
> >>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>> value="lawre...@krubner.com" /></p>
> >>>    <p>Zip code:<br />
> >>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>> value="22902" /></p>
> >>>    <p>Personal image:<br />
> >>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>> p>
> >>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>> I get:
> >>> Array
> >>> (
> >>>     [users] => Array
> >>>         (
> >>>             [5] => Array
> >>>                 (
> >>>                     [description] => I grew up in New Jersey.
> >>>                     [email_address] => lawre...@krubner.com
> >>>                     [zip_code] => 22902
> >>>                     [time] => 1187380627
> >>>                 )
> >>>         )
> >>> )
> >>> Why is the file input not show up?
> >>> Everything was working fine a month ago, and now it is broke.
> >>> Any help is very much appreciated.
> >> Nothing entered into the field?  If it's empty, nothing will be returned.
>
> >> What does print_r($_POST) show?
>
> > Good question.
>
> > print_r($_POST) gives me this:
>
> > Array
> > (
> >     [totalFormInputs] => Array
> >         (
> >             [users] => Array
> >                 (
> >                     [5] => Array
> >                         (
> >                             [description] => I grew up in New Jersey.
> >                             [email_address] => lawre...@krubner.com
> >                             [zip_code] => 22902
> >                             [time] => 1187380627
> >                         )
>
> >                 )
>
> >         )
>
> >     [day] => 05
> >     [month] => 07
> >     [year] => 2006
> >     [choiceMade] => Array
> >         (
> >             [0] => createRecordsForMultipleDatabaseTables
> >         )
>
> > )
>
> > I click the browse button (by the "file" input) and choose a JPEG
> > called "car_derby.jpg". But it doesn't show up in POST.
>
> > Why?
>
> Are you sure the field is still within the form?  Or did you perhaps
> move the </form> back too far?
>
> Does the HTML validate?
>
> If the HTML is correct, it should show up in the $_POST variable.  But
> since it isn't, you have an HTML problem - not a PHP one.

This is what I get if I do print_r($_FILES):

Array
(
    [totalFormInputs] => Array
        (
            [name] => Array
                (
                    [users] => Array
                        (
                            [5] => Array
                                (
                                    [upload_file] => car_derby.jpg
                                )

                        )

                )

            [type] => Array
                (
                    [users] => Array
                        (
                            [5] => Array
                                (
                                    [upload_file] => image/jpeg
                                )

                        )

                )

            [tmp_name] => Array
                (
                    [users] => Array
                        (
                            [5] => Array
                                (
                                    [upload_file] => /tmp/phpiBxJrN
                                )

                        )

                )

            [error] => Array
                (
                    [users] => Array
                        (
                            [5] => Array
                                (
                                    [upload_file] => 0
                                )

                        )

                )

            [size] => Array
                (
                    [users] => Array
                        (
                            [5] => Array
                                (
                                    [upload_file] => 32302
                                )

                        )

                )

        )

)




That's what I would expect. It's bizzare, I get the right results in
$_FILES, but not in $_POST. How is that possible?







0
lkrubner (905)
8/23/2007 4:52:16 AM
lawrence k wrote:
> This is what I get if I do print_r($_FILES):
> ...
> 
> That's what I would expect. It's bizzare,

Its not bizzare. Its normal...

> I get the right results in
> $_FILES, but not in $_POST. How is that possible?

Cause youre provider has updated PHP. Older versions also send data of 
$_FILES within $_POST. But its not a go idea to hold the data in 2 Points.

The manual says that usage of $_FILES is the prefered way since a long 
time. If you would have looked in the manual before you write your 
Postings, you come surely faster to the goal.

Ulf

-- 
    _,
  _(_p>   Ulf [Kado] Kadner
  \<_)    Mitglied der Freizeitv�gel? ;-)
   ^^
0
dr_logic (71)
8/23/2007 10:54:57 AM
lawrence k wrote:
> On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> lawrence k wrote:
>>> On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>> lawrence k wrote:
>>>>> I've a form that starts off like this:
>>>>> <form method="post" action="profile.php?
>>>>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
>>>>>    <p>Email address:<br />
>>>>>             <input type="text" name="totalFormInputs[users][5][email_address]"
>>>>> value="lawre...@krubner.com" /></p>
>>>>>    <p>Zip code:<br />
>>>>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
>>>>> value="22902" /></p>
>>>>>    <p>Personal image:<br />
>>>>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
>>>>> p>
>>>>> Oddly enough, the "upload_file" has suddenly disappeared from the
>>>>> uploaded array. When I hit $totalFormInputs with print_r, this is what
>>>>> I get:
>>>>> Array
>>>>> (
>>>>>     [users] => Array
>>>>>         (
>>>>>             [5] => Array
>>>>>                 (
>>>>>                     [description] => I grew up in New Jersey.
>>>>>                     [email_address] => lawre...@krubner.com
>>>>>                     [zip_code] => 22902
>>>>>                     [time] => 1187380627
>>>>>                 )
>>>>>         )
>>>>> )
>>>>> Why is the file input not show up?
>>>>> Everything was working fine a month ago, and now it is broke.
>>>>> Any help is very much appreciated.
>>>> Nothing entered into the field?  If it's empty, nothing will be returned.
>>>> What does print_r($_POST) show?
>>> Good question.
>>> print_r($_POST) gives me this:
>>> Array
>>> (
>>>     [totalFormInputs] => Array
>>>         (
>>>             [users] => Array
>>>                 (
>>>                     [5] => Array
>>>                         (
>>>                             [description] => I grew up in New Jersey.
>>>                             [email_address] => lawre...@krubner.com
>>>                             [zip_code] => 22902
>>>                             [time] => 1187380627
>>>                         )
>>>                 )
>>>         )
>>>     [day] => 05
>>>     [month] => 07
>>>     [year] => 2006
>>>     [choiceMade] => Array
>>>         (
>>>             [0] => createRecordsForMultipleDatabaseTables
>>>         )
>>> )
>>> I click the browse button (by the "file" input) and choose a JPEG
>>> called "car_derby.jpg". But it doesn't show up in POST.
>>> Why?
>> Are you sure the field is still within the form?  Or did you perhaps
>> move the </form> back too far?
>>
>> Does the HTML validate?
>>
>> If the HTML is correct, it should show up in the $_POST variable.  But
>> since it isn't, you have an HTML problem - not a PHP one.
> 
> This is what I get if I do print_r($_FILES):
> 
> Array
> (
>     [totalFormInputs] => Array
>         (
>             [name] => Array
>                 (
>                     [users] => Array
>                         (
>                             [5] => Array
>                                 (
>                                     [upload_file] => car_derby.jpg
>                                 )
> 
>                         )
> 
>                 )
> 
>             [type] => Array
>                 (
>                     [users] => Array
>                         (
>                             [5] => Array
>                                 (
>                                     [upload_file] => image/jpeg
>                                 )
> 
>                         )
> 
>                 )
> 
>             [tmp_name] => Array
>                 (
>                     [users] => Array
>                         (
>                             [5] => Array
>                                 (
>                                     [upload_file] => /tmp/phpiBxJrN
>                                 )
> 
>                         )
> 
>                 )
> 
>             [error] => Array
>                 (
>                     [users] => Array
>                         (
>                             [5] => Array
>                                 (
>                                     [upload_file] => 0
>                                 )
> 
>                         )
> 
>                 )
> 
>             [size] => Array
>                 (
>                     [users] => Array
>                         (
>                             [5] => Array
>                                 (
>                                     [upload_file] => 32302
>                                 )
> 
>                         )
> 
>                 )
> 
>         )
> 
> )
> 
> 
> 
> 
> That's what I would expect. It's bizzare, I get the right results in
> $_FILES, but not in $_POST. How is that possible?
> 
> 
> 
> 
> 
> 
> 

That's right... I shouldn't try to answer at midnight after I've been 
out with the guys... :-)

Yes, it goes in the $_FILES array, not $_POST.

Once I got some sleep and looked at this again this morning, it was 
obvious :-).  Sorry to steer you down the wrong path.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
8/23/2007 12:55:03 PM
On Aug 23, 8:55 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> lawrence k wrote:
> > On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> lawrence k wrote:
> >>> On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >>>> lawrence k wrote:
> >>>>> I've a form that starts off like this:
> >>>>> <form method="post" action="profile.php?
> >>>>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> >>>>>    <p>Email address:<br />
> >>>>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> >>>>> value="lawre...@krubner.com" /></p>
> >>>>>    <p>Zip code:<br />
> >>>>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> >>>>> value="22902" /></p>
> >>>>>    <p>Personal image:<br />
> >>>>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> >>>>> p>
> >>>>> Oddly enough, the "upload_file" has suddenly disappeared from the
> >>>>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> >>>>> I get:
> >>>>> Array
> >>>>> (
> >>>>>     [users] => Array
> >>>>>         (
> >>>>>             [5] => Array
> >>>>>                 (
> >>>>>                     [description] => I grew up in New Jersey.
> >>>>>                     [email_address] => lawre...@krubner.com
> >>>>>                     [zip_code] => 22902
> >>>>>                     [time] => 1187380627
> >>>>>                 )
> >>>>>         )
> >>>>> )
> >>>>> Why is the file input not show up?
> >>>>> Everything was working fine a month ago, and now it is broke.
> >>>>> Any help is very much appreciated.
> >> If the HTML is correct, it should show up in the $_POSTvariable.  But
> >> since it isn't, you have an HTML problem - not a PHP one.
>
> [bunch of stuff snipped]
>
> > That's what I would expect. It's bizzare, I get the right results in
> > $_FILES, but not in $_POST. How is that possible?
>
> That's right... I shouldn't try to answer at midnight after I've been
> out with the guys... :-)
>
> Yes, it goes in the $_FILESarray, not $_POST.
>
> Once I got some sleep and looked at this again this morning, it was
> obvious :-).  Sorry to steer you down the wrong path.


I'm confused about this. How does one associate an upload with
database info? In PHP 4, you could have a form that allowed multiple
form uploads with multiple fields for inputting multiple info:

----------------
Caption your images:

1.) caption input, file input
2.) caption input, file input
3.) caption input, file input
4.) caption input, file input
-----------------

In PHP 4, with a form like this, you knew which file went with which
caption, because the whole 2 dimensional array would show up in
$_POST.

How do you figure out the relationship in PHP5, if the files never
show up in $_POST? Does PHP 5 restrict you to just uploading one file
at a time, if you want to caption the file at the same time?






0
lkrubner (905)
9/19/2007 5:14:41 PM
On Sep 19, 1:14 pm, lawrence k <lkrub...@geocities.com> wrote:
> On Aug 23, 8:55 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
>
>
> > lawrence k wrote:
> > > On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> > >> lawrence k wrote:
> > >>> On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> > >>>> lawrence k wrote:
> > >>>>> I've a form that starts off like this:
> > >>>>> <form method="post" action="profile.php?
> > >>>>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
> > >>>>>    <p>Email address:<br />
> > >>>>>             <input type="text" name="totalFormInputs[users][5][email_address]"
> > >>>>> value="lawre...@krubner.com" /></p>
> > >>>>>    <p>Zip code:<br />
> > >>>>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
> > >>>>> value="22902" /></p>
> > >>>>>    <p>Personal image:<br />
> > >>>>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
> > >>>>> p>
> > >>>>> Oddly enough, the "upload_file" has suddenly disappeared from the
> > >>>>> uploaded array. When I hit $totalFormInputs with print_r, this is what
> > >>>>> I get:
> > >>>>> Array
> > >>>>> (
> > >>>>>     [users] => Array
> > >>>>>         (
> > >>>>>             [5] => Array
> > >>>>>                 (
> > >>>>>                     [description] => I grew up in New Jersey.
> > >>>>>                     [email_address] => lawre...@krubner.com
> > >>>>>                     [zip_code] => 22902
> > >>>>>                     [time] => 1187380627
> > >>>>>                 )
> > >>>>>         )
> > >>>>> )
> > >>>>> Why is the file input not show up?
> > >>>>> Everything was working fine a month ago, and now it is broke.
> > >>>>> Any help is very much appreciated.
> > >> If the HTML is correct, it should show up in the $_POSTvariable.  But
> > >> since it isn't, you have an HTML problem - not a PHP one.
>
> > [bunch of stuff snipped]
>
> > > That's what I would expect. It's bizzare, I get the right results in
> > > $_FILES, but not in $_POST. How is that possible?
>
> > That's right... I shouldn't try to answer at midnight after I've been
> > out with the guys... :-)
>
> > Yes, it goes in the $_FILESarray, not $_POST.
>
> > Once I got some sleep and looked at this again this morning, it was
> > obvious :-).  Sorry to steer you down the wrong path.
>
> I'm confused about this. How does one associate an upload with
> database info? In PHP 4, you could have a form that allowed multiple
> form uploads with multiple fields for inputting multiple info:
>
> ----------------
> Caption your images:
>
> 1.) caption input, file input
> 2.) caption input, file input
> 3.) caption input, file input
> 4.) caption input, file input
> -----------------
>
> In PHP 4, with a form like this, you knew which file went with which
> caption, because the whole 2 dimensional array would show up in
> $_POST.
>
> How do you figure out the relationship in PHP5, if the files never
> show up in $_POST? Does PHP 5 restrict you to just uploading one file
> at a time, if you want to caption the file at the same time?


No answers? I'm surprised by this. I assume I'm not the only PHP
programmer allowing people to upload more than one file at a time. I
had an easy enough time in PHP 4 but I can't figure out how to do this
in PHP 5. If an upload file doesn't appear in $_POST, how do you
associate the file info in $_POST?





0
lkrubner (905)
9/21/2007 11:42:20 PM
lawrence k wrote:
> On Sep 19, 1:14 pm, lawrence k <lkrub...@geocities.com> wrote:
>> On Aug 23, 8:55 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>
>>
>>
>>> lawrence k wrote:
>>>> On Aug 23, 12:05 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>>> lawrence k wrote:
>>>>>> On Aug 22, 11:48 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>>>>> lawrence k wrote:
>>>>>>>> I've a form that starts off like this:
>>>>>>>> <form method="post" action="profile.php?
>>>>>>>> id=5&formName=my_story_edit.htm" enctype="multipart/form-data">
>>>>>>>>    <p>Email address:<br />
>>>>>>>>             <input type="text" name="totalFormInputs[users][5][email_address]"
>>>>>>>> value="lawre...@krubner.com" /></p>
>>>>>>>>    <p>Zip code:<br />
>>>>>>>>            <input type="text" name="totalFormInputs[users][5][zip_code]"
>>>>>>>> value="22902" /></p>
>>>>>>>>    <p>Personal image:<br />
>>>>>>>>            <input type="file" name="totalFormInputs[users][5][upload_file]" /></
>>>>>>>> p>
>>>>>>>> Oddly enough, the "upload_file" has suddenly disappeared from the
>>>>>>>> uploaded array. When I hit $totalFormInputs with print_r, this is what
>>>>>>>> I get:
>>>>>>>> Array
>>>>>>>> (
>>>>>>>>     [users] => Array
>>>>>>>>         (
>>>>>>>>             [5] => Array
>>>>>>>>                 (
>>>>>>>>                     [description] => I grew up in New Jersey.
>>>>>>>>                     [email_address] => lawre...@krubner.com
>>>>>>>>                     [zip_code] => 22902
>>>>>>>>                     [time] => 1187380627
>>>>>>>>                 )
>>>>>>>>         )
>>>>>>>> )
>>>>>>>> Why is the file input not show up?
>>>>>>>> Everything was working fine a month ago, and now it is broke.
>>>>>>>> Any help is very much appreciated.
>>>>> If the HTML is correct, it should show up in the $_POSTvariable.  But
>>>>> since it isn't, you have an HTML problem - not a PHP one.
>>> [bunch of stuff snipped]
>>>> That's what I would expect. It's bizzare, I get the right results in
>>>> $_FILES, but not in $_POST. How is that possible?
>>> That's right... I shouldn't try to answer at midnight after I've been
>>> out with the guys... :-)
>>> Yes, it goes in the $_FILESarray, not $_POST.
>>> Once I got some sleep and looked at this again this morning, it was
>>> obvious :-).  Sorry to steer you down the wrong path.
>> I'm confused about this. How does one associate an upload with
>> database info? In PHP 4, you could have a form that allowed multiple
>> form uploads with multiple fields for inputting multiple info:
>>
>> ----------------
>> Caption your images:
>>
>> 1.) caption input, file input
>> 2.) caption input, file input
>> 3.) caption input, file input
>> 4.) caption input, file input
>> -----------------
>>
>> In PHP 4, with a form like this, you knew which file went with which
>> caption, because the whole 2 dimensional array would show up in
>> $_POST.
>>
>> How do you figure out the relationship in PHP5, if the files never
>> show up in $_POST? Does PHP 5 restrict you to just uploading one file
>> at a time, if you want to caption the file at the same time?
> 
> 
> No answers? I'm surprised by this. I assume I'm not the only PHP
> programmer allowing people to upload more than one file at a time. I
> had an easy enough time in PHP 4 but I can't figure out how to do this
> in PHP 5. If an upload file doesn't appear in $_POST, how do you
> associate the file info in $_POST?
> 
> 
> 
> 
> 

Probably because the information is right in the PHP documentation. In 
fact, there's a full chapter on it, and the file info hasn't been in 
$_POST since PHP 4.1.  Did you read it?

http://www.php.net/manual/en/features.file-upload.php

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
9/22/2007 1:30:37 AM
Reply:

Similar Artilces:

upload file error 3: "The uploaded file was only partially uploaded"
I've a file that starts like this: <form id="pdsForm" method="post" action="/mcControlPanel.php" class="mcForm" charset="UTF-8" enctype="multipart/form-data" > and it contains this input: <input id="biopic" name="biopic" type="file" /> The script recieving it does this: $biopic = $this->core->getVar("biopic"); if (is_array($biopic)) { print_r($biopic); I get: Array ( [name] => L-monkeySmall.jpg [type] => [tmp_name] => [error] => 3 [size] =&g...

PHP File upload
Hi, I have to allow my visitors to upload image on my site. I am using the follwoing code to do that: $uploaddir = 'admin/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); My problem is that I expect them to use same file name, like all of them will be uploading files like, comments.rtf. So if there is already one comments.rtf the file will get overwriten... so the challenge is to rename the files to username-filename.rtf can anybody here will take the pain to modify...

Can upload files, but not a xls file.
What am I doing wrong? I will show my form and the action page. A csv file works fine. <form action="/CompRun/index.php?cmd=uploadEligibilityValidation" method="POST" enctype="multipart/form-data"> <input type = "file" name="eligVal"> <input type="submit" name="submit" value="Submit"> </form> if (isset($_FILES['eligRev'])){ $file = $_FILES['eligRev']['tmp_name']; $fp = fopen($file , 'r') or die("can't open file"); insertEligibilityRevenueFile($file, $_SESSION["year"], $_SESSION ["qtr"]); fclose($fp) or die("can't open file"); $msg = "Data successfully uploaded."; $smarty->assign('msg', $msg); $smarty->display('uploadEligRev.tpl'); } else{ $smarty->assign('next', $_SERVER['PHP_SELF']."? cmd=uploadEligibilityRevenue"); $smarty->display('uploadEligRev.tpl'); } When I upload a xls, it always just goes to the else, when I upload anything else, I get the result I expected. Am I missing a setting somewhere? Hi, your form input name is different, i.e. in the form is name="eligVal" and you're checking for "eligRev". Next, don't do that: "isset($_FILES['eligRev']", it's better to do like this: if (is_uploaded_file($_FILES['eligVal']['tmp_name']))... ...

PHP upload
Hi, I have to allow my visitors to upload image on my site. I am using the follwoing code to do that: $uploaddir = 'admin/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); My problem is that I expect them to use same file name, like all of them will be uploading files like, comments.rtf. So if there is already one comments.rtf the file will get overwriten... so the challenge is to rename the files to username-filename.rtf can anybody here will take the pain to modify this code, I will be thankful, or please guide to me some tutorial where they are dealing with simple code and not with advanced classes. Thank you in advane Regards, Jaunty Edward On 14 d�c. 2004, Sir smilesinblues@hotpop.com claimed in news:1103007578.311827.196640@f14g2000cwb.googlegroups.com: > Hi, > I have to allow my visitors to upload image on my site. > > I am using the follwoing code to do that: > > $uploaddir = 'admin/'; > $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); > move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); > > My problem is that I expect them to use same file name, like all of > them will be uploading files like, comments.rtf. So if there is already > one comments.rtf the file will get overwriten... so the challenge is to > rename the files to...

File Upload issue
I am using PHP Version 4.4.3 under Linux/Apachie to upload files. The PHP.ini upload_max_filesize is 2M, which I need to override this in the HTML (see below). I changed the MAX_FILE_SIZE to 4,000,000 but the system only accepts files less than 2M. Is the override wrong, do I need to raise the limit in the PHP.ini file, or is the Apachie issue. <form name="upload" action="admin.php" method="post" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="4000000"> On Wed, 29 Nov 200...

file upload
I Google'd it but seems this problem was not previously seen: I use CGI.pm to upload files through a perl-CGI program: use CGI; ..... ... while ($bytesread=read($filehand,$buffer,2048)) { binmode SAVE; print SAVE "$buffer"; } The file upload worked fine, but the "$bytesread" is zero. What could be the problem? Any hint to diagnose? -- Thanks in advance! Joe zhilianghu@gmail.com wrote: > I Google'd it but seems this problem was not previously seen: > > I use CGI.pm to upload files through a perl-CGI program: > > use CGI; > .......

can upload text files but not image files
Hello Im using the following code to upload image files and a text file The text file itself contains the image file name. The code opens the text file reads it .and if it finds the image file name it PUTs it to a remote website folder. It then PUTs the text file and deletes it from the local machine. The code runs fine and the text file is uploaded but the image files do not. The file name is being located as it is displayed in the message box. Ive checked the obvious stuff like the existence of the folder on the remote site etc and everything seems fine. But I cannot see why the images are not uploaded. Im not aware that image files have to be treated any different to other files using the Internet transfer control. Can anyone help ********************************************** Private Sub cmdPut_Click() On Error GoTo myerror Dim fso As New FileSystemObject, txtfile, fil1 As File, ts As TextStream Dim sFile As String Dim sBuffer As String Dim MyImgFile As String sFile = App.path & "\Uploads\" & Me.txtUploadFile Set fil1 = fso.GetFile(sFile) Set ts = fil1.OpenAsTextStream(ForReading) Do Until ts.AtEndOfStream sBuffer = ts.ReadLine If Left(sBuffer, 11) = "INSERT INTO" Then GoTo nextloop Else MyImgFile = App.path & "\Images\" & sBuffer Inet1.Execute , "PUT " & MyImgFile & " htdocs/images/DBimages/" & sBuffer MsgBox "Uploading...

Q: File Exchange --- posted file not there yet. Should I upload file again?
I posted a file to the file exchange yesterday, but it is not showing up yet. How long does it usuallly take for the file to show up? Should I upload it again or wait? James Tursa James Tursa <aclassyguywithaknotac@hotmail.com> wrote in message <f058j3h10e632t855riru5bocpodhvgu3k@4ax.com>... > > I posted a file to the file exchange yesterday, but it is not showing > up yet. How long does it usuallly take for the file to show up? Should > I upload it again or wait? > > James Tursa It can take a few days depending on workload, holidays/weekends, sick days etc....

Get a dicom File from PACS, add a PDF File and then Upload Again to the PACS
Hello, I need to get a DICOM FILE (*.dcm) using a study UID or Accession Number, I need to get it to the local machine from a remote PACS Server machine, modify it adding a PDF Report using PDF2DCM and then Re Upload the new Dicom File using some DCTMK tool. I have no experience using this tools but, I'm trying it ;-) Thanks so much. On 27 oct, 09:31, Alejandro Fern=E1ndez <alejandrofernandezru...@gmail.com> wrote: > Hello, > > I need to get a DICOM FILE (*.dcm) using a study UID or Accession > Number, I need to get it to the local machine from a remote PACS > Server machine, modify it adding a PDF Report using PDF2DCM and then > Re Upload the new Dicom File using some DCTMK tool. > > I have no experience using this tools but, I'm trying it ;-) > > Thanks so much. I don't understand why you need to get the Dicom file from the PACS and replace it by a PDF. Also, I don't think you can add a PDF without losing the original image's PixelData. Anyway, you can convert the PDF file to Dicom using pdf2dcm, this will create a new Dicom file. Now, you have to add all the needed data to make the new file related to the original study, such as StudyInstanceUID, AccessionNumber, PatientID, PatientName and some other useful data, using dcmodify (also from dcmtk), then you can send the new file to the PACS using storescu (again, from dcmtk). To know StudyInstanceUID, PatientID, etc, you can do a...

Create Files/ Upload Files
Hi Can anyone explain by example how to create a new file on server and then upload some files to that newly created folder? But before we create the file check that an existing file does not already exist and then upload the files to the newly created directory. Thanks Baka On Jun 26, 7:49 am, abhm <bak...@gmail.com> wrote: > Hi > > Can anyone explain by example how to create a new file on server and > then upload some files to that newly created folder? > > But before we create the file check that an existing file does not > already exist and then upload the files to the newly created > directory. > > Thanks > Baka To get started, look at the manual page for the file command. file mkdir, for example, creates a folder. file exists tests for the existence of a file. At 2007-06-26 10:49AM, "abhm" wrote: > Hi > > Can anyone explain by example how to create a new file on server and > then upload some files to that newly created folder? > > But before we create the file check that an existing file does not > already exist and then upload the files to the newly created > directory. Here's an example of how to send a file upload *to* a URL: http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/109363 To write a CGI script that receives an uploaded file, see: http://tcllib.sourceforge.net/doc/ncgi.html -- Glenn Jackman "You can only be young once. But you can always be imm...

file upload not saving file
Hello, When I upload an image to the server I get the message: Warning: Only -1 bytes were written, expected to write 547 The server phpinfo lists : file_uploads On upload_max_filesize 2M upload_tmp_dir /tmp PHP Version 4.4.1 so I created a directory named tmp at the root of my "server space" and gave it chmod 777, but still the same error occurs. This is the result of print_r($_FILES['myfile']) : Array ( [name] => 2.jpg [type] => [tmp_name] => [error] => 7 [size] => 0 ) Error 7 in the PHP manual is : UPLOAD_ERR_CANT_WRITE Value: 7; Failed to wri...

How to detect sizeof upload in order to show status of browser file upload?
I'm sure that most people have used websites which allow a file to be uploaded and which have a pop-up window (HTML) which shows the status as the file is uploaded. eg. 10%, 20%, 30% to completion. This is very convenient if the user is uploading a large file (eg 40MB) since it provides constant feedback to the user and lets him or her know that the browser is not hanging and is in fact still uploading. Does anybody know how to do this in JSP or servlets ? I am currently using the O'Reilly servlet collection but it does not have this capability. Thank you very much in advance Heat...

PHP 5.0.4: can NOT upload file
Environment: Apache 2.0.5 with PHP 5.0.4. Problem: A test php script failed to receive the uploaded file. The uploaded file's temp name was shown from the script, but the file could not be found in the tempory folder. Also move_uploaded_file failed to open stream. The uploaded file has a small size 1k. Settings: max_input_size=2M, max_execution_time=60, max_input_time=60 Other test php scripts worked fine, such as echo "hello world", no problem. Question: Are there any configuration options I need to set for Apache or PHP to enable file uploading, or something else? ...

Uploading Files in php
hi, i have path of the file to uploaded for eg: c:\program files\xyz\xyz.txt so can i directly upload the file to server without using filetype and submit button. if i can kindly let me know how to dao that. kiran wrote: > hi, > i have path of the file to uploaded for eg: c:\program > files\xyz\xyz.txt so can i directly upload the file to server without > using filetype and submit button. if i can kindly let me know how to > dao that. Hi Kiran, Like any file of your choice? Luckily you cannot. If you could do that in a browser, it is broken. The security implications ...

PHP and file uploads
Hi All, Here's one thing that I don't know much about - file uploading. As part of my project, I will have to build a file manager of sorts - perhaps a document manager. Anyhow, this involves allowing my user to upload files to a location. I know PHP can do it - I know this because it sure does everything else ... but I don't know this from any authoritative source. So ... can you tell me if PHP can handle files uploads, and if so, what are the drawbacks that you might have learned of in your experience? For instance, in the ASP world, using a COM object for the upload works,...

can't seem to upload .flv file thru php
Hello, I have this question that hopefully some of you guys can answer. So I use the usual mechanism: display form, enter data, browse for file, validate, upload if no errors. Well, something is not working when I try to upload a flv file. For starters, I print out the $_post and $_files arrays and I see that if I browsed for, say, a wmv video then those arrays contain all the needed data. If I browse for a flv, however, both arrays stay empty, like it looses, for some unknown reason, all the data entered in the form. Any idea why? Could it be a mimi/type-related issue? I gathered that flvs' mime/type was not yet really defined. I don't know... ubuntu 7.10, apache2, php 5.2.3, upload_max_size set to 16 megs Thanks On Tue, 05 Feb 2008 17:51:44 +0100, henribaeyens <contact@myname.com> wrote: > Hello, > > I have this question that hopefully some of you guys can answer. > > So I use the usual mechanism: display form, enter data, browse for file, > validate, upload if no errors. Well, something is not working when I try > to upload a flv file. For starters, I print out the $_post and $_files > arrays and I see that if I browsed for, say, a wmv video then those > arrays contain all the needed data. If I browse for a flv, however, both > arrays stay empty, like it looses, for some unknown reason, all the data > entered in the form. Any idea why? Could it be a mimi/type-related issue? > I gathered that flvs' mime/t...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Getting a file via http or evaluating a php file and getting its output
I need to somehow merge two separate web programs written in php together (from the user's perspective). This solution won't be perminant, I just need something done quickly. I was thinking of two different approches. One would be to download a processed version (modified so it will create validating html with the page it's being embeded in) of one of the programs with the other, then just use print to embed it in the page. I couldn't find out how to get a file via http here (http://us2.php.net/manual/en/index.php). Sorry if I missed this in the docs. The other would be t...

File Upload
I'm writing a script to upload images along with articles to a directory on the server. I'm developing it offline on my WinXP and Apache 1.3.x laptop and it's working great, but when I move the script to the server, I get write errors when the file attempts to upload. So I set up a test script (included below) to test the directory structures all the way up to the file, and every directory appears to be writable, yet I can't write to the test file. I keep seeing suggestions to set the open_basedir directive in the php.ini file to solve this, but it's hasn't worked ye...

CGI file upload
Hey all, I'm having a problem uploading a file larger than roughly 1MB using CGI.pm, however I feel the problem may be coming from mod_perl or apache. Background - I am uploading an MS Excel spreadsheet using filefield via CGI.pm. The second script should take this file (as the filehandle - not saving the file to the filesystem), parse it using Spreadsheet::ParseExcel and output values from various rows/columns. Versions - Apache/2.0.53 (Unix) mod_perl/1.999.21 Perl/v5.8.0 i386-linux-thread-multi, O/S: Linux 2.4.18-14smp, RAM - 4GB... Proble...

File Upload versus Copy File in Java
My JSP application needs file upload feature. And I plan to use Apache File Upload API (http://jakarta.apache.org/commons/fileupload/index.html). For the file copy, I implement a method void copyFile(String dest, String src) that read a source file 2K at a time, and write to the destination file. My question is what's the differences between file upload and file copy? In theory, I can just use the file copy mechanism for file upload. Is that correct? please advise. thanks!! ...

How unique is temporary file names (from file upload)?
I'm storing all uploaded files in one directory -- with the same temporary names they are given by PHP. I do so because I don't want an uploaded file to overwrite an already exisiting one, so I need to know whether these names are unique only per session and can reappear at a different time, or are they unique for every upload... ever? Thanks!=) mvh M. K. Mikhail Kovalev wrote: > I'm storing all uploaded files in one directory -- with the same > temporary names they are given by PHP. I do so because I don't want an > uploaded file to overwrite an already exisiting one, so I need to know > whether these names are unique only per session and can reappear at a > different time, or are they unique for every upload... ever? > > Thanks!=) > > mvh > M. K. Ever is a long time. I think they are compounded from the date in milli seconds and a php string. So maybe when the whole unix time system rolls around in 2025, you might see some duplicates.. Or something like that. The Natural Philosopher wrote: > So maybe when the whole unix time system rolls around in 2025, you might > see some duplicates.. 2038 -- Toby A Inkster BSc (Hons) ARCS [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux] [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 12 days, 3:37.] [Now Playing: Europe - The Final Countdown] NetSol Cybersquatting http://tobyinkster.co.uk/blog/2008/01/10/netsol-cybersquatting/ On Jan 10, 7:56...

Uploading files with cgi
Made this simple cgi-upload script that uses fieldstorage from a web-form. ASCII-based files works fine, but if i try to upload binary-files (word-documents, images) the files seems to be truncated - e.g. an image-file that contains 3398 bytes is uploaded with only 425 bytes. Am I doing something wrong here? Here is the code in full: <!-- The form--> <FORM METHOD="POST" ACTION="cgi-bin/upload.py" enctype="multipart/form-data"> <INPUT TYPE=FILE NAME="filename" size=40> <INPUT TYPE="SUBMIT" VALUE="Upload"> <...

Is Old File Destroyed During an FTP upload of the same file?
If file A is huge and takes several minutes to upload, and I update it by upload a newer version of A. Will A be destroyed in the uploading via FTP? or FTP will only replace file A after the Unload is finished? To make the Q short: Will Uploading with the same file name destroy the old file when upload starts or finishes? "http://links.i6networks.com" wrote: > If file A is huge and takes several minutes to upload, and I update it > by > upload a newer version of A. Will A be destroyed in the uploading via > FTP? > or FTP will only replace file A after the Unload i...

Web resources about - I can not get file uploads to show up when I upload a file - comp.lang.php

Wikipedia:Files for upload - Wikipedia, the free encyclopedia
Welcome to Files for Upload , part of WikiProject Articles for creation . This process was created to allow unregistered users to add new files ...

Windows Users: Upload Photos To Facebook Via URL
... users on Windows , the site recently made it easier to share photos. Now you can simply copy and paste a photo URL when prompted to upload a ...

James Gunn - Handy-Uploads - Facebook
Working with my brother Sean Gunn on Guardians of the Galaxy. This photo is from Sci-Fi magazine which features a great article on how we work ...

upload-14
Visit the post for more.

How to Shoot and Upload Videos for PowerPoint Presentations
... put many people off, and the cost of hiring a film crew, actors, and a post-production studio to […] The post How to Shoot and Upload Videos ...

New Photo Upload Options for Facebook Page Admins
Facebook page administrators may soon have a variety of ways to upload photos to their pages. Clicking on photo/video in pages’ status update ...

Facebook users upload so many videos, it had to invent a whole new system to deal with them
Facebook users are uploading so many videos to the social network that its engineers had to come up with an entirely new system for handling ...


Uplet Lets You Upload Instagram Photos from Your Mac
Not being able to upload photos from a desktop has been a long-simmering complaint about Instagram. You can understand it from their point of ...

Facebook’s Moments app quietly adds video, new upload settings
Getting photos from your friends can be a hassle, but Facebook’s Moments app lets you do just that with a private area where everyone can send ...

Resources last updated: 3/23/2016 7:42:02 PM