@# 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> CrazyEddy: First, I want you to max error_reporting, then also make sure display_errors is on. Then, I want you to make positive that it doesn't evaluate the if (mysql_num_rows()...)
<0> will: Unless output buffering is on, IIRC.
<1> oh
<2> kuja, actually you're right.... mysql_num_rows() evaluates to.... 1 although shouldn't it be FALSE / 0 ?
<0> will: Try setting it to off in your php.ini
<0> CrazyTux: mysql_num_rows() returns the number of rows from your SELECT statement.
<0> i.e, a row count
<2> kuja, I'm aware, but I'm positive there are no rows?
<2> kuja, I've truncated the table.
<2> kuja, one thing I am doing is..... I run the sql statement and check for rows, and then right after I insert a row, but this shouldn't cause a problem?
<0> CrazyTux: One of you is lying, of course.
<2> kuja, ?
<0> Well, there's a suspicious note on php.net/mysql-num-rows that catches my attention.
<0> "Note: If you use mysql_unbuffered_query(), mysql_num_rows() will not return the correct value until all the rows in the result set have been retrieved."
<2> kuja, not using that...
<2> kuja, http://pastebin.com/641717



<3> helle everyone, is anyone using sql server with php?
<2> kuja, but that couldn't possibly be it, could it? that just seems like ridicilous behavior.
<3> i want to insert special characters like ascii 10 and 13 into text fields
<0> CrazyTux: GET_LAST_LOGIN is a SELECT?
<0> faber2: php.net/chr
<2> kuja, yes.
<0> faber2: Alternatively, "\r" and "\n"
<2> kuja, I just commented out the ADD_ACCESS_LOG, so that is not the issue either....
<0> CrazyTux: Whatever is happening, that query is selecting a row. Try showing the row(s)
<3> kuja: do i send a literal \ and literal n?
<0> faber2: echo "Hello, World\n"; // Note the double quotes which allows for escape characters.
<2> kuja, omg... it returns MAX(date) NULL ?
<0> CrazyEddy: var_dump(mysql_fetch_***oc($query[1]));
<2> kuja, yea... MAX(date) = NULL is return value.
<0> Now, that's a MySQL problem :)
<2> kuja, SELECT MAX(date) FROM access WHERE method = 'POST' AND _a = 'login' AND account_id = 54 is the query that ran?
<0> CrazyTux: That's a #mysql question.
<0> As far as "why" that happens.
<3> kuja: i am talking about the microsoft sql server. are you using that?
<0> faber2: No, I do not use that.
<4> is it wise to have login as a cl***?
<4> i.e. object of its own?
<0> krz: If you wish.
<2> kuja, seems a bit ridiclous dosent it? :P -- I mean I could have fixed this issue a million other ways, but it was just bugging me... haha.
<0> krz: There is nothing "wise" about creating cl***es. The need for cl***es arise only when the object has independant behavior of its own. i.e, "what can you do with an object? what can the object do? what is it supposed to do?"
<4> kuja or should it have a better name, example Session. which will have the following methods: login, logout, log session, change p***word, verify, etc
<0> krz: Sure, that seems logical.
<0> I have cl*** `Pecil', I can `write()' on an object of cl*** `Paper'. I can also `erase' some text from the `Paper'.
<0> `Pencil', even.
<5> hi i'm getting this error from a php script i've decided to use and was wondering a way to fix it.. fread(): Length parameter must be greater than 0
<4> kuja do you use an IDE or any framework to develope your php apps?
<0> krz: No IDE. As for framework, I haven't found one that I like.
<0> But it doesn't matter, because I don't write PHP anymore.
<0> Trizmo: The error is self explanatory.
<0> Trizmo: php.net/fread
<6> can I edit a @_POST "item" like a normal variable?
<0> Yes, you can.
<0> And you mean $_POST.
<7> hi there... i have a problem with the mail() function - i'm able to send UTF-8 messages by setting a header to "Content-Type: text/plain; charset=utf-8\r\n" but the subject (also in UTF-8) is recieved as gibberish
<4> kuja what are you more into now?
<6> kuja, OK. thanks :)
<8> hi, does the `if` keeps evaluating after a statement evaluates to true ? if (!$foo || !$bar)
<0> vinadelmar: If $foo is false, it won't get to $bar. If $foo is true, it will try to get to $bar to check it.
<0> krz: Python and Ruby.
<4> kuja how is ruby's demand in the market compared with php?
<0> krz: Which market?
<8> kuja, it's || not && ... sure?
<4> web application developement for small medium sized companies
<0> krz: It's low. Ruby on Rails demand is getting higher and higher, though.
<0> vinadelmar: if (true || true) // only the first true gets evaluated.
<4> kuja ever used eclipse?
<0> krz: I don't like it.
<0> vinadelmar: if (true && true) // both of them get evaluated.
<8> but not if if (false && true)
<0> vinadelmar: Right
<8> kwel
<8> quite logic actually
<0> vinadelmar: Yes, it'd be stupid if that's not the way it worked.
<8> nice way to say that i'm ... :)
<9> not logical?
<0> vinadelmar: I wasn't saying you were :)



<8> but you meant it, iKnow it
<8> because you'r evil, everybody knows it
<8> well thanks ;)
<0> Yes, everyone does know :)
<8> wooohoooh lunch time :)
<10> How to change Location of php.ini ? (i've searching httpd.conf, and found nothing)
<11> PHPIniDir works on Windows, not certain about *nix
<12> How do I change <br> breaks to newlines ... ?
<10> Dragnslcr, any clue for *nix ?
<10> babo, php.net/str_replace()
<12> cool
<13> how can i send a http post request, to send data?
<11> If that doesn't work on *nix, you'd have to recompile
<11> Drakas- curl or stream contexts
<13> talking about stream -
<10> ok, thanks...
<13> i cant make a proper request: GET / HTTP/1.1\r\nUser-Agent: Bzz\r\nHost: test.com\r\none=two&three=four\r\n\r\n
<13> this wouldn't work for me =(
<10> Drakas, doing POST with GET ?
<10> uh... ?
<13> sorry
<13> i meant POST / HTP/1.1
<13> ok, i want then to use cURL
<13> how do i send a stream, which has got not-normal chars. base64 or something?
<13> ;s
<11> I've tested out the stream context stuff, and it works pretty well
<11> If you have PHP5
<11> http://www.php.net/stream_context_create
<11> There's a couple extra headers you need for POST that aren't shown on that page, but the stream_context_get_default page has an example
<13> okey thanks
<13> i want to validate like bits of html code :] bt gets really annoying when you need to add doctype, html etc. ;)
<14> i want to embed a video file
<14> but it is behind restricted area
<13> Dragnslcr: ok, i've almost done everything. How do I make it work because http wrapper thing isn't enabled here
<14> how may i hide the user and p***word
<13> Skretch: you make a php file that gets the video's content in another place?
<13> like <?php header("Content-type: video/mpeg"); readfile("restricted/file.mpg"); ?>
<13> and then use that file as the object's source
<14> awesome
<13> btu there might be a better way to do it, with streaming. but unsure... readfile just dumps all the file's data.
<14> but it will be echoed to embed src
<14> and then user may see u/p
<15> How can I see what version of php my apache uses?
<13> Mc_Fly: phpinfo(); or echo PHP_VERSION;
<15> Drakas: where in phpinfo?
<16> Mc_Fly: at the top of it iirc.
<13> Mc_Fly: at the top?:))
<13> unless you modified it's source
<17> hi ther
<18> hi :)
<18> I'm beginning in PHP (started 2 weeks ago but already quite fluent, the learning curve is short but quick), and I'm wondering: is an empty string (just like $string="") recognized empty by functions like empty() ?
<18> or do I have to put statements like if ($string !="") ?
<14> Drakas after i read the file using readfile() where is it stored and how my i echo it
<13> Jojosan: i think it should be echo`ed already
<13> Jojosan: http://uk.php.net/empty
<14> thank you
<13> * sorry, first msg to Skretch
<13> :]
<13> Skretch: works or not?
<18> thanks dr1
<18> oops
<14> Drakas i didn't taste it still thank you
<18> Drakas.
<14> test*
<19> your welcome :D
<13> Jojosan: i think its much better to use !== ""
<13> than empty()
<18> okay Drakas
<18> !== or != ?
<18> the first seems strange to me
<13> =(
<13> the thing is back again...
<13> php files execute for no matter how long
<13> test.php - <?php ?>


Name:

Comments:

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






Return to #php
or
Go to some related logs:

xubuntu f5d7050
#oe
#lgp
#perl
sdl twinview
did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA smtp auth
konqueror numbered links
sadanimation
*** glibc detected *** out of memory
Win32::ODBC concat



Home  |  disclaimer  |  contact  |  submit quotes