PHP file upload script

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Mon Aug 18, 2003 12:54 am    Post subject: PHP file upload script Reply with quote

can someone please help me with a problem?
i have a server running latest phpbb2,latest mysql, and abyss web server

i am trying to make a php page which the visitors on the site could use to upload files onto my folder.
my plan was to put the page into a protected folder to which only some users will acess codes will have acess.
i set everything up and tried to run a phpfile upload script and everytime something like "permission denied" came up. I have tried puttin all the php scripts into the root folder and that didnt make a difference.
I don't think its a problem with script. I think its just me missing something out in abyss web server security configs.

I am new to php and server running so any suggestions or help would be greatly appreciated. Please put me on the right track.
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
Kent
-


Joined: 12 Jan 2003
Posts: 137

PostPosted: Mon Aug 18, 2003 5:08 am    Post subject: ? Reply with quote

did you make sure the folder your telling the script to upload to is set to accept uploads on your system usually with a windows platform you need to uncheck where it says "read-only" under the properties tab for that folder.
Back to top View user's profile Send private message
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Mon Aug 18, 2003 8:39 pm    Post subject: Reply with quote

nope i will do that right now thanks for replying = )
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
Kent
-


Joined: 12 Jan 2003
Posts: 137

PostPosted: Mon Aug 18, 2003 9:13 pm    Post subject: . Reply with quote

did that work for you at all RuS? let me know
Back to top View user's profile Send private message
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Mon Aug 18, 2003 9:42 pm    Post subject: Reply with quote

nope sorry

read-only was already unchecked
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Mon Aug 18, 2003 9:47 pm    Post subject: Reply with quote

perhaps there is something wrong with the php code im using but im sure that the source where i got it from is trust worthy and won't supply code with errors in it. could anyone recommend a source for an upload php script so i cud give it a try and attempt to figure out why i cant upload.

thanks again

i have just checked over the code and customized a few things. still says:

Permission denied. Unable to copy file to '/uploads/'
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Aug 19, 2003 12:26 am    Post subject: Reply with quote

Give me the script and i will test it out
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Tue Aug 19, 2003 12:43 am    Post subject: Reply with quote

i got it to work! I am sorry everyone but the mistake was me not reading the manual properly. It has to be in specific location on your file server to work or it starts sending back mistakes and such. Nevertheless everyone thanks for your time and effort! :D
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
Kent
-


Joined: 12 Jan 2003
Posts: 137

PostPosted: Tue Aug 19, 2003 1:15 am    Post subject: Reply with quote

:D YW RuS
Back to top View user's profile Send private message
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Aug 19, 2003 2:53 am    Post subject: Reply with quote

Rus can you please send me the PHP script , I want it ! 8)
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Tue Aug 19, 2003 4:09 am    Post subject: Reply with quote

http://dave.imarc.net/php/index.php

i learned the basic stuff from here and used this as a reference
this is the best piece of script ive found so far on php uploading and i would
like to give the authors full credits for an awesome job
u can find some more by typing in google:
php upload script

there is lots of information but this is the easiest and the most basic i
cud find and it really helped me. hope this helps u.
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Tue Aug 19, 2003 4:28 am    Post subject: Reply with quote

something else that u might be interested in that i have found:

php.ini has a whole section dedicated to http file upload somewhere in the middle. it took me some time to configure it but in the end everything works perfectly. an example of something useful i found there was that php.ini restricted max upload file size to 2megs. so in case ur wondering why ur getting errors i suggest u check that out.

some more stuff:

ive been getting time outs while downloading files over 30 megs. i fixed the problem by changin the time out seconds in cgi settings /server parameters
from 60 to 1800 which would give a person uploading exactly 30 minutes before he is disconnected. i hope this helps.

p.s. i am not sure if this is entierly safe to put timeout at 30 minutes. perhaps someone could commnent on that cose i really duno
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Tue Aug 19, 2003 5:30 am    Post subject: Reply with quote

ok the upload is working perfectly but ive run into another really weird problem. i uploaded the files into the folder but then when i try to download them of the server it doesnt display the download dialogue and just thinks. on the server monitor tho i see that the file that i clicked has been launched on the server. this happens to all the files and i was wondering if anyone has run into a problem like that before and knows how to fix this.
thanks ahead
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Aug 19, 2003 3:16 pm    Post subject: Reply with quote

RuS wrote:
ok the upload is working perfectly but ive run into another really weird problem. i uploaded the files into the folder but then when i try to download them of the server it doesnt display the download dialogue and just thinks. on the server monitor tho i see that the file that i clicked has been launched on the server. this happens to all the files and i was wondering if anyone has run into a problem like that before and knows how to fix this.
thanks ahead

If you have to download .exe files, some care must be taken to avoid this problem. Please read http://www.aprelium.com/forum/viewtopic.php?t=2188 and http://www.aprelium.com/forum/viewtopic.php?t=1870 . In all the cases, you should set your CGI Paths correctly so that the download directory won't be considered as a CGI Path (or as one of the sub-paths of a CGI Path).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
RuS
-


Joined: 16 Aug 2003
Posts: 9
Location: Canada

PostPosted: Tue Aug 19, 2003 8:42 pm    Post subject: Reply with quote

allright i have made pointers to all the php files and everything is working great thank you very much aprelium!

abyss rulz~!
_________________
RuS
Back to top View user's profile Send private message MSN Messenger
bdockeray
-


Joined: 23 Oct 2003
Posts: 1

PostPosted: Thu Oct 23, 2003 11:13 am    Post subject: file uploads - Windows Reply with quote

Having spent hours and hours struggling to get a simple upload script to run on my Windows machine i found that the reason the upload kept failing is that the upload directory (ie the one you specify in the copy command ) MUST BE set to shareable. This is not enabled by default. In Win2k You have to right click on the folder name select properties , sharing , share this folder. And then it all works. So simple really once you have the solution !!
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group