@# 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 30 31 32 33 34 35



Comments:

<0> yes
<1> Silivrenion: Did you read the topic when you came in?
<0> about the manual, or about not being #mysql?
<2> Does anyone know if it's possible to transfer the $_GET array over to a new page?
<2> Sounds weird I know.
<0> cause I installed php, and it works
<0> i installed mysql, and it works
<1> Silivrenion: Before either of those.
<1> Silivrenion: The first instruction provided in the topic.
<1> Silivrenion: Now pay attention to what he said, especially #10
<0> meaning what? ##php or any of the people in it cant give any kind of insightful information to a problem?
<1> That's correct
<0> I'm sure at least some person can really help if they wanted to, regardless of topic guidelines
<1> Silivrenion: If they did, I'd remove them from the channel for guideline violation
<3> root404: are you sure you are using 3 '='?
<0> the channel #php-sql-doesnt-work doesnt exist, else i'd be there :D



<4> does anyone know a JS way of grabbing the parent form object by this() (which returns an input that's within a table, surrounded by form tags)
<0> can you suggest where i can look for help then?
<5> 3... 2.... 1....
<6> Oh, sorry, I got it working ds-, but it doesn't work in IE :(
<1> Silivrenion: In this case, *PHPMyAdmin* is what doesn't work for you, so where-oh-where might you find help on it?
<6> ds-: http://insertdomainhere.org/domain/
<7> K***ah, #web
<0> neither does phpbb or any other php-msql briding application, so I should probably join every php-sql channel and cross post about why its not working?
<0> *bridging
<7> Silivrenion, you have a point, but it's not our problem. We get to choose what we provide ***istance with.
<1> Silivrenion: If you have a *PHP* error, we can help with that. If you have an *application specific* error, you need to take it to the people who support that application.
<7> You don't have a right to get help from us.
<0> ok, i'll see if I can make it a php-specific error in order to 'qualify' for help..
<8> is there a way to make php NOT convert numerical strings in arrays to numerical values ?
<9> wimpies: you mean, in array keys?
<8> yes
<0> just a minute, i'll make a php file trying to load mysql_connect, and I bet a dime it wont work
<10> Silivrenion: well then you obviously don't have mysql support enabled.
<7> wimpies, I don't believe there's any difference when accessing an array.
<1> Silivrenion: If it doesn't, you'll have a PHP error message, which we *can* help with.
<9> wimpies: i don't think so.
<7> $arr[2] == $arr["2"], right?
<1> wimpies: No, you can't.
<8> the problem is that when that numerical value returns from a HTML form it is a string
<1> wimpies: Why is that a problem?
<8> and I need to compare with === because 0 "" false and other values are considered to be the same if you use ==
<1> wimpies: That's why == typecasts, so that it *isn't* a problem.
<10> wimpies: so cast it back to an integer
<10> wimpies: www.php.net/intval
<0> ty AcidReign..
<8> the problem is that the code I use is generic and does not know about the type of the values it handles
<6> Will someone help me make a regex that takes out all characters that aren't in the alphabet or numbers?
<10> wimpies: sounds like you are doing ZERO validation in your User Input
<8> TML ; that is a problem because if your array contains "" 0 and false as valid values, you cannot know which is actually selected
<10> wimpies: which is "A Very Bad Idea!"
<7> root404, you can do that yourself. First, figure out which preg_() function to use.
<8> The array contains the values of a select tag
<10> wimpies: "" is strlen() == 0, for one
<8> and the values can be anything 0 "" and faluse
<1> wimpies: That's not a problem for me because I would never allow "", 0, or false to be valid values.
<10> wimpies: you are Not going to get "false" from a form, other than as a string "false", which is actually a true value.
<8> TML : you can specify value='0' value='false' value='"";
<0> and TML, I ask in here because I figure out of 418 people, someone can help.. I'd do you and everyone the same service, but too bad there isn't a #all_packages support channel. Thanks for your help anyway AcidRain, TML
<10> wimpies: value="false" is a string, which is a true value
<10> wimpies: and you would have to handle that specially
<0> there must be some package to install that bridges the two gaps
<10> wimpies: "false" != false
<8> true I am wrong there but for "" and 0 ?
<1> Silivrenion: There's a reason there's not an "#all_packages" support channel: Because no one knows *all* packages.
<11> Hi
<10> wimpies: As I said, strlen( "" ) == 0
<12> If a statement is true, it must be always true.
<10> wimpies: but strlen( "0" ) == 1
<1> wimpies: As I just said, I would never allow a form to use 0, "", or false as values.
<7> Thank you for the philosophical interjection.
<12> I would just use a radio button, myself.
<10> wimpies: all User Input is a string ($_GET $_POST $_COOKIE)
<11> Do you know some issues of objects and sessions?
<8> the example I have is the array contains "000" "001" and "999"
<0> :) either way, if someone asked for fedora help in a php channel, and I knew the answer to it, i'd most likely answer in the channel and make life easy for the poor soul. just makes sense, ya know?
<8> and hence values 0, 1 and 999



