@# 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> !tell ammy about typing engliish
<1> Stormchaser , you are the men
<0> !tell ammy about typing english
<1> Stormchaser , u are da master
<2> DogWater: well yeah; there are i'm trying to figure out how to trim an array; but at the same time there is a newline on the other one too.
<1> u are the super super Stormchaser
<2> lol im talking to myself now schapht_
<3> ||cw : what is call_user_func
<1> :D
<4> does php have encoding problems on there own site? a page like this http://www.php.net/curl is full of
<0> !tell bet0xito about u
<2> schapht_: that was for you
<1> you*
<1> ;)
<5> I gotcha
<6> anyone? :P



<1> YOU are the men ;)
<0> I'm plural?
<7> hi hi
<0> ouch.
<2> Stop eating all those fatty foods.
<2> :D
<5> DogWater: you can use array_walk to trim everything, I think
<0> DogWater: NAh... It must have been other personalities :)
<5> just for kicks, call strlen($arry[5])
<5> I bet it'll be 3
<4> where do the come from (on the site they are question marks...)
<5> I wish I could be plural
<0> ries: From the encoding, that cannot be read properly
<7> ries, it could be a stray character
<6> and so I repeat... the code is here: http://pastebin.com/537347 .. it makes the page stop loading if $showDupes is set to true. anyone has any ideas? :)
<2> schapht_: its 3
<5> Scarlight: and I repeat, I already told you!
<6> where? :/
<5> scroll up!
<6> I set error_reporting on
<7> i got a buncha php scripts whats a good site to submit them to?
<2> schapht_ \n wins again; but array_walk only works on user functions if im not mistaken
<6> nothing shows up
<5> Scarlight: then you probably don't have the error level set to E_ALL
<5> DogWater: I'd bet it'll work on trim just fine. But I can't say for sure
<6> I do
<6> :)
<0> lch: Um... FYI: If you have a module built-in, you don't need to add extension in php.ini
<6> now I see the URL you gave me
<5> well, either way, you're calling a function that doesn't exist
<5> cause you're calling a variable
<5> that isn't defined
<2> schapht_: I did array_walk($arry, trim); and strlen is still 3
<6> such a stupid typo
<2> poopis
<6> thanks a lot schapht_
<5> Scarlight: and for the record
<5> you error reporting is still probably off
<5> you might setting the ini wrong
<0> Scarlight: Um... Does your PHP supports MySQL?
<2> anyone know a fool proof (me) way to trim an array?
<8> Stormchaser, there is no extension added in the php.ini, but the php5 cli throws the error when executing
<5> DogWater: foreach?
<6> Stormchaser, yeah
<8> and because of this I can't use the mediawiki 1.5 updater
<9> good day, everybody. :-) I'm trying to get started using PHPUnit2, but encountering non-descriptive errors in the process... does anyone around have PHPUnit2 experience?
<5> ...honesly sometimes I feel like I'm talking to the wall...
<8> DogWater, trim in what regard?
<0> lch: You're viewing the wrong php.ini
<8> I have three of them
<10> I'm trying to find a way to basically word wrap a few values out of the database on a pdf -- and I'm making one variable and putting them all in there but I just want to put a line break before I pull another value from a column in that same row
<0> then check th3em all
<2> schapht_ something like foreach ($arry as $line) { $line = trim($line); $arry2[] = $line; } ?
<8> schapht_, you don't include my nick, I don't read non-highlighted text usually
<5> lch: I wasn't talking to you
<8> DogWater, you mean array_walk ?
<11> he all, I just wrote a little login/p*** system... and I wonder if it's secure enough. Once a user has entered a valid user/p***word, the script creates a random session id, update mysql user temp_id with the randomly generated session id (for later validation). Then, once the user is logged, another script retrieve it's session id (hence it's mysql temp_id) to get the user unique ident in order to fetch it's specific infos in some other tables... I feel
<11> rather unshure about this way of doing. If someone can point out security leaks, that'll be much appreciated.
<2> lch: array_walk("$arry", 'trim'); doesnt appear to work
<2> with or without the '



<5> nevermind, I'll be shutting up now
<0> DogWater: 'trim' in what matter?
<2> Stormchaser: remove newlines spaces before and after the values in the array
<9> strav: maybe add the IP of the client on login?
<12> i want to remove all characters from a string which are not a-z||A-Z ... any hints?
<5> xirjs: preg_replace
<2> preg_replace
<0> the array_walk/arrray_map should do the tric, then
<12> whats the regex for this problem?
<0> *trick
<2> Stormchaser: something like this doesnt work though? array_walk("$arry", 'trim');
<13> hey
<0> xirjs: www.regular-expressions.info
<13> anyone ever make a css generator in php?
<8> DogWater, maybe you have to write a wrapper callback function to trim
<5> Stormchaser: I think it doesn't work because trim() returns the new string, it doens't modify the parameter
<0> DogWater: Why the need for array bing p***ed in quotes?
<2> Stormchaser: was just using the example
<8> not the array, the callback function
<2> in the docs
<8> you don't put the array in quotes
<2> figured it would work; if i followed along with the instructions
<8> that was just for their print output
<2> oh and sorry I was psuedo coding in irc but the actual command I listed is array_walk($arry, trim); which is pretty much identical to whats in the documentation
<2> I had thought I coded it with "" but i didnt and they arent in the docs.
<14> "$array" gives you 'Array' (a string), y'know.
<4> Stormchaser: MGG: shouldn't php.net not set an appropriate encoding? so my browser knows it's UTF-8 , latin1 or anything else?
<2> mattmcc: yeah; im not using that however
<2> mattmcc: i used array_walk($arry, trim);
<5> ries: HTML spec says you need an encoding
<11> yanni: I already log the ip of the client if he made any unsucessfull attemps to log on and then ban this ip for a specific amount of time if attemps exceed a determined number... you suggest that I add the ip to the mysql log table and use it to double check the authenticity of session's id?
<8> you have to put the function name in quotes, without quotes it gets put into quotes by php itself (***uming a const value)
<2> i tried it both ways with no effect but i'll put the quotes back
<5> DogWater: I think it doesn't work because trim() returns the new string, it doens't modify the parameter
<15> sup all
<8> and as stated before, you have to write a wrapper function that uses "trim"
<0> ries: I have no intent to guess what MGG stands for...
<8> for the callback function
<5> DogWater: look at the note on array_walk about the first paramter being p*** by reference
<15> how can i "clean" a variable? ie trash it?
<5> DogWater: what lch said
<5> samuel: unset
<15> schapht_: thanks!
<5> mattmcc: I often take out the trash when I clean....
<15> mattmcc: to clean i just throw it all in the trash
<16> does php or pear have a good units conversion cl***?
<16> like mi to km and C to f?
<15> then its clean, without the fuss of actually sorting things
<0> hm... Maybe nuke() or destroy() or maybe even trashcan() should be synonims for unset() :)
<4> Stormchaser: that was an other user tha responded to me... sorry about that
<5> insites: google?
<14> Have you looked?
<16> i have found a couple but i would like to use something simple..
<16> basically im asking if anyone uses one they recommend
<0> ries: So you're not asking for yourself?
<11> yanni: I'll follow your suggestion... thanks.
<14> ries: Er, Content-Type: text/html;charset=ISO-8859-1
<8> Stormchaser, is there something I should change about http://pastebin.com/537417 ?
<17> how would you read on byte from a hexadecimal string?
<8> what is a hexadecimal string?
<18> \xff
<0> lch: in ALL of the ini's you have iconv enabled as extension... Why?
<2> schapht_: wow there was already a user function on the trim docs that does exactly what I needed; now I have absolutely no idea why the first time it finds that string is in arry => 15 when it also appears in 5 and 11
<0> (read iconv.ini, not php.ini)
<8> dunno, it's the default... and yes, not in php.ini but in iconv.ini
<8> apache seems content with that, however
<5> DogWater: just make sure your chcking for \n. It might be finding 15 cause 15 is trimmed but 5 and 11 arent
<5> actually, make sure you're keeping any non-printable parameter in mind
<2> schapht_: there isnt a newline in between the values when i print_r anymore
<5> s/parameter/character
<5> there's a typo...


Name:

Comments:

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






Return to #php
or
Go to some related logs:

ubuntu xutils apt-get upgrade
#web
zoneedit sendmail
ubuntu Not updating initrd symbolic links since we are being updated/reinstalled
FCKeditor onpaste
suse 10 play dvd
#css
#python
xorg 7.0 and xdefaults
gdm Error reinitilizing server



Home  |  disclaimer  |  contact  |  submit quotes