@# 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



Comments:

<0> bumpy? :)
<1> @825B!
<2> stoffus: the manual mentions something about a "max_post_size" ini option. (shrug)
<0> hmm
<1> Here do not speak in russian
<3> stoffus: is it perhaps an execution timeout?
<0> I don't think so, as I myself fail to upload it locally
<0> kennebel, I find no such var in http://cvs.php.net/viewcvs.cgi/*checkout*/php-src/php.ini-dist?rev=1.248
<4> stoffus, i have found to _set_time_out_ in the header of the scripts to 'keep them alive longer' with uploads
<0> AHA
<0> memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
<0> DOH
<0> :)
<2> I was close. :)
<0> hehe, kinda
<1> While!



<5> Isn't there a way to upload _huge_ files using AJAX?
<5> yeah yeah, I'll go and ask in #ajax.. Sorry 'bout that.
<6> i get tis error when i try to install phpbb2 ..
<6> The PHP configuration on your server doesn't support the database type that you chose
<5> what database type did you choose?
<6> mysql 5.x
<7> hi masters
<5> TheBest: And is that installed on that server?
<8> hi
<5> TheBest: If you try a normal mysql_connect, what reply do you get.
<5> Dangermouse: hi.
<5> :)
<8> berry__: You know ajax would still just be an http upload?
<5> Well.. I haven't really worked with ajax yet, but yeah, it would still be a 'normal' http upload.
<5> I guess
<7> if I have an array like this: ["index1 value1" , "index2 value2" , ...] What function should I use to get an array like this: array["index1"]="value1" ...?
<7> do you understand, my friends?
<5> baet: explode on " ".
<7> ok, i wil read the doc about explode :)
<7> thanks
<5> well, gtg. Bye bye.
<8> baet: and foreach
<7> of course, thanks
<6> berry__ is done tnx
<8> baet: $array = array("index1 value1" , "index2 value2"); $new_array = array(); foreach ($array as $value) { list($k, $v) = explode(" ", $value); $new_array[$k] = $v; } print_r($new_array);
<9> I'd like to write a script to let visitors to my site make a google sitemap of their web page. What's the best way to iterate over a URL in php?
<9> recursively
<10> npx: you could try and match all anchor tags. One thing that might happen tho is that you will get into a endless loop...
<11> Hi guys, I have this php script with an sql statement $sql_match = "SELECT teachers.name, teachers.arrival, teachers.location,
<11> recruiter_jobs.school, recruiter_jobs.arrival, recruiter_jobs.city,
<11> teachers.teacher_id, recruiter_jobs.recruiter_jobs_id
<11> FROM teachers, recruiter_jobs
<11> WHERE teachers.arrival BETWEEN recruiter_jobs.arrival -2 AND recruiter_jobs.arrival +2
<11> AND teachers.location=recruiter_jobs.city";
<11> ... this returns an array of only 7 elements. With recruiter_jobs.arrival not being one of them ... what to do ?
<12> babo, ... pastebin
<9> There's not a module already written to do this sort of thing?
<11> eml: sorry
<12> DO NOT paste lines that long..
<8> babo: #mysql
<8> or #sql ..
<13> babo, table prefixes won't appear in the result
<11> colder: but it should still return an array of 8 elements right ?
<13> babo, "what" should return an array ?
<13> What I see here is an ***ignation
<11> colder: the sql return object
<13> babo, All I can see here is that you ***ign $sql_match to a string.
<11> colder: oh wait, I didn't catch that ... it should be a teachers.location == recruiter_jobs.city ... right ?
<13> babo, no the comparison operator in SQL is =
<11> colder: oh yah, ok sorry I'll pastebin it ...
<13> babo, I'm talking about $sql_match = "..."; It just ***igns it to a string. If you want to execute the query and get result, you'll need some more.
<11> colder: well yes, I'm aware of that ... it's just that the statement returns a strange object. I've asked on #mysql and someone told me it must be a php thing ...
<14> Does php have try, catch and "finally"?
<2> Narada: PHP5
<13> babo, _what_ returns a strange object ?
<8> php.net/oop5
<14> kennebel: Does it have finally?
<15> a
<13> Narada, no finally. but yes, try/catch, http://php.net/exceptions
<14> Exactly that's my point.



