@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
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> apparently the error is on line 36
<1> http://us3.php.net/error_reporting
<1> error_reporting(E_ALL); at the top of your script for now
<1> later all
<2> can cl*** constants be reserved words?
<3> Jonnay, don't think so.
<3> Jonnay, anyway, wy do this? create some other name... put a prefix or sufix
<4> Jonnay: Even if they could, that seems like a good way to confuse people.
<2> Doh. Good point guys..
<5> hi, in phpMyAdmin it says that I can import (Max: 51,200KB) , why am I limited?
<6> beammer: um... 51M is not enough for you?
<5> Stormchaser, I need to upload 55MB
<5> How do I do that!
<7> beammer: That's really a question for #phpmyadmin
<8> hwo do i destroy an object?
<8> beammer: use the cli util ?



<7> myconid: unset()
<9> beammer: Uploading more then 5 megs via PMA is a *bad* idea.
<5> Stormchaser, then from Where should I restore my db backup to the db ??
<9> beammer: cli
<10> uploading sql script via PMA is a bad idea et al
<10> Stormchaser ! :D
<7> PMA?
<5> Stormchaser, from where do I get cli ?
<9> xshad: !
<10> i missed you :)
<9> TML: PHP My Admin
<7> You can upload using nothing more than a positive mental attitude?
<9> TML: hehehe :)
<5> Stormchaser, from where do I get cli ?
<9> xshad: Where the heck have you been?
<9> !+cli
<11> [CLI] Command Line Interface
<10> beammer compile php with --enable-cli
<10> Stormchaser europe :)
<9> xshad: hehe :)
<10> I'm back home at least
<12> any of you like the 8 queens chess puzzle?
<9> beammer: Use mysqlclient for that, and not a PHP interface.
<10> ****.,.. backing again to my weird life hohoho
<5> am not familiar with such.
<8> beamer: type 'mysql' at a command line
<8> and use that to import data
<5> Stormchaser , yesterday I made a backup through "export" from PMA , and today I wish to restore it back.
<8> beammer: which part of 'you cant' is confusing?
<10> use mysql stuff
<5> I access it through Cpanel
<9> myconid: Well... You can, but you'll probably flood off your computer away...
<7> beebop: Other than the fact that I solved it almost 30 years ago, sure.
<8> login via ssh, and run 'mysql'
<8> cpanel makes me want to hurt people.
<12> tml: yea its pretty easy once you get it 1st time. im only 20 so 30 years ago i wasnt doing much problem solving
<13> Is there a way to upload large files (about 50MB) via HTTP without requiring the httpd process to allocate so much memory?
<14> cpanel is great for lazy people who just want **** done.. and don't care to read.
<8> ahz: of coruse
<7> myconid: Do tell
<10> ahz yes, see max_upload_size directive
<8> ahz: the http spec doesnt say how you implement it software wise..
<8> TML: instead of caching the input in your process, write it to a file directly
<10> and max_execution_time also
<8> TML: If you are using apache, i have no idea.
<8> if you write your own.. just dont cache the entire post in memory
<10> Stormchaser and about you? all fine I hope :^
<13> myconid: maybe you mean upload_max_filesize ?
<9> xshad: mhm... Busy :)
<4> The better solution, of course, is to not use form-based file uploads. :P
<10> Stormchaser wow! this is a great new hohoho
<15> I have 3 variable in an object o->v1, o->v2 and o->v3 I want to loop trough all the three variables like this t->'a'.$i;
<15> I know the above is not possible like that.. but how can I do that?
<7> myconid: I don't think you could do that safely, given that an HTTP upload doesn't neccesarily contain only one file.
<9> xshad: yeah, right :)
<7> myconid: You need to store it in memory so that the server process can read the various MIME headers that come in
<7> Or might come in
<8> TML: you could very easily write the post to the disk... and read it afterwards.
<8> or parse it in memory.. and when a file comes in, write only that to disk
<7> myconid: Still, at some point, a process is almost certainly going to have to keep the entire file in memory.
<8> absolutely not



