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



Comments:

<0> They're not exact numbers.
<1> is there some sort of strict settings i can use?
<0> Sure, start by ripping out the x86 instruction set.
<2> So how would you make that for loop work?
<3> PHP Fatal error: Nesting level too deep - recursive dependency? in /home/numist/code/misc/plot-timeline/memtest.php on line 10
<3> winner!
<2> how deep was the nesting?
<4> how many levels deep
<1> something about the number 1 actaully being 0.9999999999999?
<2> could you use round($epsilon)<=1
<2> erm nope
<5> Squillis: floating point and binary tend not to get along too well.
<2> Squillis: http://us2.php.net/manual/en/language.types.float.php in the box
<5> Squillis: why not use an integer index, and divide by 100 inside the loop?
<1> i should know more about this. i'm running numerical models
<1> :P



<3> hrm, I've managed to make php segfault
<3> rawk
<1> just tried it in C with the same result
<1> fun
<5> Squillis: the fault lies in the binary representation of a floating point number, which is always an approximation.
<5> well, almost always
<3> archivist: infinite levels deep
<4> cant be infinite
<3> try me
<3> its infinite
<3> hold on while I get a pastebin up
<6> hmmm, i'm reading over: language.oop5.basic.html (in the docs) and I have a question about example: Example 19-1. $this variable in object-oriented language, why doesn't cl*** "B" extend cl*** "A"?
<4> put a counter and see the number at the segfault
<5> archivist: function infinite_nesting() { infinite_nesting(); }
<4> hehe
<1> so, can i use integer indices and do the math inside the loop?
<6> cl*** B { A::foo;.... } // this is supposed to just work, how does it know about that cl*** if it doesn't extend it?
<7> hi channel
<3> archivist: I'm using count(), cant put a counter in there
<3> count() is what segfaults
<0> mick_work: It's calling the cl*** method statically, and as such, there is no variable '$this' in that context.
<5> Squillis: that seems like the best way to me. floats make lousy indexes.
<3> mattmcc | archivist : http://pastebin.com/726983
<3> mattmcc: that's not expected behaviour...
<0> numist: Why not? You've created a recursion loop.
<3> mattmcc: count() should return a value that is_infinite() recognizes
<3> I understand why the if fails... but I kinda expected count() to be more robust
<0> numist: It's not. :)
<0> From the manual page, "count() does not detect infinite recursion."
<3> what does then?
<3> it would be nice to programatically detect this instead of hardcoding out the recursive part of the array
<3> I know that infinite recursion is a turing-undecidable problem... but..
<3> :/
<8> hello
<9> this may sound insane, but I'm attempting to run imagemagick's import command from shell_exec to grab a screenshot from a running X session which has been `xhost +`'ed
<3> mattmcc: is there a way to programatically detect infinite recursion in a variable?
<8> how does one get the country code from the browser?
<9> and all I get is weird errors about sockets
<3> Almindor: it should be in $_SERVER
<3> Klowner: I imagine you'd be better off asking in a linux channel, say that you are running import as another user and you want it to get a shot of x, etc
<10> Almindor: if you're lucky it will be in the http accept languages, most common is to look up from the ip address though
<3> er, language code is in $_SERVER
<9> numist: right, but that part works, I can change my user to www-data and run the same import command, and it works, which is why I'm puzzled, does shell_exec have some sort of added protection? or something
<3> when you change user, what are you doing
<3> Klowner: ^^
<9> su www-data
<3> try su - www-data
<10> numist: you could keep a count of the recursion level and stop after a certain level
<3> su saves your environment
<9> ahhh right
<9> good thinking, trying that
<11> hello
<11> is IRCG extension shareware or .. ?
<3> probably gpl
<3> damn viral licenses
<3> or lgpl
<10> ircg is commercial crap, iirc
<3> oh right, not the php ircg, but the third party one
<3> dunno, it doesnt really matter
<8> something like this right? <?php echo $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?>
<3> Almindor: dunno, var_dumo($_SERVER) and see what looks right



