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



Comments:

<0> CWhiz: because after sending out newsletters to 12k persones with 8 images in each that does a cached scale (aka, does getimagesize, sees that it has a suitable cache, then returns that cached image) the server crashed and burned!
<1> pyre|cipher: You probably want to explode() each line.
<1> fangel: Maybe it does, then. <shrug>
<2> right, i have an explode statement and put the contents into a variable, however, how would i discern that every nth string ***igns to a specific array? 1, 2, 3, 4\n 5, 6, 7, 8 1 and 5 would go into one array, 2 and 6, etc.
<1> pyre|cipher: You could use a counter variable. At the beginning of each loop, reset to 0. Increment at each column. It wouldn't be that hard to output a two-dimensional array with the appropriate number of columns as keys.
<3> heya all
<4> hello
<3> I have apache running with php installed and for somereason apache isn't processing php pages its just outputting code. Wondering if anyone can help for a sec.
<2> but how would i stick 1 and 5 into id[] and 2 and 6 into url[] etc. ?
<2> in some counter/for loop scheme
<2> i see where you're going, but im missing that one little step
<5> what's &#xD; exactly? Seems that DomDocument changes \n to it
<1> pyre|cipher: If you really, really need the separate arrays, you can make an array of keys corresponding to the columns, loop through that array at the same time you loop through the explode()'d line, and use variable variables to ***ign them to the appropriate array.
<6> chuckyp: Have you edit your httpd.conf file?
<3> Here's my http.conf http://www.rafb.net/paste/results/rcRhzh84.html and this is my php.conf http://www.rafb.net/paste/results/4YT0om43.html
<1> pyre|cipher: I personally would just do a 2D array unless you have a compelling reason not to.