<10> Killaz you can loop like foreach ($obj as $vars)
<7> myconid: How do you "parse it in memory" if you don't *store* it in memory?
<10> with public vars of course
<7> Are you using the magic access_memory_I_havent_mapped()?
<10> lol
<8> TML: Ive done it before in Perl.. its not hard
<7> myconid: If you know a way to access things in memory that aren't currently *stored* in memory, there's an entire generation of programmers waiting to hear from you.
<7> Several of them, in fact.
<8> TML: there is this neat thing..
<8> called virtual memory
<8> that is a great example of using memory that isnt stored in memory.. jsut FYI
<7> myconid: Something stored in virtual memory is still stored in memory
<13> Does anyone have an example of using PHP to accept large file uploads without increasing upload_max_filesize or memory requirements?
<8> TML: sure.. until it is swapped to disk.
<8> ahz: thats the only way (upload_max_filesize)
<15> xshad: what do you mean exactly? I have more variables in the object but I only want to output the variables that starts with for example 'v' and ends with a number
<7> myconid: I didn't say RAM, I said memory.
<8> TML: I wrote an app designed to take quickbook file uploads via HTTP POST in Perl.
<8> TML: the files were dumped directly to disk
<7> virtual memory is part of memory.
<9> myconid: Um... That fits under 'memory'
<10> Killaz foreach ($obj as $var => $value) { if (preg_match("/v*[0-9]
<10> Killaz foreach ($obj as $var => $value) { if (preg_match("/v*[0-9]/", $var) { /* do the magic */ }
<8> The thing I love mos tabout this channel is peoples nitpicking on mundain details
<10> sory
<13> Hmm... Ok. How about just an example for uploading with increasing memory requirements?
<16> ooh! In the topic, it mentions PHP 6.0.0-dev, where could I get the source for that?
<9> CVS
<7> myconid: And what happened if someone sent a multi-part submission that contained multiple files? How did you handle that without keeping everything in some part of the memory, either "Virtual" or "Physical"?
<4> CVS?
<15> xshad: hmm interesting... lemme check it out
<10> liat_ cvs.php.net
<16> thanks
<8> TML: you look for the multipart headers
<10> Killaz are you using php5 ?
<8> TML: and split on those
<7> myconid: How do you split on something you don't have yet?
<8> TML: you dont.. so you wait for it
<8> silly
<15> no
<7> myconid: ...
<9> o.O
<10> damn
<7> myconid: Which requries keeping it *in memory*
<8> TML: you get a standard post.. when you get the header for the file that is uploading.. you drop that to the disk.. when you get the end, or next header.. you drop that next part to the disk
<7> Again, unless you've discovered some entirely new branch of Computer Science
<8> TML: its pretty simple.. im not sure what your havinga problem understanding honestly.
<8> go look at the http post with a multipart form including files
<10> lol
<8> its easy enough to detect when a file is being sent, and drop the uploaded stream AFTEr the seperator to a disk until you get to the end of it.
<8> And since you cache say 4k at a ttime.. you can watch the input before you save it
<7> myconid: I've seen the HTTP POST with a multipart form including multiple files, and I know very well that you can't safely tell if you have multiple files or not until you've hit the end of the stream.
<8> TML: sure you can.. one sec
<17> he all... I just encountered a strange behavior in php. As a test, I'm writing a script that sends dynamically generated post values through http headers via socket functions. One of these post values is an array field such as myarray[$i] believe it or not, when I use a string variable, everything works fine but fails when I use the array... anyone have a clue about that?
<7> It is fully within the spec of MIME to send the seperator at the end of content
<15> xshad and then I can go further using the $value right?
<17> (I know that it's possible to do such a thing using curl... but for now I don't feel like re-writing my script)
<17> to get a better idea of what I'm trying to do: http://pastebin.sekati.com/?id=POSTheaders@aba77-266eb1a7-t
<18> strav: post can only accect plain text. one option is to serialize() the array and unserialize() it on the other side
<17> ha! of course...
<4> strav: Are you encoding the post data?
<8> TML: .. upload two files and look at the headers.. the content-type shows the boundaries
<8> its then trivial to find them
<8> and detect them
<17> I tried to force string type (set type) but it didn't worked.. serialized would shurely do the job
<7> myconid: You can specify boundaries at the END of the stream.
<8> yes.. but they also come between files
<8> ---- boundary \n file file file -- boundary \n file file file --boundary
<7> myconid: If you ***ume that anything that LOOKS like a boundary *IS* a boundary, you can't upload, say, a MIME email.
<8> TML: Yes.. actually.. you can.
<7> Because you'll break up the email, instead of storing it as a solid file.
<8> you use a different unique id in the mime break


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

javascript ascii2hex function
ubuntu returns to failed login screen
#css
wacom EE ps/2 mouse ubuntu
rpm officejet pro k550 Fc4
#debian
#lisp
xvidcap: error while loading shared libraries: libpng.so.2:
#ubuntu
equery files empty



Home  |  disclaimer  |  contact  |  submit quotes