Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) PHP File Upload script

  • PHP File Upload script

    Posted by Dan Danner on June 26, 2009 at 7:48 am

    I’m trying to make it so my web clients can upload all their materials for their website via a file upload on my website. I’ve been trying several different php scripts but they all work only 90%. One works but if the file size is over 1mb it won’t work- even though I’ve specifically changed the script to accept 512 mb files…. the other one I tried works but it uploads the files into the wrong folder(even though I specified the correct one)and I can’t delete them out of my http://ftp…. SO FRUSTRATING!!

    So I’m looking for a simple php script for uploading files.. single or multiple I don’t care… and progress bar so clients will know how much longer it’ll take.

    thanks for any help you can give!

    Oliver Russell replied 7 years, 5 months ago 4 Members · 7 Replies
  • 7 Replies
  • Dan Danner

    June 26, 2009 at 4:41 pm

    Ok I’ve kept on trying different php upload scripts and have narrowed down some problems… alot kkep giving me the “failed to change permisison to 777” error…. but I did infact change the folder’s permission in my http://ftp... i can upload a 1mb file but nothing over that size even though I’ve made it ok to upload 512mb files in the php script… for cry’n out loud I can’t figure this out.

    I can read php but not write it… I know the code is ok.. its got to be my http://ftp... but wtf? the folder is 777… 1mb ok 2mb and over not ok even though the php says 512mb is ok? any clues?… anybody?

  • Curtis O’malley

    June 26, 2009 at 4:51 pm

    hello…

    wrt fie size – you cannot set that in the script (look for “File Uploads” section):

    https://us.php.net/manual/en/ini.core.php

    that is PHP_INI_PERDIR:

    https://us3.php.net/manual/en/configuration.changes.modes.php

    which means you can only set that in your php config file or in apache configs. i assume you are on a shared host, so that means you don’t have access to php.ini or httpd.conf. that leaves an .htaccess file override, and it will vary from host to host if you are allowed to change that. check with your host to see.

    as for permissions, it’s hard to say w/o seeing your full setup. in general, i would check with your host on this, too, as they probably have docs wrt it somewhere on their site..

    hope that helps…

    sitruc

  • Dan Danner

    June 26, 2009 at 6:17 pm

    Thanks Curtis… I just realized what I’ve overlooked… yes I am on a shared host… when I was messing with a wordpress site for a client I came across something that said my server would only take files >2mb.

    So yeah its my host… I’ve been staring at code too long. I’ll check with my host to see if they can make it bigger.

    many thanks Curtis!!

  • Dan Danner

    June 26, 2009 at 7:06 pm

    I got it fixed… I was able to install a php.ini with the max upload size of 50mb. thanks Again Curtis!!

  • Chandra

    July 7, 2009 at 9:34 pm

    hi there. This PHP script you are talking about is exactly what I am looking for. I know nothing about scripts though. Right now I have a script that I put into a folder on my ftp and when i do that i can send a url to a client so they can down load a file i put in that folder that way I don’t have to give them any of my ftp information.
    I want to be able to do the same thing but I want for a client to be able to upload a file into a folder on my ftp. I can’t figure out how to do this, so today i had to trust the client and give out my ftp info (ie user name passowrd etc.)
    could you tell me how to get a script like the one i have for downloads but have it be for uploads?? This would be soo very helpful!

    this is what i am using right now:
    https://www.bitfolge.de/snif-en.html

    thanks!

  • Dan Danner

    July 7, 2009 at 11:12 pm

    I don’t remember where I found the php script… do a google search for free php upload scripts.

    Also check this out: https://www.w3schools.com/PHP/php_file_upload.asp
    this will give you the general idea…. and you can copy & paste some of it.

    I had to dig around in my host control panel to install a php.ini file so I could make the upload max from 2mb to the maximum of 50mb.

    I made a pop up window with the upload form that calls to the upload script. Then it puts all the files into a folder I designate… no ftp needed…

    Sorry I can’t give detailed info… I had to do some trial & error but i got it figured out… you can too.. good luck Chandra!

  • Oliver Russell

    June 15, 2017 at 10:20 am

    Try out this PHP file upload script here: https://www.cloudways.com/blog/the-basics-of-file-upload-in-php/

    I used this same script and tutorial to add file upload feature in my chat system. The only problem was that it doesn’t support multiple file uploads. But with few little tweaks in the code I was able to make it work for multiple files as well.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy