Author Topic: PHP Upload  (Read 9734 times)

0 Members and 1 Guest are viewing this topic.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: PHP Upload
« Reply #15 on: November 25, 2012, 05:23:04 pm »
First question, is the php part in a different file as the html form?
2nd: is the php part in the uploader.php file?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #16 on: November 25, 2012, 05:24:41 pm »
yes I have html file upload.html with the form and then uploader.php with the php code
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: PHP Upload
« Reply #17 on: November 25, 2012, 05:25:53 pm »
hmmmmm let me think...
(Is it already on a server or on xampp or so?)

1st : put " " in the allowedexts array instead of ' '
2nd try removing all coments ( /*...*/ )
« Last Edit: November 25, 2012, 05:28:21 pm by stevon8ter »
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #18 on: November 25, 2012, 05:27:58 pm »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: PHP Upload
« Reply #19 on: November 25, 2012, 05:31:44 pm »
Are you sure you saved it correct the script? Cause when i look in the source it's an empty file...
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #20 on: November 25, 2012, 05:34:01 pm »
I saved it as a uploader.php with exactly what I posted earlier. When I execute php5 uploader.php from the command line it runs and tells the index is invalid and that its an invalid file
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: PHP Upload
« Reply #21 on: November 25, 2012, 05:36:10 pm »
Hmmm i tested my script and for me it worked :/
But remove all comment lines...
And at the mkdir($path);

Do mkdir("uploaddir/" . $path);
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #22 on: November 25, 2012, 05:48:37 pm »
I'm still getting a completely blank page. Could it be something on my server set up wrong? This http://test.ruler501git.tk/omni/phptest.php page works so it seems not to be a problem with php. What else could cause it to show a completely blank screen?
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: PHP Upload
« Reply #23 on: November 25, 2012, 05:57:49 pm »
Hmmmmmmm i don't really know

But if you trust me, send me all data needed to login to server (in a pm) and i'll look into it...
(I hope you trust me, i'll do nothing wrong)
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: PHP Upload
« Reply #24 on: November 25, 2012, 07:50:23 pm »
I think it might be working. I uploaded a test file.
« Last Edit: November 25, 2012, 07:50:54 pm by Rhombicuboctahedron »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: PHP Upload
« Reply #25 on: November 25, 2012, 07:52:55 pm »
I got
lolReturn Code: 1

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #26 on: November 25, 2012, 07:58:16 pm »
Rhombicuboctahedron your file went through. What kind of file were you trying to upload epic7? Though you should probably ask stevon8ter since he set it up
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: PHP Upload
« Reply #27 on: November 25, 2012, 08:02:29 pm »
It was an avi file.

* epic7 uploads an mp4 file
Says
Return Code: 1
« Last Edit: November 25, 2012, 08:02:39 pm by epic7 »

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: PHP Upload
« Reply #28 on: November 25, 2012, 08:13:54 pm »
I forgot to change a seetting I'll fix it in a little bit.
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: PHP Upload
« Reply #29 on: November 25, 2012, 08:26:25 pm »
Yeah, I got the same when I uploaded a .avi file, but you should probably be able to change it easily enough.
Also, do you think you might be able make an upload progress bar, such as this one
http://www.johnboy.com/php-upload-progress-bar/
Sorry to be demanding, especially since you just finished making this, but that is certainly nice to look at while a big file is uploading.