PDA

View Full Version : Upload Hack


Slynderdale
04-09-2002, 10:00 PM
Im a newbie at php, and this is my first hack, its a uploader i made that uses your vbulletin forum's accounts and pass to upload files into there private folder, it also lets people view what files they uploaded, it also logs when, who, what file was uploaded and the size of the forum to a text file. When some one uplaods it creates a sub folder thats the same as there username and a blank index.html file so no one can browse through there stuff and then uploads the image into there personal sub folder, you can also edit authvb to only alow certain usergroups to upload.

How to setup:
Open config.php and change the settings to how you want them
upload config.php,upload.php and authvb.php
chmod the folder where the log file will go and where the account sub folders will be places so there read and write, probily 0777

Thats it, now go to upload.php and use your vbulletin account and pass and upload a file

Coming soon:
Delete feature
File count limit

Slynderdale
04-09-2002, 11:15 PM
Screen Shot:
Heres the Main Screen

Slynderdale
04-09-2002, 11:16 PM
Heres after you upload a file:

Slynderdale
04-09-2002, 11:16 PM
Heres the view menu screen:

Slynderdale
04-09-2002, 11:19 PM
Heres how the log looks:

Dade
04-09-2002, 11:39 PM
So this is like having a private folder full of your own pictures? Pretty cool.

Slynderdale
04-09-2002, 11:42 PM
yea, you can also set what file types are allowed to be uploaded too, so if you want you could allow .html and let your memmbers create mini web pages, you can set what file types are allowed to be uploaded and the size and theres a couple other features, one way is to let users upload images to show on forums useing [ img ]

freakyshiat
04-09-2002, 11:47 PM
Ok, can I upload to a different server? I am trying to separate attachments and have them uploaded to a server other than the one the forum is hosted on

Slynderdale
04-09-2002, 11:48 PM
Heres what it looks like on ftp, each user has there own folder to upload to, the user folders automaticly get created

Slynderdale
04-09-2002, 11:52 PM
mine only works on the server its located on at the moment

freakyshiat
04-09-2002, 11:55 PM
Originally posted by Slynderdale
mine only works on the server its located on at the moment
ok, then is it possible to have it uploaded without typing in the username/password?

Slynderdale
04-10-2002, 12:03 AM
Originally posted by Fazle

ok, then is it possible to have it uploaded without typing in the username/password?

yes, it can be edited so you dont need a pass and account uploaded, theres already a hack though that uploads attachemnets to the server instead to the mysql database

Aaow AnD wHiTe
04-10-2002, 12:05 AM
Thank you, Slynderdale :) Is it possible to set a "disk quota" for each user?

Slynderdale
04-10-2002, 12:13 AM
Originally posted by Aaow AnD wHiTe
Thank you, Slynderdale :) Is it possible to set a "disk quota" for each user?

good idea, ill add it to my next version

Nemesis77
04-10-2002, 12:18 AM
What versions of VB does this work on?

Slynderdale
04-10-2002, 12:19 AM
hmm, i would say all versions because the only thing it checks vbulletin for is the user pass and account on the mysql database

Slynderdale
04-10-2002, 12:24 AM
if your useing an older version of vbulletin that doesnt encryted the passes, in the config.php find $encryptedpw = "true"; and change it to $encryptedpw = "false";

Slynderdale
04-10-2002, 12:31 AM
If you plan on useing this on your website, i only ask for one thing, dont say you made it, if you want to give me credit for it you can, you can edit it as you wish, also if you like it, please press install the hack so you get notices on any new updates on it, Thank You :)

LangTuDaTinh
04-10-2002, 12:32 AM
Thanks...This hacks is cool.

would it be possible if you add image size (pixels) check or resize image (if possible???)

also add more upload boxes??? (example like 5 upload box.)

Thank You

Slynderdale
04-10-2002, 12:40 AM
hmm, yea i could add that, ill add it for the next version i relase, you can customize it as you wish in the config file, i could add a limit on image sizes too

