![]() |
![]() |
This project is not completely dead. I've just started work on localisation. If you're getting a "Deprecated" error message, follow the instructions here URGENT Security Patch for ≤ v2.2.6 A security hole has been discovered, follow the instructions and download the patch at the topic page. Did the patch break your search page? Search Patch
|
![]()
Posts: 10
Registered: 2007-06-21 |
The UPB 2.0 uploading works fine, but the 1.96 version doesn't. Also other fileupload scripts that I have work fine.
I looked at the code of newpost.php and noticed that the fileupload codeblock appears twice in the script. |
![]()
Posts: 10
Registered: 2007-06-21 |
Attachement failed here. Trying again...
|
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
Oh I forgot, it doesn't work here because we just had a problem with our webhost the past few days, it will be back up here in a day or two. It does work here though.
Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
|
Last edited by: Pilot on Jun 28, 2007 12:59:07 pm
| |
![]()
Posts: 10
Registered: 2007-06-21 |
![]() I'm back. Here is the script I was talking about. Is there a bug in it or is there another way to get the file uploading to work? |
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
Well it sure doesn't feel good looking at this old code, looks like the problem is that its assuming register_globals is on. Try this...
right after the FIRST //FILE UPLOAD BEGIN add PHP Code: $file_name = $_FILES["file"]["name"];
$file_type = $_FILES["file"]["type"]; $file = $_FILES["file"]["tmp_name"]; That should do the trick. Oh and remove the code after the second //FILE UPLOAD BEGIN up until the //END Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
|
Last edited by: Pilot on Aug 15, 2007 1:54:51 am
| |
![]() UPB Team Member
Posts: 893
Registered: 2006-11-14 |
I think you need both of them. One for new topics, and another for replies. I believe that's how it was set up in UPB 1.
--Jerroyd Moore
Bachelors of Science, Computer Science 2011 Jack Baskin School of Engineering University of California, Santa Cruz |
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
ahh your probably right. put that code under both //FILE UPLOAD BEGIN then
Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
![]() UPB Team Member
Posts: 893
Registered: 2006-11-14 |
If you upgrade to v2, you won't have these code redundancies, you'll be able to upload files without any code modifications, and you'll have better support (*coughs in Pilot's direction*)
![]() --Jerroyd Moore
Bachelors of Science, Computer Science 2011 Jack Baskin School of Engineering University of California, Santa Cruz |