| |
| |
| |
|
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> kaylee: 32 bytes? <1> earth: so to have a p***word stored correctly I'll need to make sure my field is 32 bytes? <1> or something more <1> more as in more specific <0> mugger: see the user comments on http://us3.php.net/manual/en/function.mkdir.php <0> well, if you're storing an md5, you'll want at least 32 bytes, yes. <1> earth: so that should be a char field? <0> yup <1> sorry...it's been a while...honestly I used to know this <1> :) <1> happen to know how to update the existing table? or do I need to go a-googling <0> php != mysql ;] <1> earth: yeah, I know <0> "mysql alter syntax" <2> earth -- http://hashphp.org/pastebin.php?pid=6508
<1> I've been working a TON in the java/postgres/oracle world ... and most of that has been tracking down weird bugs, not actually writing new stuff <1> :) <2> here is a complete output, where key value for "value" is greater than 0 <2> earth: given my array (and taking into account that it is part of a loop), how can I get php to output only my values for "value" <0> it is pretty hard for me to sort out what you're doing with any of this. the "value" key of the array you pasted would be accessed via $array['data'][0]['value'] or $array['data'][1]['value'], i believe. <0> but beyond that, the code you pasted seems to have nothing to do with the array you're asking about, so there's just nothing to go on. <2> earth - the code I posted is part of a loop that increments $i for every item that is fed through to loop <0> :) yup, i get that. <2> so what don't you understand about the code <0> what don't you understand about my answer ? :) <1> when creating a misc site with user logins... what's the recommended way of protecting user p***words? <2> earth - from the array i posted -- all i want to do is extract the result of the "value" key <2> for every value of $i <0> excellent. $array['data'][$i]['value'] <3> I have a function which take as argument a filename ! How could I p*** to that function as argument a PHP program name which output a file of that type ? function ('c:\test.txt') to be replaced with ? <2> however, whenever I var_dump($ins_items["value"]); I get NULL <2> even though there are instances where "value" is not NULL <0> right, therefore ins_items is defined wrong. <0> there is no "$ins_items" in the code you pasted. <3> I should slightly modify the program that output the file to buffer the result and than I should p*** the variable with the content buffered ? <2> ins_fields <2> sorry <3> or is something straight ? <0> so, you're either accessing the value wrong or the data is actually NULL. I'm not sure what else to tell you. <0> one way you can sometimes help yourself through such problems is to make each step incredibly explicit <0> so $mData = $ins_fields['data']; <0> $iDataChunk = $mData[$i]; <0> $iValue = $iDataChunk['value']; <0> see what I mean? breaking out each part of the multi-dimmed array into its own variable so you can more easily inspect it <0> and understand what's going on. <2> yeah thats a good idea <0> I'm sure it is something very obvious. <4> hmm <4> if $v = 1 would $_POST['image'.$v] be equal to $_POST['image1'];? <0> looks right to me. <2> earth -- it seems you are correct in saying that all values are null <5> Can someone help me with this, I am trying to read a file *line by line* -- using fread, how do I do this? <2> however, when i look at straight var_dump, i see that "value" has things stored for it in the array <5> so I want to grab a line, do stuff, grab the next line, etc --- as part of a while loop <2> perhaps i am trying to grab this data with the wrong statements <0> carlh: user comments in : http://us3.php.net/manual/en/function.fread.php <0> the example code in the user comments are crazy useful <2> ["value"]=> string(3) "yes" <2> earth -- why, when i use var_dump($ins_fields['data'][$i]['value'] do i not get the value "yes" returned <2> since when i var_dump($ins_fields), that is one of the values listed for "value" <0> for what value of i ? <2> earth -- if i use var_dump inside the loop, shouldn't it give me every value of i, as long as i specify that I want $i <0> it will print it iteratively. <2> yes <2> it does that <2> but every value is NULL <0> you can understand how this is not a very well formed question, right? if you really want help with this, you'll need to put together a test case where someone else can run the code. <2> earth -- again, i am pretty new to this <0> ins_fields is not defined on the page of code you pasted <2> i know -- it is taken from elsewhere <2> this is part of a large wiki project <2> however, my question is fairly simple, i think -- when i var_dump the entire $ins_fields array, i see the values i want <2> how do i specify grabbing only some of the values from the array, instead of all of them <2> i just want to grab that values from the array that i see when i var_dump the entire array
<0> $array['key']['key']['key'] ? <0> we're talking about a nested set of arrays. <2> ["value"]=> string(3) "yes" <0> each one of them has an index or key in the array above it <0> so what happens when you do what I suggested above in ***igning each nested array to a temp variable? <2> i get 5 NULL values <0> great! so now print_r() the array -above- where you're getting the null.. hum. this is really easy. <0> It is harder to describe than to write. <0> in your example code, it is very confusing because you're indexing on an array different than you ask about. <0> so the for loop is going over the count() from $xfields['data'] <2> yes <2> it is going through the loop until it reaches the countmax from xfields data <2> $i is just a temp variable that counts up to the maxcount on xfields data <6> lorfds: Why don't you ask a TikiWiki support channel for help? They should know the code, and could probably tell you what it is you're not understanding. <2> have tried <2> unfortunately, there are very few people who understand the code in depth <2> it is a very big project <2> if it were more general, i would ask there <0> i figured out how to work around the weird dom spacing problem <0> if I use a docfragment instead of a new domdocument, it preserves the space when I import XML text :( <2> TML -- i ***umed that this was more of a php question anyway <2> i simply want to know how to pull out certain values from my array <0> as I said, decomplicate it to understand it. break it into as many pieces as you can and look at each one individually. <6> lorfds: We've already answered that question a dozen times over. <0> what you say you want to do is -incredibly easy- <2> ok -- then please help me do it <0> it is simply some issue you're having with addressing it. <6> lorfds: The problem is that what you're telling us doesn't match any possible reality. <0> I think at this point we need you to produce some code someone can run. <6> lorfds: Allow me to demonstrate: http://hashphp.org/pastebin.php?pid=6509 <6> lorfds: You'll see that the $ins_fields matches yours exactly in its structure <6> lorfds: And you'll see that the var_dump() works precisely as we've told you. <6> So from a PHP standpoint, your question has been answered. From the perspective of TikiWiki, there appears to be something going on that you don't understand, and none of us know what you're trying to do. <6> Presumably, there's at least ONE person on earth who knows the TikiWiki code, because someone had to have written it in the first place <2> TML -- of course, but it is difficult to get in touch with those people <6> That person is probably your best bet <6> lorfds: Well, it's impossible for us to answer your question. <6> So you can choose between impossible and difficult <7> hi all <7> i've put this two lines on my .htaccess <7> php_flag zlib.output_compression on <7> php_value zlib.output_compression_level 2 <7> and now when i wan't to get the website, i've an error 500 <6> Sp4rKy_: Check your apache logs <7> TML , it's a share server <6> Sp4rKy_: Then contact your hosting provider for technical support. <0> lots of things can cause that. try setting any other php value in the .htaccess file <0> or putting some other setting in the .htaccess file first. <0> try setting compression to off. <7> TML : i've the same issue on a local webserver <8> variables declared and given value in an included file are available to the file that does the include, right? <0> you need to narrow it down to whether it is the actual compression that is causing the problem or if it is something about the .htaccess file <6> .... <0> 500 type errors often occur if there's something wrong with a .htaccess <6> Sp4rKy_: Then check your apache logs <0> ;] <6> CaT[tm]: That's correct. <8> tml: would there be anything that'd prevent that? <6> CaT[tm]: Not really, no. <8> damn. <0> try declaring them explicitly global just before you access them. <6> earth: That's not very good advice.... <7> http://pastebin.com/655131 <0> just to test. <0> see if it is a scoping problem <6> hm <6> Sp4rKy_: Apache seems pretty clear about the problem. Which part of that are you having difficulty understanding? <8> problem seems to be that include can't find the file. <0> hehe <7> TML , i've just copy this two lines from a website ... <8> AHA
Return to
#php or Go to some related
logs:
scp largefiles #debian #perl #linux install webspell en fr #osdev #css apache +interpret HTML as PHP ubuntu + no windows manager adduser TUI
|
|