JulianD
04-10-2002, 01:02 AM
And you say you are a newbie on php? :D:D:D

Great hack!

freakyshiat
04-10-2002, 01:20 AM
its not working, says mkdir failed. I chmodded the directories

Slynderdale
04-10-2002, 01:23 AM
Originally posted by Fazle
its not working, says mkdir failed. I chmodded the directories

did you set the abosulute path in config.php then chmod the file it points at to 777?

Slynderdale
04-10-2002, 01:23 AM
you just need to chmod that directory, the upload script does the rest

freakyshiat
04-10-2002, 01:30 AM
Originally posted by Slynderdale


did you set the abosulute path in config.php then chmod the file it pointsat to 777?

i set the absolute path to //public_html/upload
chmodded 777

it says:

Warning: MkDir failed (No such file or directory) in /home/otbackup/public_html/upload.php on line 114

Warning: fopen("//public_html/upload/guest/index.html", "a") - No such file or directory in /home/otbackup/public_html/upload.php on line 116

freakyshiat
04-10-2002, 01:49 AM
ok, never mind, i got it to work, how can I edit it so it doesnt ask for username/password, just dumps it in guest directory?

MrLister
04-10-2002, 02:19 AM
great hack. btw do you always need a password to download because there's probably some users that would use it as a leech directory.

Neo
04-10-2002, 02:33 AM
Hey this looks cool. What a nice addon to my forum :)

Slynderdale
04-10-2002, 02:36 AM
Originally posted by Fazle
ok, never mind, i got it to work, how can I edit it so it doesnt ask for username/password, just dumps it in guest directory?
hmm could make a account called guest on your forums and make a user grop called Upload Guest or something and do it that way, ill add a guest option later to it for those who want guest uploads

Slynderdale
04-10-2002, 02:57 AM
If any one uses this on there website, tell me how your members like it, and if you want, send me a link to your forums

Slynderdale
04-10-2002, 03:21 AM
im working on a updated uploads and config, i never thought so many people would like it, heres what the update will have


//**Email Configuration - use to control the uploading
$email=""; Webmasters email
$email_notify = "no" //If yes, it emails the email above if some one uploads and deletes a file
//Note: Web host must have email support

//**URL Configuration - change them to fit your site
$absolute_path = "/home/your site/files"; //Absolute path to where files are uploaded
$site_url = "http://your site.com/files/"; //the url to where files are uploaded
$log_path = ""; //the path to where the log file will go

//**File Configuration - use to control the uploading
$logging = "no" //logs what people do to a text file
$size_limit = "no"; //do you want a size limit yes or no.
$limit_size = "2000"; //How big do you want size limit to be in bytes
//Note: 1 KB = 1024 bytes 1 MB = 1048576 bytes
$limit_ext = "yes"; //do you want to limit the extensions of files uploaded
$extensions = array(".gif", ".jpg", ".jpeg", ".png", ".bmp"); //List extensions you want files uploaded to be
$pixellimit = "false"; //do you want to limit the pixel size of images?
$resizeimg = "false"; //resize the image if its to big
$widthlimit = "100"; //max width size in pixels
$lengthlimit = "100"; //max length size in pixels
$allow_databaselimit = "yes"; //limit members database size?
$database_quota_limit = "5048576"; //database size limit in bytes

//**Account Configuration - use to add accounts and limit there access
$bannedaccounts = array();
$allow_guest_uploads = "yes";

//**Site Configuration - use to change how the uploader looks
$show_img = "yes"; //do you want the image you uploaded to show on the screen after you upload
$show_link = "yes"; //do you want the link to the file you uploaded to show on the screen after you upload
$comment_mainpage = ""; //The comment that apears at the bottom of the main page
$comment_upload = ""; //The comment that apears at the bottom of the upload page
$comment_view = ""; //The comment that apears at the bottom of the view page
$comment_delete = ""; //The comment that apears at the bottom of the delete page
$link_url = ""; //The url of the link that apears at the bottom of every page
$link_name = ""; //The name of the link that apears below every page