<3> gotta run
<11> huh
<11> and what is the license ?
<11> when i try ircg's function i get PHP Fatal error: Exceeded IRCG connection limit.
<10> Almindor: yeah, but a) you're not ***ured to get the country from that, eg. brits might have EN_US. b) that usually gives you a weighted list to deal with
<8> arpad, it doesn't give anything at all here :(
<10> well it depends on what the browser sends
<8> hmm
<8> aha
<8> crappy browser :(
<8> opera sends ok
<12> Hi all
<9> numist: I tried it with su - www-data and it worked in the command line but still not from php, very weird
<12> I have some wired problem. I'm running PHP 5.1.4 & MySQL 5.0
<12> + Apache 2.2.2
<13> TheDarkSide: that's because the trial version of ircg only allows 10 concurrent connections
<14> What is a good way to cache pages containing mysql results every time a website is updated (or more information is added to the database)
<11> caffinated i see.. thanks
<12> I have added a compiled version of php5apach2.dll file to support the php 5.1.4 under apache2.2.2, BUT!! Apache isn't recognize any MySQL command.
<12> Tough via the php it self - When I'm running the php.exe file from my cmd window & insert in it the php code, the code working fine.
<13> TheDarkSide: you likely do not need it anyway. there are lots of ways to do what it does.
<15> [Yoni]: well you mean php doesn't recog mysql?
<12> No, php does recognize mysql.
<11> caffinated would you recomment me any other resolve ?
<12> but from the CMD \ console.
<13> TheDarkSide: depends on what it is that you are trying to do
<15> different php.inis? php directory not in PATH?
<12> not from Apache, from apache it givin' me the usual error msg: Fatal error: Call to undefined function mysql_connect() in .....
<12> php is in the path.
<12> EXT folder is set OK.
<15> well thats php giving the error message anyways
<11> caffinated it's about sockets .. i want to connect to irc servers through php app
<12> So why in the console, when i'm running the php engine without he apache, the code working fine & giving me results that exists inside the MySQL DB.
<12> ?
<15> so compare php -i in console and phpinfo() over http
<13> TheDarkSide: so use any one of the billion IRC cl***es out there. or write your own. The IRC protocol is not complicated.
<11> caffinated what cl***es ? what to search in google :)
<13> TheDarkSide: 'php irc cl***' or something like that.
<11> thanks
<16> is there a function reverse of htmlentities? which converts "&aacute;rbol" to "rbol" ?
<16> (in current locale settings)
<13> http://php.net/html_entity_decode
<16> thanks
<12> lol, Thanks Bazzi, I guess I kinda found the problem..
<17> Hi there..
<17> how can I give get-arguments to the script when I start a locally start a script.. (like php -f /var/www/test.php)
<9> perhaps php doesn't do regular sockets by default? eeeh
<9> but mine has it enabled, gah
<17> well id you mean me, Klowner, how to do that? ^^
<9> no sorry, I was rambling about my own obscure problem
<17> oh, okay ;)
<17> I was unshure about that.. *g*
<18> what's going on?
<18> oops. wrong window
<19> Hi. I have a situation where I'm not quite sure how to do. Say a client requests content that requires authentication to view/access. When this is done it redirects to the login page. After the client logs in it should direct back to the initial page the client requested. But it's not, how could I do this?
<20> TheWarden: header("Location: <url>");
<19> prophile: right that's what I thought however, how do I get the previous URL in the header() ?
<20> $_SERVER['HTTP_REFERER'];
<21> im having a few issues. Ive got a page(index) with a <div> which includes a page called guide1.php. Im using a form in guide1.php to submit variables, should i submit them back to the index page, or the guide1 page?
<22> TheWarden, you can use $_SERVER or you can put the previous url into $_SESSION.
<19> prophile: true but that contains nothing when I check it.
<20> Do as jonez says
<20> put the prevoius url in $_SESSION
<19> jonez: mm previous... yeah I was thinking of htat... mmm I'll have to try that..
<19> prophile: okay.... let me try.
<22> remember the call to session_start
<19> oh session_start() is always started on each page... at the top.
<19> I wrote my own session handling cl***.
<23> about god damn time my host upgraded to php5
<19> geez they took long enough :)
<23> jesus christ if only they had done this a month ago... i built an entire app using php4's dom xml when i could've been using something better
<24> Is it possible to have PHP detect wget and automaticly send file to download instead of web page? For example viewing download.php shows web site but wget download.php will download .tar file?
<25> Penguin, check the user agent?
<19> and use header()


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#linux
ubuntu vpc mouse not working
** magic pylint
#css
#css
#gentoo
#gimp
#linuxhelp
ubuntu Zsh install as default shell
#oe



Home  |  disclaimer  |  contact  |  submit quotes