UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 29th December 2002, 02:27 PM   #1 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Looking for a php upload script

As the title says, I'm looking for an upload script - so I can upload files using the web interface.

Anyone know any good ones?

Many Thanks
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 29th December 2002, 05:55 PM   #2 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
Re:Looking for a php upload script

have you tried:

http://php.resourceindex.com

or

http://www.hotscripts.com

I normally get everything i need from there.

Otherwise attempt your own with code snippets from phpbuilder.com

hope this helps
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 31st December 2002, 12:51 AM   #3 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

http://perl.about.com/cs/uploadingfiles/

Take your pick.

If you use Coranto - it has a neat upload plug-in.
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 04:29 PM   #4 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

I am having an error with: http://www.scratchthat.co.uk/ftp/psupload.html

When I try to upload, I get a server error...
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 04:32 PM   #5 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

What is the exact error?

Did you set file permissions?
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 05:17 PM   #6 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

If you try it yourself. I set all the file permissions.
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 05:38 PM   #7 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

Did you set the folder permission too?
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 06:12 PM   #8 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

yeah. It's the cgi file that I feel I have problems with. (although I followed the instructions).
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 06:14 PM   #9 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

Post the d/l link for that script and I'll try it on my server.

Mind you it looks familiar - I think I have used that one before.
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 07:01 PM   #10 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

http://www.perlservices.net/en/progr...ad/index.shtml
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 07:16 PM   #11 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

Yeh, I use that script on my site, works fine.

There is not much setting up really so I don't know what to suggest, lemme have another look at it and see what it might be....
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 07:21 PM   #12 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

Okay here are the things you need to check. Also - although you are getting an error - have you actually checked the remote folder - the file might have uploaded anyway.

You must specify the full URL to a page where the upload.cgi will re-direct the visitor after the upload is complete.

If you don't specify a valid url you will get a cgi error I believe.

Around line 63 is the variable $Data. You will have to set this variable to the absolute path to the directory you created.


Did you use the absolute path?

That's about it, apart from the folder and file permissions.

Hope that helps.
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 07:30 PM   #13 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

I checked all that and it's fine.
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 07:33 PM   #14 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

One that I used before was http://phpatm.free.fr/

It was horrible, as things started going wrong it with it. I got fed up with it and deleted it.
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 07:38 PM   #15 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

I dunno what else to suggest, post the edits you made to the cgi file here incase there is something up with it.
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 07:42 PM   #16 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

CONFIGURE VARIABLES

$Data = "/var/www/html/ftp";
#   On your server, create a directory where this program will write the files
#   to. Make sure you CHMOD this directory to 777. If you do NOT specify a $Data
#   directory, the program will attempt to write to the web root directory.
#   NOTE: YOU SHOULD ALWAYS SPECIFY A DIRECTORY TO STORE THE UPLOAD

@good_extensions = ();
#   If you want to limit the types of extension that can be uploaded, specify them
#   here by adding them to the array. For example, if you wanted to permit only
#   the upload of gif's, jpg's and png's, then you would set the above array to
#   look like this:
#   @good_extensions = ('gif', 'jpg', 'jpeg', 'png');
#

@bad_extensions = ('exe');
#   If you want to permit the upload of all file types with only certain exceptions,
#    then specify those extensins in the bad_extensions array. This means that if set
# this array to contain .exe, .pl, .cgi files, then the program will only store a
#   file if the extension of that file is NOT found in this array.
#   To set the array to exclude these sample extensions, you would set it like this:
#   @bad_extensions = ('exe', 'cgi', 'pl');
#

   #   NOTE: If you specify both @good_extensions and @bad_extensions, then
   #   the settings in @bad_extensions will be ignored and the program will
   #   use @good_extensions as it's refrence.

$redirect = "http://www.scratchthat.co.uk/ftp/uploadcomp.htm";
#   When the upload of files is complete, the program must print someting out on the
#   browser screen. Set the $redirect variable to the full URL (don't forget the http://)
#   that you want the person taken to once the program is finished. If you don't specify
#   a URL here, the program will print out a simple upload summary page.

$max_size = 1024;
#   Set the maximum size of each file that is permitted. For example, if you only want
#   files to be uploaded that are under 50Kb in size, set the value to:
#   $max_size = 50;
#   If you set the value to zero, remove it or comment it out, then the size of the
#   uploaded file will NOT be checked.

$max_num_files = 5;
#   You must specify the maximum number of files that can be uploaded at one time. You
#   can set this to any number you want but be realistic. The limit before the server
#   times out will depend on the maximum size of the upload. I have tested this program
#   with ASCII files up to 8MB in size successfully but that was on a particularly
#   robust server. I recommend that you set this no higher than 5 if you are going to
#   be using this for larger binary files such as images or executables or word docs, etc.
#   If you remove, comment out or set this value to zero, the program will default the
#   value to 1 file.

$auto_rename = 1;
# This variable tells the program whether or not to over-write or reject like
# named files. Therefore, if you upload a file with a name that already exists
# on the server, set this value for the appropriate following results:
# 0 => Overwrite the existing file
# 1 => Leave existing file in place, serialize the name of the new
# new file (i.e. some_book.doc, some_book1.doc, some_book2.doc, etc)
# 2 => Reject the new file. Leaves the original file in place and rejects
# the new file so that it is not saved.
# The default setting of this var is 0.

__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 07:42 PM   #17 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

That is the part that I had to edit. I just removed the rest.
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Old 31st December 2002, 07:54 PM   #18 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

Well, the first thing is

http://www.scratchthat.co.uk/ftp/uploadcomp.htm

I said to make sure it existed - but I am getting a 404 on it... :-
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 08:00 PM   #19 (permalink)
Rocky
Registered User
 
Join Date: Dec 2002
Location: Scotland
Posts: 139
Send a message via ICQ to Rocky
Re:Looking for a php upload script

[quote author=squawkBOX link=board=7;threadid=110;start=15#792 date=1041363762]
That is the part that I had to edit. I just removed the rest.
[/quote]

What I do, is not remove any parts of a cgi file until I confirm the script is working, then it's okay to go and start removing and hacking bits of it.
__________________
Rocky
GhostRecon.net | Rainbow Six | PSP Guides | Tactical Elite
Rocky is offline   Reply With Quote
Old 31st December 2002, 08:02 PM   #20 (permalink)
squawkBOX
Registered User
 
Join Date: Oct 2002
Location: Falkirk, Scotland
Posts: 53
Re:Looking for a php upload script

I meant to show it here on the forum, as it was too large.
__________________
Note: there = 1. at or in that place; 2. toward, to, or into that place; 3. used in impersonal constructions in which the real subject follows the verb. their = The possessive form of they. they're = The contracted form of they are.
squawkBOX is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 05:26 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309