<14> Why is there no finally?
<13> what is the point of the finally ?
<13> if none of the catch catched the exception ?
<14> Look it up somewhere.
<11> colder: I mean that the return from the database is missing a value ... http://pastebin.com/640000
<13> Narada, I don't really care. So no, there is no finally. But be aware that a catch (Exception $e) { .. } will catch every exceptions.
<16> 640000 \o/
<8> lol
<2> colder: finally is always executed after the catch.
<2> colder: so if you have multiple catch blocks, but you have one chunk of code called at the end of each one, reduces code copying/pasting.
<13> kennebel, ok, thanks for the hint.but you can still put it after the last catch()
<0> kennebel, actually, you were right about the post_max_size, it was set to 8MB. changing the memory_usage didn't affect the upload
<17> (Exception $e) { fakeFinally( $e ) }
<18> :D
<2> stoffus: Yay! (i helped!) :)
<17> fakeFinally( $e ) { doSomeStuff }
<0> kennebel, hehe
<2> stoffus: I enjoy helping, and so rarely interact with real programmers.
<0> kennebel, well, you did good this time ;D
<2> colder: i think that finally is called even if a catch interrupts normal execution, and thus, not continuuing the code after the last catch, though i might be wrong on that.
<19> is the require() function expensive?
<2> nsanity: it is critical. :) (haven't wrote a script more than 20 lines without it yet)
<13> kennebel, the code continues after the last catch, but the point is that the code after the last catch is executed even if no exceptions were thrown.
<20> With soem dynamic sites, they seem to use a dynamic directory structure
<20> so a site might be www.blah.com/products/tools/10-15quid/
<20> is that easy to do?
<20> where 10-15quid could well be your search parameters
<20> (as in the users)
<19> doobeh: it's not too hard
<20> would you have an idea where I could look to find out about it
<20> not sure for the term, so hard to search :)
<19> doobeh: mod_rewrite
<20> you've made my day, cheers nsanity :)
<2> colder: but what if the catch rethrows out of norml code flow? Meaning one of the catches determines that another level up has to handle the exception.
<21> Anyone who know a neat way to represent a year in weeks ?
<2> colder: and you want a db connection closed before the next level up handles the exception. :)
<2> EddieX: 52? :P
<21> kennebel, Indeed :) But given a week, get the first day of that week.
<22> EddieX: how do you mean represent? you want the number of the week?
<2> EddieX: Ahh, that is an easier to understand question. :)
<23> EddieX- I believe strtotime can do that
<21> kennebel, Sorry, my english is not that good.
<2> EddieX: no problem. :)
<21> Dragnslcr, Will check that now.
<23> echo date('Y-m-d', strtotime('last sunday'));
<23> Something like that, probably
<13> well, then its another story. but if a catch throws an exception, the finally would even be called for the sub-level ?
<21> Dragnslcr, Well that was a very nice solution :) I have been workin with some mathematical stuff here ;)
<13> that doesn't make much sense
<21> Well i will try this later on today, time to hit the gym :)
<21> Thanks again for quick response!
<17> TML: you there?
<24> hey, anyone know of an apache/php module that lets you modify the logfile output so i can add extra fields to it (set from php) ?
<25> lovely....this Flash doesn't p*** a referrer value
<26> Does anyone know how to output text from a database: e.g. echo $row['text'
<26> but
<26> also have it with spaces like it does in the field
<26> would it be addslashes() ?
<26> You see, the text was added using a textarea box. Some of the paragraphs have spaces between them, but I would like to output these too.
<27> "have it with spaces like it does in the field" ?
<26> well the form field on the input form, say you put some text in there, and it has spaces betwee the paragraphs.
<26> When it is inserted I would like it to be redisplayed with these same spaces.
<27> http://us2.php.net/manual/en/function.nl2br.php
<26> ahh, that's what I need
<26> I knew there was a function like that. Thanks
<27> :)
<26> thank you lostage !
<12> can i install php-gtk through pear somehow?
<28> does using cl*** { } slow down the execution or take up more resources, memory etc ?
<2> Questutis: Generally you use cl*** to make code reuse easier. Yes it slows things down a few clock cycles, but is supposed to have long term benefits.
<2> "investment in the future" (if done correctly of course)
<29> what's more important, CPU cycles or developer cyclces?
<25> motorcycles


Name:

Comments:

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






Return to #php
or
Go to some related logs:

+mysql_fetch_field Zero Sized Reply
installing xman on ubuntu
prototype effect.toggle speed
linux Import WSX
fedoracore6 resume
#perl
xgl on intel915
pinoyunderground font
#fluxbox
alsa unable to open slave mcop



Home  |  disclaimer  |  contact  |  submit quotes