//**Color and Text Configuration
$color_background = "#18576F"; //The background color
$color_title_table = "#5E6A7B"; //The title table color
$color_body_table = "#818EA0"; //The body table color
$color_text = "#FFFFFF"; //The text color
$color_link = "#818EA0"; //The link color
$color_vlink = "#5C697A"; //The visited link color
$color_alink = "#818EA0"; //The active link color
$text_font = "Verdana"; //The font the text uses
$text_size = "8"; //The text size
$text_size_title = "8"; //The title table text size
$text_size_body = "8"; //The body table text size

//**Database Configuration
$checkservername = "localhost"; // hostname or ip of server
$dbcheckbase = "database name"; // name of database
$encryptedpw = "true"; // encrypted (md5) passwords on/off (true/false)
$dbcheckusername = "database username"; //database user name
$dbcheckpassword = "database password"; //database password

Neo
04-10-2002, 03:28 AM
Its a nice hack, I will wait for the update before I install

Slynderdale
04-10-2002, 03:39 AM
the update will be out in a day or two, at the most, a week, when its done it should be highy customizable, you can install version 1.0 if you want but when 2.0 you can just edit the config and upload over the old files. Hmm, idea, maybe add some admin options like view a list of those who uploaded, there quota, and a view and delete ability.

Neo
04-10-2002, 03:44 AM
I will use the current version and then update once it is ready. thanks for the info.

freakyshiat
04-10-2002, 04:47 AM
keep up the good work, 2.0 looks promising

freakyshiat
04-10-2002, 05:02 AM
oh and how about pics with spaces or illegal characters....can it pop an error saying unacceptable file name or something?

Slynderdale
04-10-2002, 06:07 AM
hmm alright, ill add some customizable error messages that come up for errors, also in the new version im gonna fix the coding up so its esier to read and cleaner

WallStreat
04-10-2002, 06:32 AM
The following code can help to generate thumbnails, provided your server is installed with imagemagick:



if ($extension == "gif" or $extension == "png") {



system("$galleryconvert -geometry '160x120>' $path GIF:$thumbname");



} elseif ($extension == "jpg" or $extension == "jpeg" or $extension == "jpe" or $extension == "png" or $extension == "bmp") {



system("$galleryconvert -geometry '600x120>' $path -flatten -quality '75' JPEG:$thumbname");



}



1. $path refers to the directory where u store the thumnails e.g.
$path = "/home/yoursite/public_html/images";

2. $thumbname refers to the name u give to your thumbnail

Modshack
04-11-2002, 08:52 PM
Originally posted by Slynderdale
If you plan on useing this on your website, i only ask for one thing, dont say you made it, if you want to give me credit for it you can, you can edit it as you wish, also if you like it, please press install the hack so you get notices on any new updates on it, Thank You :)

Does this include you adding a credit to CyberGaf who made the vbauth file here http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=282 ?
for the use of the script which you have edited that he created ?

camikazi2k
04-12-2002, 01:02 AM
i am installing this now definitlly, hope it do fix my upload limit problem :)
well let ya know
thanks alot

camikazi2k
04-12-2002, 01:34 AM
ok, i have checked the name and everything, everything is right but i still get this error
Unable to select database.
??
any idea

camikazi2k
04-12-2002, 01:54 AM
sorry, can some one tell me how to run the sql? what command to use
thank you

Slynderdale
04-12-2002, 10:07 PM
The new version is almost done, should be fished and bug free in a few days

Slynderdale
04-12-2002, 10:08 PM
Originally posted by camikazi2k
ok, i have checked the name and everything, everything is right but i still get this error
Unable to select database.
??
any idea

did you put inthe right database name, account and pass in the config?

LangTuDaTinh
04-13-2002, 02:44 AM
Slynderdale, many thanks...Great Hack...

