| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Comments:
<0> Eleaf: well, it has to exist in order to be editable <1> Vystrix_Nexoth, it does exist.. <2> hrm, what does my apache have to do with it ? <2> oh, <1> what are you talking about? <2> i see <2> ok <0> and uploaded files will be deleted from the initial temp directory once the script ends <1> There is no temp directory for me... <1> I have it upload to /path/to <0> so you will need to copy it; you can then chmod() it to 0666. <1> no <2> done, hope it works ok now <1> I can't do that <1> Vystrix_Nexoth, I can't be there to chmod it! <3> Eleaf: Have your script do it, duh.
<1> This is a system that needs to run by itsself <1> Viflux, the php uploader script? <0> there's a chmod() function in PHP <0> use that <1> chown as well? <0> aye <3> Eleaf: Your script needs to move the file somewhere and make it accessible in order for it to actually *be* uploaded. <1> it is moved there <1> Viflux, it uploads <4> good grief, I found the problem I had typed "enctyoe" instead of "enctype" <0> then chmod() and chown() it to your liking <4> that was hard to spot <1> I upload the file using the php script, and it's there! <1> It's in the folder I told it to upload, I can edit it, do whatever <0> ^Migs^: brilliant. *chuckles* <3> Eleaf: Then what's the problem? <1> It just needs to have high permissions instead of owned by root <3> Eleaf: So give it the permissions it needs... <0> if you copy it as a non-root user, then it is owned by you. <1> Vystrix_Nexoth, well I need to change that then <0> the copy is, that is <1> ok I'll have it chown in the php file.. <4> I hate feeling stupid, but it's nice to know it wasn't a huge problem <2> hrm <0> ^Migs^: heh, indeed <2> restarted apache, and it still occurs <2> i would like to mention that it sometimes works and sometimes doesnt <2> (each refresh) <5> Vystrix_Nexoth, for some reason the proggie i exec() the file with doesn't get PHP's permissions (it converts the file using OOo). <6> What does the extra XML expat libraries provide that cant be done with a simple fopen and reg expressions/strpos etc? Searched google/php.net without any real analysis of the usefullness of the libraries <7> ido-: that could indicate a network related error <1> If I have $uploadedfile = path to file etc........... <1> I call that variable by using $uploadedfile right? (not just 'uploadedfile') <5> Vystrix_Nexoth, I guess I'll just chmod it and then delete it right after its converted. <7> ido-: although, i'm not aware of any problems caused by apache or php which would cause a local resolve to fail intermittantly <8> Eleaf: yes all variables have $ in front <1> ok <1> so would it be chown($uploadedfile, newowner) ? <1> err user in quotes or no? <0> yes, in quotes, and yeah, that's how you'd do it <3> Eleaf: Why don't you try it? :) <8> Eleaf: http://php.linux.hr/manual/en/function.chmod.php <1> lol <1> I don't want to have it explode <1> rebus_rdk, I read that <3> Eleaf: I don't see any explode() calls ;) <1> that's not chown <8> http://php.linux.hr/manual/en/function.chown.php <0> then change 'chmod' to 'chown' in the URL <8> sorry <1> ;) <1> yea I read that <8> if you don't put it in quoets PHP will think it is definition <1> it doesn't explain if you put the user in quotes though ;p <0> Eleaf: that's a basic part of PHP syntax; it shouldn't have to be explained in every function page <7> Eleaf: http://php.net/tutorial - you obviously have fairly significant gaps in your knowledge of php. You really should start there. <1> ok lol <1> yes I don't do much php. (I use python =p) <9> Elazar, python is Cool :) <7> Eleaf: as a rule, we don't care what languages you normally use. <1> Elazar, lol
<8> but anyway, i am terribly disapointed in PHP and file upload... :( <7> if you expect to get help here, at least learn the basic syntax. <1> yar caffinated <1> let's see if this worked. <10> anyone know of any image library comparison benchmarking done? <11> anyone good with regex's? <7> LinkSlice: yes. <1> yikes <0> how hard is it? move_uploaded_file($_FILES['input_id']['tmp_name'], "$_SERVER[DOCUMENT_ROOT]/uploads/filename.ext"); or something. <1> No such file or directory in /var/www/uploader.php on line 15 <1> I didn't tell it to do anything there. <11> caffinated: ah good, i've been fighting with this for about an hour: http://pastebin.com/629904 <7> Vystrix_Nexoth: and the error is what? <12> Eleaf: on line 15 of that file, its not saying it cant find that file <0> caffinated: none on my end. I'm offering an example for others. <1> oh <1> right ;) <1> Operation not permitted <3> just call it a day <10> is there a php5 imlib module? <1> php doesn't have rights to the uploaded file? <10> i cant find one <1> chmod worked though <7> LinkSlice: ereg doesn't use delimiters on the regex. i would suggest using preg_match <7> Vystrix_Nexoth: oh, ok. my bad. <11> caffinated: in that sample i'm just trying to strip out the "AUB,20060405,,40,,40" part it will be similar in all the rest of the files (thousands of them) <1> I would think php has root privelages.. <5> Vystrix_Nexoth, I chmod(myfile, "777"); but it doesn't actually change the permissions... :/ <8> Eleaf: i don't think so <13> Eleaf php has the permissions that your apache user does <1> root. <1> can I do sudo or something? <1> I can't change the owner. <14> Hey guys, what about ctype_alnum? it does not recognize characters like etc even if my locale es_ES exists... <13> existance Eleaf there is something called the default umask that I believe is set in the php configuration, this is applied to any permissions set through php <15> Eleaf: Now that would be stupid... a web language operting on the net with full rights todo anything. <0> existance: try 0777 instead of "777" (and do you really need the execute bit set? use 0666 otherwise) <13> existance Eleaf you can change it with a function call <14> does anyone know how to make it work with custom locales? <1> FliesLikeABrick, what do you mean? <7> LinkSlice: what i would do is use preg_match('!%%Title: (.*?);!'i, $string, $match); and then explode() the result of the pattern capture by ',' (***uming you need to seperate it out) <11> caffinated: other than that the reg looked ok? <1> Jymmm, well I have to to change the permissions. <14> I did setup my locale, but any way ctype_alnum didn't work with custom chars <13> existance Eleaf give me 2 minutes to find the code on my serve rthat uses it <11> ok *testing* <1> every uploaded file through php has super root privelages. <1> ok FlamingCows <1> ool <1> ok FliesLikeABrick <7> LinkSlice: oops, stick that 'i' inside the quotes (typo) <16> super root hey <1> super duper root <5> Vystrix_Nexoth, ah, didn't catch that first 0. And all i really need is read. I'll figure out the right number to use though. <0> UID infinity <13> existance if you want to set 777 on a file, you need to do umask(0) at the line before you try to change to 777 <13> Eleaf what exactly is it that you're trying to do? <0> existance: for just read permission, 0444 <16> for every file uploaded have root privs <16> you would need to be running the web server as root? <1> FliesLikeABrick, I have a file uploaded using php. I then need that newly uploaded file to be 777 permissive and owned by a certain user. <1> FliesLikeABrick, the chmod works but php doesn't have the privelages to chown. <5> Vystrix_Nexoth, nice! got it to work :D <5> FliesLikeABrick, i didn't need to mess with the umask... <17> hello <0> the first digit (besides the 0, which indicates an octal number) is the owner permissions, the second is the group permissions, the last is the permissions for everyone else. 4 = read; 2 = write; 1 = execute. add those together (e.g. 0644 = owner can read and write, everyone else can only read) <17> nt global users: 26971 Max: 30795 <17> (01:17:27) rAw (250) Highest connection count: 6364 (636 <13> alright existance just talking about the problem that i've run into <0> </crash course in chmod() numeric values> <1> I know Vystrix_Nexoth ............. <1> I know how to use chmod <5> FliesLikeABrick, ah.
Return to
#php or Go to some related
logs:
you need the super privilege debian #debian gentoo USERDIR aszlig php.net xf86OpenConsole: setpgid failed: Operation not permitted knoppix ipw220
#qemu #web pastebin vim colorscheme #debian
|
|