| |
| |
| |
|
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> JeeHoover: No, it just means don't *OUTPUT* anything until you've decided whether or not you're going to redirect. <1> ahh ok <0> JeeHoover: Because it doesn't make sense to output if you're going to redirect. <1> gotcha <1> true <0> So you'd be building an output buffer and then throwing it away. <0> Better off to just fix the logic. <2> Is there a way to alter the output of the HTML Headers? My problem is that after the headers are sent, 2 CRLFs are sent, then the php output. according to the HTTP 1.1 standard, only one CRLF will be outputted.. and im working with a webapp that strictly follows this <2> s/HTML Headers/HTTP Headers <3> does anyone know a sane way to strip accents, umlauts, etc? i.e. convert all to A, etc. I mean, without listing every single possible replacement by hand. <3> emostar: the standard requires a blank line. that's two CRLFs. <4> damn there are a lot of bans in here <3> emostar: anyway, if there would be one too many, all binary output from php would be broken - which i would have noticed, i guess. <5> how do you add a table within a table on phpmyadmin? <2> Duesentrieb: Duesentrieb: the standard clearly shows one CRLF and php puts 2 CRLF's tahts 2 blank lines <3> Braz: ther'S no such thing as a table within a table.
<0> emostar: The HTTP spec absolutely does *NOT* say only one CRLF will be output. <6> emostar, check again, there aren't two blank lines unless your script is outputting one more before the rest of the content <5> Duesenblabla, i'll post a screenshot of what I mean <3> emostar: one CLRF to finish the last head. one immediately following that, making a blank line. then output follows. <0> emostar: There are always two. One following the last header, and one immediately after. <2> TML: then what does this mean? http://php.pastebin.com/569507 <0> emostar: Read section 6 of RFC 2616 more closely. <7> woot, ween <5> oh, never mind: I know what it is <2> TML: but PHP is outputting 3. one after the last header then 2 blank ones <5> lol <0> emostar: PHP isn't outputting 3. Your code is generating one of those. <6> emostar, that's a script error or you have one screwed up php binary <0> X-Powered-By: PHP/4.4.0-4 <0> <!DOCTYPE <3> emostar: my guess is that you have a blank line at the top of your file, before the <?. <8> i have an echo "<img src=blah.jpg>" ... i need to watermark images on the fly... i have written a function that returns imagejpeg, but i cant figure out how to push it through to the browser (where the img src is) <0> irssi trims blank lines. Very clever. <8> _thom_, nice <2> TML: no blank line before the <?... <8> TML, then you couldnt write your l337 scritz with blank lines <0> emostar: That's not the only way a blank line can be output <3> Ween: src="imagemaker.php" <6> emostar: are you calling header() at all? <3> Wenn: in there, do your magic, then print $data; remember to set the content type. <0> emostar: Do you have a URL that demonstrates the problem? <8> Duesentrieb, so i could ... <img src=im.php?originalfilename=something&text=something> <2> ds-: yes, one header() then one echo <8> Duesentrieb, that seem about right to you <2> TML: its an internal url <0> Ween: You REALLY should quote attributes. <8> TML, i do, i was shorthanding <9> unquoted attributes should be a parse error <6> emostar: does it end with an "\n"? <9> IIRC, they are in XHTML <3> Ween: yes, that's the idea. make sure people can't do bad things by supplying naughty filenames to that script, though. <0> emostar: Pop over to www.freeshell.org, sign up, put some code out there that demonstrates your problem, and give the URL <8> Duesentrieb, i would supply the filename out of my db myself, they couldnt trix it <2> ds-: no header("Content-Type: text/plain"); then later on an echo "0"; <8> Duesentrieb, im gonna go try that, brb <10> "An extended ZIP+4 code includes the five digits of the ZIP Code plus four more digits which allow a piece of mail to be even more accurately directed to a very small geography." <3> Ween: people *do* look at the source code. people *will* try to hand-craft parameters to p*** to im.php <8> Duesentrieb, ok <0> emostar: By way of demonstration that this is *NOT* a PHP bug, check http://hashphp.org/~joey/i You'll see there are precisely *two* CRLF between "X-Powered-By: PHP/5.0.4" and "<!DOCTYPE html..." <3> Ween: never trust the client. <7> like to print the source of im.php itself <6> emostar: can you pastebin the code? <8> Duesentrieb, heh <7> or any other php files etc <11> TML: They are out in full force tonight! <7> I wouldn't store the images in a DB by the way <7> if that was the Ween plan <7> 'cause it'll be ****-slower <0> !tell Ween about store binary data in rdbms <8> i dont store binary data <8> at all <8> ever <6> !tell ds- about store binary data in rdbms <3> Ween: except images?
<7> no, ween is just getting the filenames from there evidently <8> i had to take over a db with blob once... it was a nightmare <8> Duesentrieb, no, the images are in the filesystem <0> Wise man. <8> Duesentrieb, i just store the filename in the db to ***ociate it <7> so don't let them gank a file that's not an image you're permitting <7> was the point <0> Learned from someone else's mistake. <2> Fixed it... in one of my headers there was a blank line at the bottom of it. ugh.. thanks a lot for helping me find it! <0> emostar: To save myself that kind of agony, I generally don't include a '?>' in my code. <0> I let PHP figure it out when it hits EOF <2> TML: yeah.. i just leave it there since my IDE adds it.. never had a problem, but this specific app is picky about where the data starts <3> xml parsers are know to be picky about that ;) <1> is session_start(); considered sending header information? <0> yes <8> Duesentrieb, cool, that worked great .. now i gotta figure out how to change the size/location of the text on the image <12> Hi. I looked but could find the documentation but couldn't find it. I have n input fields which are submittet using POST. They all have same name, but with a unique number. Somehow I know it's possible to get an array from some superglobal variable <0> burgermann: php.net/faq.html <12> TML, thx <1> otherwise how am I supposed to set $_SESSION stuff wtihout session_start()? <0> JeeHoover: The idea being that if you're setting something in the session, you probably shouldn't be redirecting. <1> im getting values from the session variables <13> JeeHoover: session_start() is a header yes, because it needs to set a cookie and request for it. <13> Well, set it, and request for it if it's set. <11> !+go <14> [GO] Gross Overgeneralization. Everything that we tell you in ##PHP is what we consider "best practices". Of course, only YOU know your own requirements, so you may feel you need to do something we told you not to. Just don't say we didn't warn you. <13> session_start(); $_SESSION['foo'] = 'bar'; header('Location: http://your.site.com/page.php'); // make sure page.php also has a session_start <1> it has <1> but i thought you couldn't session_start(); before a header() <13> http://xs58.xs.to/pics/05491/support-vowels.gif -- Interesting, we should add this to the 'enter' factoid... :) <1> it also appears <1> Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /Users/callipygous/work/ANTA/site/includes/functions. <15> JeeHoover: that doesn't have anything to do with sessions <15> JeeHoover: you'll need to fix that warning before your header() works. <16> i have a long-executing php loop (sending a newsletter) ... and i get a timeout error after 3 or so minutes....what can i do? <15> set_time_limit(), make sure you're not exceeding memory, and ignore_user_abort() <1> fixed it, it works <1> but is mysql_close90 no longer used? <12> I've supposely posted a array from html using <input ='text' name='name[]'>. How do i recieve that array?. Php documentation just says an array is sent to the page defined in the form action ??? <16> Julian|Work, is that to me? if so, thanks! <15> mysql_close() is fine. It looks like you p***ed an invalid argument to it, so it can't close the database. <15> jcurry: yeah <16> Julian|Work, thanks a bunch! <15> Yup <17> hi everyone, is there a way to turn this back into a date and time: 1140185164 <18> how do I make my table borderless? <19> foreach ($hash as $key => $value) { <19> $new['key']=md5($value); can anybody tell me why that keeps giving me a error? <20> you have a closing bracket? <19> Ya. <21> whats the error? <19> Warning: Invalid argument supplied for foreach() <0> whiteline: $hash isn't an array <0> Also, when you fix that, you probably wanted $new[$key], not $new['key'] <0> !tell vaxen about g8 <0> mxktmdude: php.net/date <18> ? <0> vaxen: Go look at your private message from php-bot <18> thanks <22> how can I print out the size of the file thats being viewed? <?php $filename = '?'; echo $filename . ': ' . filesize($filename) . ' bytes'; ?> <8> thanks all, goodnight <0> dbe: I don't understand your question. <20> looks like you answered your own question <22> TML, well, say that i'm in /www/index.php and /www/foo.php how can I print out the file size in both of them without specify their filenames in the $filename variable? <23> does anyone know of a .csv chat site on a irc thank you <0> dbe: take a look at a phpinfo() page <0> webdesign: A *what*? <11> webdesign: why, in, gawds, name, would, you , want, something, like, that, for? <22> TML, why? <0> whiteline: No, but I'd prefer if you followed our guidelines and asked me before you sent me a private message. <0> dbe: Do it, you'll see why.
Return to
#php or Go to some related
logs:
gparted unalocated MUGWABE ubuntu i865 patch 3com 3c905cx fc5 driver qmail warning: trouble opening remote #css yum + No Match for argument: dhcpd nec multisync 75 ubuntu Digest verification failed gentoo snd #lgp
|
|