| |
| |
| |
|
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
Comments:
<0> more than 2000 <1> and what are your specs? <0> I have gzips of the archived logs which are less than 8 megs each <0> I want all logs since january in a DB, each month in its own table <1> why is that so? why month/table? <0> well, to keep my table size reasonable, if not queries to it will be too slow <0> i'm wondering if it would not be better to have a vhost/table <1> uhm, well, that would be a lot of tables lol <2> :) <1> Are the queries slow? have you test that? <0> of course, but the speed of the script that will generate stats on-the-fly from that DB is my main issue here <0> yes I have <2> n00b question: Can I make CSS change a image with hover? <1> Yes you can <2> how? :) <0> I have already optimised them some, compared to the original script
<0> Lilleman : #css <2> tnx <3> is there a php mysql function that will return record sets in an array already? so I don't have to do a while loop fetch_array but a foreach instead? <1> You could do a function for that <1> and store the values in $array[] <1> and then return it <4> how do i write to a file that doesn't exist yet in php? <4> i'm trying to write code for a page that lets me use an html form to get content for a page and then the php creates the page and puts in the content <5> http://us3.php.net/manual/en/function.fopen.php <3> danf_1979: thx <6> Is there any quick way to turn an ***ociative array into a keyed one ? <7> array_values() <7> Althgough the term "keyed" is poorly used here <0> do you know if using gzopen / gzgets on a gziped file will load the whole file in memory, or just a line at the time ? <1> yes :) <7> All arrays have keys, some are ***ociative, some are numeric <7> retro: Line at a time (plus a little big when the line ending falls in the middle of a compression block) <7> s/big/bit/ <6> Pollita: :-) <8> how do you deal with with cl***es that have static and non static methods which both need a db connection ? <0> danf_1979 : was that "yes" for me? and my logfile is 550megs! <8> retro_neo try log rotation ;) <1> No, it was for Pollita and her/his comment about keyed term <0> I do have log rotation. that's all my old logfiles merged together <0> but I'm looking into reading them directly from their original gzips <8> zcat <9> Jax, either move the database connection out of the cl*** and p*** it as a parameter, or make it a static member, or ... <0> gsnedders: who ate you? <9> heh <10> Anyone knows how i can do like this: $obj = new $cl***Name; // Would create (cl***Name=foo) "new foo(a,b,c)" ? <10> it is possible to create $foo = "cl***Name"; $obj = new $foo; but i cant get the arguments with me (and also, eval is not good idea :D) <7> Have you tried $obj = new $foo(a,b,c); ? <10> Pollita, of course, it throws error <10> Pollita, but i guess there is somehow to do it with $foo as array <10> not sure how though <11> why dont u use a no-argument constructor and then feed your stuff in an init(a, b, c) method? <12> !+u <13> Surely you mean 'you', not 'u'? The letter 'u' is not a personal pronoun. Talking like this in ##php may get you silenced. For details, /msg php-bot aolbonics <10> m0rales, that is workaround ;) <7> wait <7> $foo is an array/ <7> ? <7> Well of course that won't work <10> Pollita, no it is not <7> <10> Pollita, but i guess there is somehow to do it with $foo as array <10> Pollita, but creating it as array it could work <7> sorry, misread <7> Anyway, new $foo(a,b,c) does work <7> What error are you getting <10> Oh, sorry, it does work. I must have had first time some other error i quickly thought was because of it <4> what could be a possible cause of a file not being writable? <7> permissions <7> safe_mode <14> Not existing <7> disk full <4> how deep do the permissions need to be? <4> the file doesn't exist <12> 6 inch <4> the code is supposed to create it <1> lol <14> The directory needs to be +w for the user PHP runs as
<7> yawg: Look at the reported error, it'll probably tell you <4> there is no reported error <15> does anyone have experience with php4 and Oci8 on oracle 10.1 ? <16> jlhenry, what kind of experience? <7> That's not true <15> I got this : Warning: ocilogon(): _oci_open_session: OCIHandleAlloc OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE in <7> If you try to write to a file that's not writable you'll get an error <7> You might be suppressing that error, or not reporting that error, but there is one <15> Wilik, compiling and working :) <4> hmmm <16> jlhenry, http://www.cs.utsa.edu/~jwilson/index.php?page=projects&cat=oracle&sec=oracle-php <4> well the file doesn't exist yet <7> Make sure error_reporting() includes at least E_WARNING and E_ERROR. Make sure display_errors is turned on <10> and error_level is correct <12> ...and there is no @ before the function call <7> Yes, that's well and good, but you still need to do some debugging. <4> the code tries to create a file: /home/yawgm8th/www/blog/archive/year-month-day-hour.html <1> yawg, maybe your code is flawed, show it at pastebin <4> $filename = exec('date +/home/yawgm8th/www/blog/archive/%Y-%m-%d-%H-%M.html'); <17> I hate regular expressions :/ <7> oh dear god <18> hey, maybe a stupid question, but session_unset() + session_destroy() will remove only the sessions from session_id() I mean only one person's ID not all the online ? <12> yawg: *blink* <4> that part works <15> Wilik, thanks, will try <7> yawg: Perhaps, but it's still STUPID <5> Davey: I think everyone hates having to write them... but on the flip side, love their power. :) <4> i tell it to print $filename and it is correct <4> so i don't think that is the problem <1> Quatrux, yes <18> cool then, thanks <16> jlhenry, as for compiling php with oracle support, thats just a plain pain in the ***, but there is plenty of doc's on the net on how to do it <1> yawg, so, thats how you are creating the file???? <7> yawg: yes, it's not the problem, but it's STILL bad <1> $filename = exec('date +/home/yawgm8th/www/blog/archive/%Y-%m-%d-%H-%M.html'); <1> Does this really creates a file???? <4> it doesn't create it, but it makes $filename equal that string <4> so later on when i go to fopen, i can use $filename <1> but why do you use exec? <4> idk, what should i have done? <1> dont do that unless is strictly necesarry <4> i'm new to php <12> *blink* <1> exec could be unavailable... <19> should use overload function in this case ? $t=$this->$$k($s,$v); <7> I hit you with the functions you should have been using <7> date() or strftime() would have served your needs quite well <19> Fatal error: Method name must be a string in <1> Yes, strftime is my favorite <7> ks: $$k doesn't evaluate to a string <19> Pollita should I use _set ? <16> why not do $dateString = date( "%Y-%m-%d-%H-%M", time() ); <16> then do $filename = "/home/blah/$dateString.html"; <7> ks: That question is out of context <10> __get, __set, ... are ugly in PHP :( <7> Wilik: You're mixing your functions :) <16> so?! :) <1> Just do a string yawg, $file = "path/to/whatever/".strftime("%Y-%m-%d-%H-%M").".html"; <19> Pollita you are right , it was a mistype <19> $this->$k just worked <20> What function can i use to read a file line by line... (like file_get_contents, only different) <16> file()? <20> duh, nvm :P <16> that question gets asked atleast once a day! <16> lol <1> nl2br(file_get_contents($file)); <20> sorry bout that, hehe <21> anyone knows what does return function mail() ? <16> danf_1979, why do that when file() returns an array of lines in the file? <1> What about if it just for echoing? <16> echo implode( "", file($file)); <1> nl2br("foo isn't\n bar");
Return to
#php or Go to some related
logs:
broadcom debian bcm5780 fcc uls database mysql #physics #math #php #math wine ubutun #gaim #linux #php
|
|