Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP upload file type limitations?

PHP upload file type limitations?
Thread Tools
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Feb 7, 2003, 12:16 AM
 
OK essentially I need to write an upload form for something I am doing. I basically have it working while consulting the php website, http://www.php.net/manual/en/feature...ad.post-method

Now the problem, it's seems that certain files, just fail. PSD, some compression formats... All that's actually worked is a word doc, an image and a text file. Kind of limited I think. Is it the presence of a resource fork that's messing with it or what? Can that just be overlooked since the main data is in the data fork for all the files I want to upload.

Thanks
     
Mac Enthusiast
Join Date: Jul 2002
Location: Leiden, Netherlands
Status: Offline
Reply With Quote
Feb 7, 2003, 02:11 AM
 
Originally posted by Synotic:
Is it the presence of a resource fork that's messing with it or what? Can that just be overlooked since the main data is in the data fork for all the files I want to upload.

Thanks
I think you've hit the point. You'd need to binhex the files, but since PHP is on the server it cannot binhex your files.
Another way to achieve your goal would be to sniff if the browser is on a mac and then with a javascvript ask the user if the file has been binhexed/stuffed,or macbinaried ...
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 7, 2003, 02:40 AM
 
What's the size of each of the files?

I'd say 99% of PHP installations have a max-post size of 8Mb, but only 2Mb for post-files. If your .psd file (or any other file for that matter) is over that, it's an automatic fail.

It's easy to change if you have your own copy of PHP running - you just change the values in the php.ini file. Otherwise, speak to your systems admin and they should be able to fix that for you.

That is, of course, if that IS the problem. Can you post a code snippet to determine if there's anything out of sorts? The enctype is definitely "multipart/form-data"? Sometimes a hidden field within the form called "MAX_FILE_SIZE" with a value of "4096000" may help.
Computer thez nohhh...
     
   
Thread Tools
Forum Links
Forum 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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2