Slynderdale
04-15-2002, 07:31 PM
Sorry every one, the new version is at a stand still till i can get my mysql database fixed as seen here:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=37428

Sorry for the inconvience, ill try to get it done as soon as i can.

nafae
04-16-2002, 09:31 AM
Wow I don't believe I missed this hack yesterday. Great hack, and goodluck with your database (I can't help you with it because I don't know much about mysql) Thanks again :)

(I'll be installing tonight)

Slynderdale
04-16-2002, 06:09 PM
i got the database fixed, im working on the upload version 2.0 and a zodiac hack that shows the users zodiac sign in the member list, in postbit and there profile, you can choose where you want it.

nafae
04-16-2002, 06:32 PM
I get this error:

Warning: MkDir failed (No such file or directory) in /home/coderfor/public_html/upload/upload.php on line 114

Warning: fopen("./home/public_html/upload/files/nafae/index.html", "a") - No such file or directory in /home/coderfor/public_html/upload/upload.php on line 116

the folder /files is chmodded to 777, and

$absolute_path = "./home/public_html/upload/files"; //Absolute path to where files are uploaded
$site_url = "http://coderforums.net/upload/files"; //the url to where files are uploaded

What is wrong with this? does anyone know?

Slynderdale
04-16-2002, 06:34 PM
Originally posted by nafae
I get this error:

Warning: MkDir failed (No such file or directory) in /home/coderfor/public_html/upload/upload.php on line 114

Warning: fopen("./home/public_html/upload/files/nafae/index.html", "a") - No such file or directory in /home/coderfor/public_html/upload/upload.php on line 116

the folder /files is chmodded to 777, and

$absolute_path = "./home/public_html/upload/files"; //Absolute path to where files are uploaded
$site_url = "http://coderforums.net/upload/files"; //the url to where files are uploaded

What is wrong with this? does anyone know?

("./home/public_html/upload/files/nafae/index.html",

remove the . in the absoulute path

Slynderdale
04-16-2002, 06:37 PM
also place a index.html in the upload folder so it sends you to the main page or upload.php file like this

<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=../upload/upload.php">
</HEAD>
</HTML>

Slynderdale
04-16-2002, 06:39 PM
also do the same to the file folder so no one can see the contents of it

Slynderdale
04-18-2002, 12:11 AM
ok im getting tired of my web host always being down for some unknown reason, and right when in a middle of testing a hack, im getting a new webhost with a d3 45mps connection, php, mysql and it has iphp, iphp is real cool :)

drives fast
04-18-2002, 02:48 AM
Slynderdale,

great hack. I was wondering since your hack is the beginning of a hack request that I made found here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=37481
if you would be willing to modify your hack to accomplish that?

Slynderdale
04-18-2002, 04:50 AM
Originally posted by drives fast
Slynderdale,

great hack. I was wondering since your hack is the beginning of a hack request that I made found here: https://vborg.vbsupport.ru/showthread.php?s=&threadid=37481
if you would be willing to modify your hack to accomplish that?

yea, i could change the scriptd for you

drives fast
04-18-2002, 03:25 PM
kewl......here is my e-mail address: drives_fast1@hotmail.com

please send me an e-mail when you get the chance.......I would like to talk about this on the phone if that is okay.....I can explain it better that way

life is boost
04-23-2002, 10:56 PM
Is there any way that a user can delete files form their folder?

Slynderdale
04-24-2002, 01:05 AM
Originally posted by life is boost
Is there any way that a user can delete files form their folder?

it will be in the new version

version
05-02-2002, 10:14 AM
progress?

Dark_Wizard
05-12-2002, 09:56 PM
Any progress? Looking forward to 2.0!

ling_thing
05-12-2002, 10:10 PM
iam curious if this has an upload file size limit
i was working on a upload script in php the other day
but unfortunitely it was of no use to me because of the php 2MB upload limit which i cant change :(

was wondering if this is restricted by that limit as well or if it gets by it?

cool hack all the same though

chapt0r
05-24-2002, 11:36 PM
It looks all good, but it is just sitting there when the user attempts to upload a file. I am running on a win2k adv serv platform. I have given the proper permissions to the upload folder also.

Warning: Lost connection to MySQL server during query in c:\program files\apache group\apache\htdocs\forum\authvb.php on line 6

Warning: MySQL Connection Failed: Lost connection to MySQL server during query in c:\program files\apache group\apache\htdocs\forum\authvb.php on line 6

Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\apache group\apache\htdocs\forum\authvb.php on line 7

These are the errors that I recieved.

Any help is appreciated.. by the way awesome hack though, I have been looking for something just like this.

wes

mikeschultz
05-25-2002, 07:00 PM
i keep getting invalid user/pass

Danny
06-04-2002, 09:45 PM
How hard would it be to enable a delete file feature for when they upload too many files and dont have any space left i would like them to delete some files is this possible?

TIA :)

how about a progress report? on v2.0?

Andy R
06-25-2002, 04:30 AM
This looks like a great hack! I look forward to v2 to come out! If you need any help testing, let me know!

Trident
08-27-2002, 07:16 AM
sory for bumb .. but i need the new version !

----------------------------

Hacks Im Working On:
Upload Hack (v 2.0)

----------------------------

we are wait you, Slynderdale :)

