Hi All,

Ive recently switched to a new host and now one of my scripts isn't working properly. My new host runs PHP 4.1.2. The problem I've encountered has to do with enctype="multipart/form-data".

It seems when I have my form action set like this...

<form action="mail.php" method="POST" enctype="multipart/form-data">

PHP 4.1.2 doesn't recognized the POSTED data, but if I leave out the enctype="multipart/form-data" PHP does recognize the POSTED variables.

Now as I'm uploading binary files I need enctype="multipart/form-data"

I've run this script successfully on my previous box running PHP 4.2.2

Any ideas what's up??

Thanks

JeNNiDeS

PS: I've asked my host about upgrading to 4.2.2 but they run PLESK on their servers and they say PLESK currently supports 4.1.2 so they won't upgrade.

    I've got 4.1.1 and have no problem uploading image files with enctype="multipart/form-data"

      Last time I came across something resembling this it turned out to be a configuration issue - the file_uploads entry in php.ini was turned off.

      If you can't see/alter php.ini directly, phpinfo() will tell you what the value of file_uploads is (it should be 1), and ini_set() will let you change it if it's wrong.

        Thanks WeedPacket!

        It was the php.ini file.

        As soon as I set file_uploads to On (it appears my configuration uses On and Off for file_upload and not 1 and 0) everything worked fine!

        Thanks again :p

        JeNNiDeS

          Write a Reply...