<2> could you batch up a little sample? im still not really following, sorry...
<1> pyre|cipher: Sure. Why do you want to put the columns in separate arrays?
<3> tws, The package manager i'm using to install edited the http.conf
<6> chuckyp: You need AddType application/x-httpd-php .php
<2> i gotta import this file into a database, but the one file needs to be split into seperate tables
<3> tws, in http.conf correct?
<6> chuckyp: In httpd.conf actually.
<1> pyre|cipher: I think you'll make it easier on yourself if you use a nested array.
<1> pyre|cipher: I'll code a brief sample. Hang on.
<2> i appreciate it
<3> tws, line 194 is calling the php.conf file
<3> tws, which is adding that line
<6> chuckyp: You can put it after AddType application/x-httpd-php-source .phps line.
<3> tws, oh i got you jesus i'm blind
<3> tws, anything else i'm missing.
<1> pyre|cipher: Okay, I'm more tired than I originally thought, but I believe this is what you want: http://hashphp.org/pastebin.php?pid=6196
<6> chuckyp: I'm not sure. Save your httpd.conf and restart your web server.
<2> CWhiz: hehe, im so tired too, probably why i wasnt following, lemme take a look
<1> pyre|cipher: Note that just a single explode() doesn't cover all the output cases of Excel. You have to consider quoting and other stuff.
<2> quoting?
<2> its output from excel, buts its a simple tab delimited text file
<1> pyre|cipher: Yes, if your delimiter (tab or comma) appears in the data, it'll be quoted, and just doing an explode() may split your column into two.
<7> mysql_query("DELETE FROM shop_userdata WHERE (sess_end+30) > sess_begin"); <<<< I want to remove all rows where a session has ended for more than 30 seconds ago... But THAT wont do it right?... How do I solve this? sess_begin and sess_end both contains unix timestamps...
<2> like if there's the string ',' inside one of my fields?
<3> tws, no dice
<3> tws, didn't work
<1> CopyNinja: sess_end < (UNIX_TIMESTAMP() + 30) I believe. Please check me before relying on that.
<6> CopyNinja: Is sess_begin the current timestamp?
<6> chuckyp: No idea.
<7> no sess_begin is the timestamp of when user first started his session
<3> tws, I added the line and restarted httpd and still outputs raw code.
<1> pyre|cipher: If it's a tab-delimited file, and you have a tab in the file, Excel will quote the field and leave the tab in the output.
<6> chuckyp: Refresh your browser. It *COULD BE* the cache.
<3> tws, yeap was the cahce i'm kicking myself int eh head now
<1> CopyNinja: I think that's wrong. Try UNIX_TIMESTAMP() > (sess_end + 30)
<7> sess_begin is a unix timestamp of when users session started. sess_end is updated everytime user refreshes the page (if users session id exists)... so now I want to remove all inactive sessions (after 30 min inactivation, but I use 30 secs for testing purposes)
<7> CWhiz: Ill try that, thanks!
<6> chuckyp: Can I do it? :)
<3> tws, thanks bro
<6> chuckyp: No problem.
<7> CWhiz: did not do the trick...
<7> It looks like this now: $delete = mysql_query("DELETE FROM shop_userdata WHERE (UNIX_TIMESTAMP() > (sess_end + 30)");
<6> CopyNinja: Just a question. Why are you storing the timestamp when the session is started? Why not store the timestamp when the session should be ended?
<1> tws: He's storing both (though he doesn't need to).
<7> tws: because I want to know when the user first started his session
<6> CopyNinja: If you store both timestamp (BEGIN and END), just check the current timestamp against the END field.
<7> tws... isnt that just what I am doing right now using this: $delete = mysql_query("DELETE FROM shop_userdata WHERE (UNIX_TIMESTAMP() > (sess_end + 30)");
<1> CopyNinja: No, you're deleting 30 seconds after it ends.
<6> CopyNinja: I think it should be `DELETE FROM table_name WHERE sess_end>=$current_timestamp`;
<7> so if current time is equal or smaller than last update of users actions... then the row should be deleted... is that what you mean?
<1> Doesn't that delete every session that hasn't expired yet?
<1> Or does mine do that? One of us is wrong :)
<8> CWhiz, Do you have a website?
<7> exactly... wouldn't something like this work better? DELETE FROM shop_userdata WHERE sess_end+30 < UNIX_TIMESTAMP()
<6> Ah, it should be `DELETE FROM table_name WHERE sess_end<=$current_timestamp`.
<6> My mistake.
<1> Tainted-Wolf: Yes.
<8> CWhiz, URL?
<1> Tainted-Wolf: None of your business :)
<8> Hehe
<7> tws: actually... this seems to work ;p DELETE FROM shop_userdata WHERE sess_end+30 < UNIX_TIMESTAMP()