eckels2
08-29-2002, 03:25 AM
Bump :)

Same here. I'm definately in need of this hack.

Chris M
08-29-2002, 01:06 PM
Version 1.0 looks very cool...

Version 2.0 should be much better, if Sylnderdale can provide half of what he promises;)

Satan

eckels2
08-29-2002, 06:14 PM
Version 2, is EXACTLY the hack i was looking for when i posted this (https://vborg.vbsupport.ru/showthread.php?s=&threadid=42688).

Now that i've bought a vb, I'm excited to know a hack like this exists... but I'm worried it'll get forgotten about by the author before v2 comes out.

Slynderdale
08-29-2002, 09:58 PM
Originally posted by eckels2
Version 2, is EXACTLY the hack i was looking for when i posted this (https://vborg.vbsupport.ru/showthread.php?s=&threadid=42688).

Now that i've bought a vb, I'm excited to know a hack like this exists... but I'm worried it'll get forgotten about by the author before v2 comes out.

Sorry for the long wait, my webhost was down for over a mon th and ive been busy, currently im working on version 2, its gonna be way more better then the last one, it will support php uploading, maybe mysql uploading (saving the files to mysql) and php uploading (the old way where you need to chmod the folders to 777), file deletion, file and web stats, online file editing (for aeditable files such as text files, html and so on, multiple uploading, multiple folders for members, you can ban certain members and usergroups and admins can have access to every ones folder (or cetain people), admin editable options, maybe having the user have one private folder with .htaccess protection where they can make and delete accounts from, im making two versions, one intergrated with vbulletin and one stand alone for web developers, its gonna be free of course :)

Heres currently the file info you can get:
name
filename
extension
timechanged
timeaccessed
timemodified
size
inode
type
perms
chmodperms
width
height
imagetype
ispicture
isviewable
isfile
isdir
islink
isuploaded
iswriteable
isreadable
isexecutable
filepath
path



Heres a little test version, it shows the info it gets when it reads a directory, its gonna have a better gui when its done and easy to use.

http://slynderdale.darktechgameing.com/test3.php

eckels2
08-29-2002, 10:18 PM
You're my hero. And I really mean that. lol :)

What i'm going to use this for...specifically... is to give every member 5 free mb of webspace to do with what they please, and then perhaps allow them more, if they pay for it.. or something along those lines.

Now, I'm curious. are these user directories going to be made when the user signs up? or when they first try to upload something? or what?

So far, The fact that such a hack exists has exceeded my expectations, so believe me, I'm already excited. :)

Slynderdale
08-29-2002, 10:33 PM
Originally posted by eckels2
You're my hero. And I really mean that. lol :)

What i'm going to use this for...specifically... is to give every member 5 free mb of webspace to do with what they please, and then perhaps allow them more, if they pay for it.. or something along those lines.

Now, I'm curious. are these user directories going to be made when the user signs up? or when they first try to upload something? or what?

So far, The fact that such a hack exists has exceeded my expectations, so believe me, I'm already excited. :)

The vbulletin version will have mysql support, the stand alone version for developers, mysql will be optional, in both versions, ftp will be option, but you can use ftp instead of php uploading and so on so you wont have to chmod the files to 777 and so on, with the vbulletin one, you can set the web space size they can use per user and per user group, so one could have 5 megs and like you said, they could buy addintional space and you could give them more, also i might intergrate a web account and mysql database creator for web developers so they can esily create accounts for people if they own there own server.

The directories are gonna be made when they go to the upload area and sign up for a upload account, i think having it automaticly create them when they sign up will be a easte of space if there not gonna use it, and the vbulletin version will have template support for easy html editing and editing how it looks so you can intergrate it in your website and gonna have a better mysql logging that keeps track of what users do and so on.

Slynderdale
09-02-2002, 08:14 PM
Im working on the upload hack version 2, if you want any thing custom added, please post and tell me what you want and ill see if i can add it into the new version for ou and so on.

eckels2
09-03-2002, 12:12 AM
w1.) user interface where user can upload files or delete files at will
2.) limit on space for each member, with controls to allow more space

