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



Comments:

<0> arachn1d: I'm thinking it might be closer to: you are iterating through your ENTIRE result set before checking to see if $d matches $id...$id will ALWAYS be your last record if you do that.
<1> arachn1d: care to translate that?
<2> it seems to be retrieving the IP okay, however, it is returning it twice
<3> lig: but i'm outside of pear-land (trying to manually install pear crap that i can fix to make work with my domain on a shared host)
<3> lig: maybe i should cp -r /usr/share/pear/* /home/rames/local-pear ?
<4> rames: in the installation part of the manual they tell you how to make local copies...
<5> JAJMASTER, CryWolf: $delete = "DELETE FROM rssfeed WHERE rowID='$d"; instead of $id ?
<0> lig: if you are in unix world you can type "pear list" and it will list all your installed versions
<1> arachn1d: what is your reasoning for thinking that?
<4> rames: http://pear.php.net/manual/en/installation.shared.php
<3> lig: yeah, but due to installed versions of pear on the shared host, it's kindof a pain in the rear
<5> CryWolf: Getting the value of the url instead of the earlier query.
<1> arachn1d: you need to learn how to trace program execution
<4> rames: understood -
<0> arachn1d: if you have 10 rows in your "rssfeed" table, how many times will your while loop execute?
<1> people really should learn debugging before they learn programming



<5> JAJMaster: 11
<3> lig: PEAR Version: 1.4.6 ... hrm... looks like they updated it
<1> JAJMaster: at this point, I'd say game over.
<3> lig: (or i was just really tired the last time i tried to do it)
<5> lol
<3> lig: hold a few...... :)
<5> :-\
<4> hehe
<0> arachn1d: hhh, well, how many times are you checking to see if the $_GET['d'] variable is equal to the current row ID value?
<5> JAJMaster: oh, it'd be checking each time the record displays... so whatever many records are showing on the page, it'll be that many times..?
<0> arachn1d: there is no substitution for being able to walk through the code on paper, or in your head, to see how/when things take place. You KNOW what you want it to do, tracing through it manually will SHOW you what it is ACTUALLY doing.
<6> heh, so how many of you got taught to do dry runs of programs on paper?
<0> arachn1d: in this instance, your conditional "if" block MUST be inside your while loop in order to check against every row you have in the result set.
<0> Xyphoid: SO many times...and many, many years ago
<5> JAJMaster: Oh, well... that makes sense then lol.
<0> xyphoid: probably before most of the folks in here were born
<7> Hey, I am trying to set a direct path to my images for my header.htm. <?php $images = "/Images/wwpics/"; ?> would that be at least halfway correct?
<3> lig: ok, think i got it installed: /home/rames/includes-cvs/pear/php/PEAR.php,DB.php
<4> Xyphoid: many years ago - and you couldn't write it until it was on paper logically
<1> ratbert90: that looks like a valid variable ***ignment.
<7> cool
<7> <IMG SRC="{$images}/fvwm.png"></A> so that would work?
<8> Yay, Markl solved it :)
<4> Xyphoid: psuedocode or flowcharting was allowed ;)
<0> ratbert90: it would work. You are doubling up on your "/" at one point, but most OSs don't care about that.
<1> ratbert90: why do you think that would work?
<8> MarkL: dont forget to update realVNC if you havent in the last 6 days, there is a huge security flaw in it
<7> CryWolf, because I **** at php
<7> lol
<1> ratbert90: is that for a template system?
<9> phase 1: admit it
<7> JAJMaster, where am I doubling up?
<7> no, it's for a super ultra mega simple header
<9> or was that phase 2?
<7> that is supposed to give me ONE picture
<10> Beltz: I actually never use it .. first time i've used the viewer was 5 minutes ago ;) But i'll update anyway
<8> Okay
<5> CryWolf: Sorry to frustrate you. But it's still not working. http://pastebin.ca/56123
<3> lig: ok, i do believe i am editing the right include_paths, have DB.php ~opening~ on my local copy , PHP5, E_STRICT, and get the same error ... E_STRICT: ***igning the return value of new by reference is deprecated
<0> ratbert90: {$images}/fvwm.png would evaluate to /Images/wwpics//fvwm.png
<8> Its just if you run the server actually that you have something to worry about
<7> and going from knowing not a single thing, and trying to self teach yourself this stuff, makes me sad
<7> ah, thanks
<5> JAJMaster: I meant.
<5> JAJMaster: I meant, http://pastebin.ca/56123.
<7> however, that still didn't solve my problem
<4> rames: that is telling you what will happen in the future... it doesn't actually do anything to the code...
<7> It simply refuses to show the picture at all.
<4> the strict can be turned off...if you want
<3> lig: hrm ... ok commenting out E_STRICT and my custom error handler lets it load up... grr@ non-strict crappy people
<7> the image variable goes before <html> correct?
<0> arachn1d: for starters, that code has an error in your SQL query
<4> hehe - you could always go through and refactor the code for them to make it e_strict
<3> lig: so basically, there's no DB.php that works with PHP5-strict??? (and is there a #pear somewhere where i can ask these types of questions)
<4> rames: IIRC efnet has a pear channel - #php.pear
<3> lig: i'm ready to damn-well do it, but don't want to effectively fork DB.php for stupid anal-retentive reasons
<0> - /server irc.easynews.com for efnet :)



<4> rames: have you looked int he mailing list archives to see if they are working on it
<3> lig: no ... pear.php.net really ticks me off, I think it's got like 5 words that weren't pulled from phpdoc comments somewhere and i can never figure out how to break out of that "trap" of "next api function call" links
<5> JAJMaster: which line?
<0> arachn1d: line #42. You are not properly closing the single quotes around $id
<5> JAJMaster: Just caught that one, thanks.
<8> If Im on php5, should I use php_mysql or php_mysqli
<10> ratbert90: <IMG SRC="{$images}/fvwm.png"> won't work as that line obviously isn't inside a php code block
<8> Is it newer or better to use the latter?
<4> rames: there is always adodb
<7> MarkL, so if I put it in a php block it should work?
<5> JAJMaster: it's working actually
<4> rames: never used it myself - but some prefer it
<3> lig: sorry to be irritated, but i've been screwing with this for like a week in ever-more-limited free time :-/
<10> ratbert90: ..html here .. <?php echo '<IMG SRC="'.$images.'/fvwm.png">'; ?> ... more html here ..
<11> MarkL: hush
<4> rames: np - we all get cranky when our toys don't work
<10> piera: Sorry ;)
<3> lig: yup.
<11> MarkL: apology accepted.
<10> phew
<10> ratbert90: Any joy?
<4> smart man MarkL
<7> no joy at all
<5> JAJMaster: After I execute the delete thing by clicking x. How would I redirect to the file. You mentioned a header?
<11> MarkL: no you don't want to meet my dark sicilian side!
<7> I feel though, that even though I am failing, at least I am learning
<10> ratbert90: pastebin the latest you have
<7> and that makes it good
<0> arachn1d: before you get too far along, it would be very wise to read up (google search) on "sql injection"
<7> in #flood ?
<10> ratbert90: pastebin would be better
<5> JAJMaster: I understand I have to put in that extra function. I just don't know it by heart so I left it open like that
<11> ratbert90: just /msg MarkL thats even better then pastebin
<5> JAJMaster: i think striptags or something
<7> heh
<0> arachn1d: it would have more to do with mysql_escape_string probably. In layman's terms, NEVER take user input and shove it unmodified into an SQL statement
<11> k im going to bed
<0> arachn1d: as for the redirect, what do you want to redirect to?
<7> gnight piera
<11> gnite kiddos
<4> night
<3> lig: night, thanks for help :)
<5> to the script so it doesn't have the d=26 for example (in the url)
<4> rames: :D - actually I was saying night to piera
<5> I tried this header("Location: http://$host$uri/$extra";);
<5> (ith the variables set) and i get an error
<5> JAJMaster : Warning: Cannot modify header information - headers already sent by
<0> arachn1d: you can't send headers after you send your first byte of normal data. Why don't you want to use the ?d=25 in your hrefs?
<5> JAJMaster: for some reason I have to click a link twice before it deletes.
<5> JAJMaster: i figured it was because of the url or something.
<0> arachn1d: do you have this script running on a system somewhere I could point a browser at?
<5> JAJMaster: No, sorry :( - all localhost
<5> JAJMaster: How about refreshing the page after it's done?
<0> arachn1d: there is something tickling my brain about that clicking twice thing, but as for the redirecting, I don't see any reason why you would need to.
<12> anyone can tellme whats the regex to find non alphanumeric characters? as '/^[a-z0-9]/' is not working for me, i guess im wrong
<5> JAJMaster: I click the x, the url is redirected to rss.php?d=21, the page doesn't change. If I refresh, it's gone. If I click another link, it directs url to the new id, but yet again, untill I click again it won't change. (because of refresh I suppose)
<13> is there a break method in php? I want if nothing is posted to skip all code and do nothing.
<14> So, I've taken this script from php.net but it gives me an unexpected output ... it's an imap function ... can someone have a look at it for me ?
<14> http://pastebin.com/719964
<0> arachn1d: ahhh, you do realize that you are printing out the record before you delete it? Normally that's a bad idea
<15> Hey guys -- This problem is killing me, any kind of help would be really appreciated. At least once every hour, a user on my php intranet is getting the HTTP headers printed to his browser and then the html source follows. I am not sure If this is a php or apache issue but on apache no one ever had the issue. I have included a sample of the output here : http://pastebin.com/719965. Thanks for any help.
<0> arachn1d: psudocode: while (more rows) { if (delete this row) { execute delete query }; } else { print results }
<5> ah
<14> the result seems to come out without any errors, but it's just that the result is completely unexpected ... :-(
<13> is there a break method in php? I want if nothing is posted to skip all code and do nothing.
<0> cambridge13: http://www.php.net/exit
<4> Cambridge13: http://www.php.net/break
<0> cambridge13: http://www.php.net/continue
<0> does noone look up anything in google or php.net?
<14> Can someone help me with an IMAP problem ... ?
<5> JAJMaster: I probably did some stupid mistake. But here's the new script. (it's broken now) http://pastebin.ca/56129


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#physics
#css
undefined symbol: cairo_xlib_surface_create_for_bitmap
monolithic split gentoo unmerge minimal
apt-get dependtry process_queue
emerge-delta-webrsync eix-sync
Transport endpoint is not connected fusesmb
#suse
#linux
#perl



Home  |  disclaimer  |  contact  |  submit quotes