<1> Silivrenion: IRC has *channels*. Channels provide narrowly-scoped, segmented help. If you want support for "all packages" in the same space at the same time, I suggest you create your own chat protocol.
<10> wimpies: and what's wrong with that?
<8> the form returns 000 and hence comparsion fails
<12> That's beacuse it's a string.
<1> Silivrenion: What you say does *not* make sense to me. It make sense to me to keep channels focused on a topic and to reject anything not on that topic as a way of keeping some form of order.
<10> wimpies: you dont seriously expect to have $foo['000'] and $foo['0'] be unique values in the array do you?
<12> May I suggest converting to an int before you do stuff to it?
<7> wimpies, $arr[(string) $key] = $value;
<10> wimpies: then you need to compare the integer value, or pad the string.
<8> well I do because for the customer 000 is a code value in string
<1> Julian|Work: That doesn't work. It still ends up as an int.
<7> $arr[(string) "000"] = "blah"; <- that works.
<8> and NOT 0
<7> TML, I disagree. Just tried it.
<11> I have stored an object variable in session, when I load it it' diden't work. But it works perfectly if i made a print_r of the variable before using it!!!!
<10> Julian|Work: its already a string apparently, but php casts numeric array keys to integers
<1> Julian|Work: Must be version specific: php -r 'var_dump(array((string)"000"=>"foo"));' array(1) { [0]=> string(3) "foo" }
<0> TML :: logically, that makes sense, but the bureaucracy of giving the person that needs help the hardest time doesnt make any sense, when its already available where they are..
<13> wimpies: $arr["prefix" . $key] = y helo
<11> Is it normal?
<1> Silivrenion: bureaucracy makes perfect sense in IRC. IRC is by its very NATURE bureaucratic
<10> Rivos: Do Not Store Objects In Sessions!
<7> http://pastebin.com/571181 <-
<8> ok I need to think this through ... thanx for the help
<8> silivrenion : can you restate your problem ?
<7> On PHP 5.0.3
<1> Julian|Work: Must be something they fixed in ZE2.
<10> TML: heh
<7> Same result on 4.3.11
<1> Julian|Work: On 4.3.10-16 (from debian), php -r 'var_dump(array((string)"000"=>"foo"));' array(1) { [0]=> string(3) "foo" }
<8> Julian : that is interesting. If I prefix these 'numerical' codes with string they would be kept as string, right ?
<7> wimpies, that's what we're testing right now.
<11> Acid, is that the only solution?
<1> wimpies: It appears to work in some versions, but not in others.
<0> wimpies :: php wont do any connections with the mysql server. I am wondering if theres a specific package required by php in order to establish this function, or if just having mysql and php installed on the same server will work?
<8> no you need the php-mysql plugin
<14> Silivrenion mysql[i] extension
<11> there is no explanation?
<14> plugin? :D
<1> Silivrenion: Your PHP has to be compiled --with-mysql or you need the mysql extension. See php.net/mysql for details.
<0> ty
<8> TML : no not if you dynamically load it
<8> TML : I use Php > 5
<1> wimpies: Read what I said again
<14> omg
<14> TML :P
<1> "has to be compiled --with-mysql *****OR*****...."
<8> TML : oops ... sorry
<1> Julian|Work: 4.4.0-4 from debian shows the same behaviour as you're seeing.
<1> ["000"]
<7> 4.3.11 (using your test on the command line)
<7> This is all Win32 by the way.
<8> TML : it works for the php version I have ... so I can do with it.
<1> 4.4.1 on NetBSD also shows your behaviour.
<8> Thx all
<7> I wonder if this is worth documenting somewhere.
<1> Julian|Work: What about (string) "111"?
<1> I get [111] in all versions of PHP I've tested so far, even those that do the "Right thing" with "000"
<10> isnt casting a string to a string redundant anyway?
<7> <?php var_dump(array((string)"111"=>"foo")); ?> -> [111]
<1> AcidReign: The idea being that PHP sees some numeric strings as numbers.
<1> wimpies: So there's a "gotcha" for you to be aware of. It doesn't work for all values.
<1> Hmm...
<7> <?php var_dump(array((string)"011"=>"foo")); ?> -> ["011"]
<10> TML: right, and wouldn't the cast have zero effect, because its the same value?
<7> Seems like if it begins with 0, you get the string.
<1> Julian|Work: What I was about to say
<1> Leading zero on some platforms coerces to a string
<1> In fact, you don't even need the (string)
<7> Yeah, AcidReign is correct about that being redundant.
<1> '<?php var_dump(array("011"=>"foo"));'
<10> Rivos: 1) you woud have to have your cl*** defined on ALL pages that start the session, 2) you object can't contain references, nor can it contain any Resource Identifiers (files, database connections, sockts, etc)


Name:

Comments:

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






Return to #php
or
Go to some related logs:

+cups +printing multiple pages per sheet
mkfs.vfat large disk
#css
#perl
/etc/courier/shared/index
#php
#perl
gentoo keymaps configuration
grimshieldsson
#debian



Home  |  disclaimer  |  contact  |  submit quotes