that's all that comes to mind right now

eckels2
09-12-2002, 10:47 PM
(Bump)

Sorry, i'm impatient. Just wanna know if theres been any progress.

SemperFidelis
09-25-2002, 12:55 PM
Slynderdale - cant wait for version 2 of your excellent hack
So far it looks like it will totally rock !
:D

Quick question for everyone, have you every had v1.0 of the hack return :
" Unable to execute query "
when either trying to upload or view uploaded files ?
I know for a fact it used to work ok
Im just curious what might have caused this.

LangTuDaTinh
09-27-2002, 06:35 PM
Slynderdale, please release v2....

thanks

eckels2
09-29-2002, 05:58 PM
I immed him.. said he was still workin on it... But I'm beginning to think it's not gonna happen :(

alkatraz
11-17-2002, 02:19 AM
pleeeeease! =)

camikazi2k
11-19-2002, 03:17 AM
is it possible to make same hack but not to involve in detabse and just upload to an ftp u running
so u can save space and give more upload space

Ember
12-18-2002, 01:26 PM
I guess version 2 definatly isnt happening, its been like 4 months... never mind! I guess I will have a go at making my own then.

ScruffyDeluxe
01-20-2003, 12:54 PM
I wanted a bit more control over how the page looks, so I integrated it with vBulletin's AdminCP cascading style sheet.

Here's my upload script (I'm using the Xelation CSS BTW):
http://www.phuck-ign.com/forums/upload.php

Other tweaks include the $bbtitle string (guess where that's used :P ) and the upload 'report' now shows the full path to the uploaded file.
I use this script specifically for Signature pictures, and my members are pleased with it. If anyone is interested in using the modified upload.php, I'll be happy to post it here.

Ember
01-20-2003, 01:53 PM
Hey, looks good, I am interested :) Post it if you would :)

SemperFidelis
01-20-2003, 03:09 PM
Thats rather good ScruffyDeluxe.
It would be great if you would post that here.
:)

ScruffyDeluxe
01-20-2003, 04:18 PM
Added a few more bits here and there.
Let me know if anything looks or acts dodgy :paranoid:

Trident
02-28-2003, 12:46 PM
I need the new version !!

Schorsch
03-01-2003, 07:06 PM
yeah version 2 would be great!! :bunny:

