| |
| |
| |
|
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 31 32 33
Comments:
<0> i am trying to do the same thing <0> convert 2.5 into 2mintes and 30seconds <0> what did you come up with? <1> you'll have to separate the 2 from the .5 somehow <0> hehe <2> Oh, you don't just want seconds? <0> split maybe? <0> split("." <1> then multiply 2*60, and add .5*60 <0> convert it into string <3> explode(".", $string); <1> you'll have the number of seconds then, i guess <0> NBrepresent and then explode it <0> cool <4> depending on the locale the number could be 2,5 instead of 2.5 <4> a1fa: $decimal = $number - floor($number);
<2> NBrepresent: PM. <4> a1fa: $sec = $decimal * 60; <4> a1fa: $min = floor($number); <1> terribleCabbage: did you get it? <5> how can you prevent sessions from timing out? <4> vhuren: you can increase the timeout options in your php.ini <4> vhuren: but you do want to timeout them sometime... <6> Compiling 5.1 on a p200 is a BAD idea... >_< <7> :) <1> p200 = pentium II? <5> nothere: there are timing out sometimes really early <2> NBrepresent: Nope. <6> Pentium 1, 200Mhz <4> vhuren: yes, depending on your application the timeouts could be really small <8> that's about the power of my PDA <5> nothere: ok so how do I make it longer? <9> is pconnect bad to use for mysql? <6> Nice. Do you compile PHP on it? <6> ;) <0> cool <0> NotHere : thanks <1> terribleCabbage: did you get that? <1> anyone using chatzilla? how do you open a private chat? <9> /msg username <4> vhuren: look at the session section in your php.ini. You definetely want to tweak session.gc_maxlifetime and probably others... <9> /msg username <message> but you need to msg nickserv to identify first <2> It's working, you just haven't sent anything. :P <5> nothere: ok thanx bro :) <1> do i have to type that every time i want to say something? <9> no.. a new window/tab should appear <9> but you need to register with nickserv before you nca msg someone <0> anyway to have numbers in int as "00" <0> "01", "02", "99"... <0> i want two numbers.. not just "1".. i want "01" <9> a1fa: sprintf <10> NBrepresent: chatzilla also has a /help <11> Mordof, turns out removing php 5.0.4 and installing the same version again solved it :( <11> makes no sense, since i didnt touch the config files <9> $string_with_two_digits = sprintf("%01f", $number); maybe? <12> I'm seeing a sablotron warning in my logs: PHP Warning: Sablotron error on line none: cannot open file 'foo.xsl' ... <12> the error message gives the full path to the file, the path is correct and permissions appear to be correct <12> what else might cause this warning? <0> thanks <1> a1lfa: use str_pad <10> He talking about chatzilla: How do you make do's "curcive mesages" ? <1> str_pad($mins, 2, "0", STR_PAD_LEFT) <13> sprintf is better than strpad for fixed length numbers. <12> nm, it was permissions problem on the stylesheet's containing directory <14> What is the proper way to remove an element from an array? Say I have Array([0]=>'This' [1]=>'That' [2]=>'And the other'). If I want to remove the second element, is it best just to unset? <9> somePriest: yes <13> Yes. <15> howdy! quickie question. I've seen '@' in some phpscripts, like @mysql_connect(... <15> whats that for? <9> supress error messages. <9> so you can handle them yourself. <9> if (!($sqlhandle = @connecttodatabase())) die ('This is my database handler when we cant connect'); <9> dont use it unless YOU are checking for errors. <16> hi dudes, http://web0.vps1523.mb9.de/cl***_basic.php tells me that php5 is installed but http://web0.vps1523.mb9.de/phpinfo.php only shows me php4 what can i do to have php5 displayed on the phpinfo.php ? hi DrBacchus :> <9> first URL is empty. <17> can i have an desctructor in a php cl***? <9> in PHP4, not automatic
<9> php5 has _destruct() <17> ok <18> should i use unset or unregister to remove a var from a session? <19> is there are maximum length for a session ID? <19> or more specifically, if you were going to store a SID in a db, what column type would you prefer? <20> hmm im getting some strange results with an array im building in a function <9> Anyone use any frameworks (symphony, etc) <20> i have $holidays[][][] = array(); $holidays[1][1][0]['title']='new year's eve'; so on with structure as $holidays[month][day][index] <20> but I cant seem to traverse the array via $holidays[0], $holidays[1], etc.. <21> hi <20> print_r() is showing it as array ( array ( 1 ... ) ) array ( array (2 ... ) ) <22> hello <3> m-00kie: make a holidays cl*** <9> why reinvent the wheel? <9> http://pear.php.net/package/Date_Holidays <22> hello, i have mysql database, how to make the output to website sort by alphabetical. Any tutorial web for it? <9> whats your code look like now? <8> amoy: You need an "order by" clause in your SQL. <23> myconid, if you dont reinvent the wheel, things never get better <19> amoy: ORDER BY (field_name) ASC <8> amoy: Check out #mysql <9> Mordof: m-00kie: is using a crazy ***ociative array.. i dont think he/she is inventing a round wheel. <22> ermm ok <22> thanks <23> lol, k <24> guys, is it possible to have a function that displays the time taken to load a page (like in Google when it says the query took about 0.00002 secs)? <23> yeah php has a function for that already i think.. doesnt it? <13> microtime() at start and end. <25> i'm looking an xml cl*** like xml serialize but without using PEAR, any suggestions? <1> http://ca.php.net/microtime there's something about it in the comments <23> i have a php cl*** that takes an xml file and then dumps it into an ***oc array.. <20> Gargoyle convenient - I need to superimpose the array into an existing date array for a calendar. <20> myconid - i dont use pear. <20> er.. inconvenient, i mean <20> bleh not enough coffee yet :( <26> I'm getting an error 1251... Apache 2.0.56, PHP 4.4.2 <26> MediaWiki 1.5.6 installation script <26> and yes, I have tried #mediawiki <26> the problem sseems to be "old mySQL client libraries" <26> I'm using the PHP 4.4.2 Win32 binary <26> as an apache module <27> you need to recompile php once you upgrade php i believe <27> or you need to install the v3 libs <26> I installed PHP 4.4.2 clean <26> oh, this is MySQL 4.1 <24> Thank you for your answer. I would like to know that if someone logs in my page (I do the auth with sessions) and everything is correct and I set $_SESSION['logged_in'] = 1, in other pages, for checking if the user is logged in, is it enough (in terms of security) to just check if $_SESSION['logged_in'] is set to 1 or it plausible and necessary to check if $_SESSION['name'] and ['email'] correspond to those queried from the database where id i <24> s $_SESSION['id']. Can anyone undestand this question? <8> Arthur__: Just checking session['logged_in'] isn't HORRIBLE, but you are still subject to session hijacking. <24> that's it... I still don't know what to do. <24> but if someone hijacks the session he will get the ['name'] and ['email'] "correctly", isn't he? <24> so, If someone hijacks the session, my auth through sessions will be lost anyway. Am I right? <8> Arthur__: If I log in, and someone else guesses my session ID and goes to your website with it, they will get my identity. <8> It's a tough situation because you can't really say the IP address must be the same. <8> W***up piera? <8> You got something to add, or are you just that bored? <28> dj_segfault: nothin much.. dealing with side effects of this medication <8> piera: What are the side effects? <24> dj_segfault, thank you very much for your answer, but why couldn't I check the IP address? Don't session only live when browsers are alive? <28> dj_segfault: im experiencing now the bad abdominal cramping :\ THursday night I went in thinking I had an eye infection but was diagnosed with a rare muscle disease <29> Hi, I'm implementing the ADODB database abstraction layer into a script, and I need some advice as to the best way to check if a query returns a result or not. Formerly I have been using "SELECT count(*) AS numrows FROM blah WHERE blah", would $db->GetOne($query); be as efficient, or is there a better way? <8> piera: That ****s. Sorry to hear that. So your logical course of action was to stare at a computer screen answering newbie questions. Got it. <30> thespore, try it with GetOne and see if that works.. that is the method I would use. <8> Two fish swim into a concrete wall. One turns to the other and says, <8> "Dam!" <8> Two hydrogen atoms meet. One says, "I've lost my electron." The other <8> asks, "Are you sure?" The first replies, "Yes, I'm positive." <8> Did you hear about the Buddhist who refused Novocain during a root canal? <8> His goal: transcend dental medication. <24> lol!!! <8> Mahatma Gandhi, as you know, walked barefoot most of the time, which <8> produced an impressive set of calluses on his feet. He also ate very
Return to
#php or Go to some related
logs:
#gentoo #linux the system will reboot when you leave the shell Warning--SELinux is active dge-530t gentoo #linux #ubuntu #oe libxine1-main + ubuntu gentoo mplayer mtune
refresh: unexpected rcode (SERVFAIL) from master
|
|