<4> CWhiz: ahhhhh man i wanna see it!
<1> I'm still not sure why you need the + 30 in there, though.
<6> CopyNinja: DELETE FROM shop_userdata WHERE sess_end<UNIX_TIMESTAMP() equals to DELETE FROM table_name WHERE sess_end<=$current_timestamp.
<1> ***uming $current_timestamp is set, of course.
<9> hi, just wondering whther upgrading PHP via yum will overwrite my php.ini file?
<6> CWhiz: Is this yours? http://cwhiz.com/ :)
<1> tws: No.
<8> Lol. Good.
<6> CWhiz: A P2 450 for $1.200.
<10> I heard that AddType is no longer the proper way for apache to gain support for php now
<11> is there an OR which returns not true, but the value of the first or second expression? i want to set a variable as something OR a fallback.
<10> its now something like 'AddHandler application/x-httpd-php .php
<1> brick: if ($foo == $bar ? $foo : $bar)
<11> thanks CWhiz, that's a good way to do it
<10> can someone please tell me where i can find exactly what i need to add to my httpd file?
<1> MeatBall-: http://www.php.net/manual/en/install.unix.php
<7> MeatBall-: its all explained in the installation textfile that comes with PHP
<1> Burge: Probably, but yum keeps a backup, if I recall correctly.
<9> ta
<12> any ideas how to stop a form being posted twice . .ie when an user click refresh on a page ?
<13> p_mash, that's a #web question.
<13> p_mash, oh wait, no it's not, sorry
<14> hi all
<6> p_mash: I'm not really sure but I think you can do it with Javascript. Something like in human langauge, on button click, disable the button.
<13> p_mash, you can't actually stop it from being posted, but you can use a session and set a variable in there the first time it's posted, and check on it the second time, or log their ip to a file somewhere.
<12> umm
<4> dont forget ignore_user_abort!
<4> in case it gets rudely interuppted mid-way
<14> did anyone know why a SVG file is it generated with no prob under IIS5 / MYSQL / PHP 5.0.5 but the same programm under NETSERVER or XAMPP or WAMP produce errors ? Also I've tested under a server and command strpos("abcdefga", "a", 2) produce errors ! Is the server missconfiguration or I am missing something ?
<15> http://news.php.net/php.notes/103601 <---- i think my care-o-meter just exploded
<4> private joke? P
<4> :P
<16> anti-spam.php? for what?
<15> shrugged if i know
<16> its for da entire intarweb
<17> does php have a method of converting number formats into floating notation?
<17> if i use number_format() to convert 80000.00 to 80,000.00 while populating a form, how do i change a number like that back to 80000.00 for the database?
<18> I'm reading the phpDocs comment system, if a cl*** is built on another cl***, say a product cl*** that uses a db object, how would you illustrate the requirement
<19> WarMage: Uh.. what?
<18> kuja, I'm looking over all the phpDoc tags
<18> wondering how you guys handed documenting requirements
<20> $query1 = mysql_query("INSERT INTO pub_poll_userip (poll_id,ip,date) VALUES ('".$poll_id."', '".$REMOTE_ADDR."', CURRENT_TIMESTAMP() )");
<20> if(!query1){die('invalid query_insert: '.mysql_error().'');}
<19> If you extend a cl***, phpDocumentor should doc that, WarMage.
<20> it does not die, but nor does it evaluate...
<20> (the row isn't inserted in the database)
<19> There is no such variable as $REMOTE_ADDR unless you have register_globals on. Use $_SERVER['REMOTE_ADDR']
<20> thanks kuja
<18> kuja, I'm not extending a cl***, just using it
<18> case in point a DB obj
<19> WarMage: If you're p***ing some sort of variable in the constructor, then document the constructor with @param and say what it expected of it.
<18> kuja good point, thanks
<20> kuja - it still didn't insert the row in my db
<19> falieson: If $poll_id is from a post form, you want $_POST['poll_id']
<20> kuja: it is not
<19> echo the query string.
<19> So you know what you're getting
<20> just echo $query1;
<20> ?
<19> No, echo what's inside mysql_query()
<20> ah, k
<20> INSERT INTO pub_poll_userip (poll_id,ip,date) VALUES ('1', '66.215.51.34', CURRENT_TIMESTAMP() )
<20> shouldn't current_timestamp be evaluated by mysql?
<21> I want to genrate a Image with a curved text on it Using GDI can some one help me how can i do it
<20> wtf - it worked that time
<20> haha, sweet
<7> Does anyone know if its actually possible to use TABS inside a <option>-element?
<22> #html ?
<20> CopyNinja: why not? find the &element for it and throw it in
<7> &tab did not do the trick
<7> Meltir: I've already asked in there... they had no idea
<23> hello!
<23> got some truble with the PHPDoc
<23> i get this error


Name:

Comments:

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






Return to #php
or
Go to some related logs:

gcc-4.1 vpnc
#debian
Synaptics Deviceoff called
css 2.2
tovid todisc
explorere Peekaboo bug
roadfighters c++
FATAL: Error inserting smbfs
#gentoo
#css



Home  |  disclaimer  |  contact  |  submit quotes