Nickos
04-10-2003, 09:51 AM
:(

Nickos
04-10-2003, 11:18 AM
04-09-02 at 07:41 PM Fazle said this in Post #8 (https://vborg.vbsupport.ru/showthread.php?postid=238998#post238998)
Ok, can I upload to a different server? I am trying to separate attachments and have them uploaded to a server other than the one the forum is hosted on


04-09-02 at 07:57 PM Slynderdale said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=239004#post239004)
....theres already a hack though that uploads attachemnets to the server instead to the mysql database

where can i find this hack?

Opie
04-29-2003, 07:45 PM
Right here:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=35193

ipscone
04-30-2003, 02:16 PM
I'm getting "Couldn't Copy File To Server" error. I have done some troublshooting on this...

1) I have checked the permissions and they are 777.
2) I have verified that the login is checked properly.
3) I have verified that the folder is created, for the user, when a file upload is attempted, in the upload directory.
4) I have verified that the copy path is correct. I put some test code in to see what the script thinks the path is and it returns:
/MyAbsolutePath/ipscone/MyTestFile.gif, which is the correct absolute path.
5) I have even manually copied a file to the upload/member folder and when I try to use the Upload.php program to upload that same file, it correctly sees that it's a duplicate. So that part works ok.
6) I have tried to view that directory with the View Files and even though there is one file that was manually copied, it doesn't display with the View Files.
7) I modified the upload.php file to do some debugging and found something I can't explain. In the case view: section, I modified the following:$dir = opendir("$absolute_path/$PHP_AUTH_USER")
or $list .= "<tr><td>Error: Can't open $absolute_path/$PHP_AUTH_USER</td></tr>";
while($file = readdir($dir)) {{ to see that the absolute path was right and it was. Now, I know there is one file in the directory but the code within the while loop does not execute even once. Since there is one file there (manually placed) it should go through this loop, at least once. Why not?

Can there be an incompatibility with php 4.3.1 that I'm using?

But the file just won't copy. I get "Couldn't Copy File to Server".

Any idea what might be causing this error? opendir adn copy seem to fail.

Is this the only UPLOAD program that produces individual folders for each of the members?

What version is included in the first post in this thread? Is there a newer version somewhere?

ipscone
05-01-2003, 03:26 AM
Ok, I have a clue to the symptoms but no answer to the problem yet.

The opendir() and copy() fail because of the way the directory is created. The script uses the following to create the upload directory if (!is_dir("$absolute_path/$PHP_AUTH_USER")) {
$oldumask = umask(0);
mkdir("$absolute_path/$PHP_AUTH_USER",0777);
umask($oldumask);
if ($indexfile =
fopen("$absolute_path/$PHP_AUTH_USER/index.html", "a")) {
$timenow = time();
$name = strip_tags($PHP_AUTH_USER);
fwrite($indexfile, "");
fclose($indexfile);
}
}With this code, the directory is created but the owner is "apache." When the owner is apache, the opendir() and copy() don't work in the script.

But if I manually create any directory that I plan to use, instead of the program doing it, everything works fine. I can upload and the opendir() and copy() work fine.

How does one change the script to avoid this problem? I believe it is normal for "apache" to be the owner of something created from the script but why doesn't the copy() and opedir() work for a directory that has "apache" as the owner? Any way around this?

ipscone
05-01-2003, 08:30 PM
Now, I'm thinking this inability to use copy() and opendir() has to do with the open_basedir configuration.

The program works perfectly, if I manually create the folder and set the permissions. But if the program creates the directory, I can't open or copy to it.

Anyone know how I can get around this and open and copy files, if this is the case? Or, if this is not the problem what is?

kevinnguyen
05-19-2003, 01:11 AM
man, where's v2? it sounds great
any1 here knows how to add more upload boxes?

LangTuDaTinh
05-19-2003, 01:43 AM
05-01-03 at 02:30 PM ipscone said this in Post #93 (https://vborg.vbsupport.ru/showthread.php?postid=390150#post390150)
Now, I'm thinking this inability to use copy() and opendir() has to do with the open_basedir configuration.

The program works perfectly, if I manually create the folder and set the permissions. But if the program creates the directory, I can't open or copy to it.

Anyone know how I can get around this and open and copy files, if this is the case? Or, if this is not the problem what is?


i think u must go to telnet or SSH and change its chown from apache to that site's user.

corsacrazy
06-20-2003, 07:36 AM
bump once again the creator if ur out there please share version 2 with us

Nebby
06-25-2003, 12:15 PM
:(

ipscone
06-25-2003, 01:10 PM
Here is one I'm working on...

Photo album (http://www.msdsite.com/forums/upload.php)

corsacrazy
06-25-2003, 02:40 PM
looks good is it intergrated in to users database?

Nebby
06-26-2003, 11:39 PM
Can it be edited to work with MP3's?

themonarch
08-26-2003, 10:11 PM
Hey, this worked for me on vBulletin 2.3.2! I can't wait for version 2....uh....too. :)

themonarch
08-26-2003, 10:19 PM
06-27-03 at 01:39 AM Nebby said this in Post #100 (https://vborg.vbsupport.ru/showthread.php?postid=413165#post413165)
Can it be edited to work with MP3's?

Just add .mp3 to the config file, like this..... around line 7


$extensions = array(".gif", ".jpg", ".jpeg", ".mp3", ".ra", ".txt", ".doc", ".swf", ".avi");

luke2kz71
02-13-2004, 09:03 PM
it was working fine.. then all the sudden it keeps telling me my password is wrong :( i know its right :(

PIF
03-07-2004, 06:09 PM
Hi,

I have downloaded and installed Slynderdale's Uploader.

How can I have the two boxes,(upload and view) alongside each other, rather than one in top of the other ?

yavar
04-09-2004, 08:16 PM
Im working on the upload hack version 2, if you want any thing custom added, please post and tell me what you want and ill see if i can add it into the new version for ou and so on.
1.working with ftp accounts no database because increase of database space maybe makes problems!
2.user post limit!!!
for example:user should have 200 posts to have a upload folder
___________-
I`m waiting for ver 2 :nervous:
sorry for my bad english
:speechless:

MeTaL_oRgY
04-10-2004, 04:52 AM
Working wonderful! thnx for this hack!! Exelent for my Fan Art section!!!!

yavar
04-10-2004, 08:16 AM
Dear Slynderdale,
we are waiting for you!

MeTaL_oRgY
04-13-2004, 01:38 AM
Dear Slynderdale, I?m using this hack for my fan-art section:)... it works perfectly, but I qould like some features...
1) Would it be possible that n the index.html file of every fanartist folder appears the Fa?-Artist stats? Oo...
2) How can I change the option so that when the script creates the file automatically it saves itself as .php and not as .html ?

that?s it :) waiting your response :)...

and GREAT HACK!!!

MeTaL_oRgY
04-14-2004, 06:22 PM
BTW, I can upload files and it creates everything but it don´t write on the index.htm file... why?? of course it´s CHMODED..... but it´s not writing on the file :s

yavar
04-16-2004, 11:30 AM
:disappointed: whats up?
:ermm:

scratche
02-12-2005, 02:00 AM
is there anyway you can set the hack up that only certain users.. or a user group only can use the upload.. not all of your users..

Rireal
02-14-2005, 01:17 AM
is there anyway you can set the hack up that only certain users.. or a user group only can use the upload.. not all of your users..
Agreed. Also, could this be updated for vB3?

php4dev
03-17-2005, 08:24 PM
Agreed. Also, could this be updated for vB3?
could this be updated for vB3?

php4dev
03-18-2005, 09:38 AM
could you update it for vB3 ????

:rolleyes:

Marco van Herwaarden
03-18-2005, 10:05 AM
Updated probably not. The differences between vB2 and vB3 are probably too big, and i am not sure if the original coder is still available to do this.

php4dev
03-19-2005, 09:21 AM
Mr. Slynderdale where are you ???

We are needing your help ...