| |
| |
| |
|
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:
<Zyclops> float(744.82) float(744.82), float(928.82) float(928.82) << doesen't work <kuja> SkramX: http://www.php.net/mail <FenixRF> ok, this is officially driving me nuts. :) <FenixRF> and doesn't make any sense. <FenixRF> if I'm doing :: print "<div cl***=\"poster\">" . AFunction() . "</div>" ... why does it come out as :: Text From Function</div><div cl***="poster"> ??? <Zyclops> http://hashphp.org/pastebin?pid=6256 << can anyone see the corolation? <Zyclops> http://hashphp.org/pastebin?pid=6257 << this one is with the code as well <babo> Hi guys, I'm using the urlencode function from the cli ... but it keeps throwing up T_STRING errors when I try to encode something with a newline in it .. how can I fix this ? <Artnez|afk> babo: can you pastebin the naughty code? :) <kuja> Heh, babo means "stupid" in Korean. <Jymmm> kuja <--- babo <babo> Artnez|afk: I can just paste it here methinks ... it's only one line <kuja> Jymmm: Grr <babo> cat job_description | while read file ; do php -r "echo urlencode('$file');" ; done > job_description_encoded && URL_ENCODED_DESCRIPTION=`cat job_description_encoded` <babo> kuja: ya, I'm in Korea ... it's my pet name for my gf <kuja> babo: Oh? Are you in Seoul? <babo> kuja: Daegu <kuja> Damn <kuja> Too bad, I'm in Seoul. <Kaitlyn> I have roughly 50 checkboxes I want to insert/update in a table, based on the form input. I can't work with the mysql ON DUPLICATE KEY, so what do you guys think would be the most efficient way to manage this amount of inserting and/or updating? <Artnez> what are the chances <dfdfdf> How do install PECL Fileinfo in php <dfdfdf> ? <Artnez> so is like one of you in North and the other South -- and you have different agendas and stuff? <kuja> babo: I predict you are an army guy :P <kuja> But then again, since when did the army start using PHP :) <Artnez> Kaitlyn: checkboxes? Whatever the case, if it's a query issue, check in #mysql <jiggster> ****ing pos glitz... <Kaitlyn> Artnez: but seeing as how i can't use the ON DUPLICATE KEY, it is a parsing issue with php, no? <dexterr> Is this valid: return(($num == $let)); ? <jiggster> wont friggin build <jiggster> build* <kuja> dexterr: Yes. <Artnez> Kaitlyn: no, it's an incompatability with MySQL <babo> kuja: no - english teacher <Artnez> Kaitlyn: PHP just sends the query to MySQL <babo> can anyone help me with my newlines -> urlencoded format <kuja> babo: That would have been my second guess. Only 2 reasons there are English speakers in Korea. Either they're in the military or they're an English teacher :) <Artnez> Kaitlyn: it can send "hey, im a hot mexican belly dancer from india" ... if MySQL accepts that you're good to go :) <babo> kuja: true <kuja> DoDEA graduate. <weasel00> kuja : Mysql mysql-python mysql-devel mysql-server perl-DBD-mysql <-- were all installed <kuja> weasel00: Nothing on the client libraries? It should say maybe libmysqlclient<x>-dev or something of the sort. <weasel00> hmm... <weasel00> kuja: those arent even listed on mysql.com o.0 <kuja> weasel00: Use yum, or whatever the package manger is on Fedora. <weasel00> kuja: am i just having bad luck or it supposed to be like this? lol <kuja> weasel00: Not bad luck, just need the client development libraries. <weasel00> kuja: did a search on yum and didnt return any client dev libs <dfdfdf> How do install PECL Fileinfo in php <dfdfdf> any docs on that <raden> is there a way to make it soo when database information is displayed it can come up in basically a Cel of a table and have a scroll bar ? <arpegius> i'm trying to make an array based on strings between two tokens. my beginning token will always be ABC, but my end token will be unknowable-text-before XYZ. how do i account for that unknowable text? <DJTrey> raden....have u tried doing something like this: <table><td><?php (mysql code here) ?></td></table> <kuja> arpegius: preg_match('/ABC(.+?)XYZ/', $str) <kuja> php-bot: tell DJTrey about u <kuja> arpegius: preg_match('/ABC(.+?)XYZ/', $str, $match); // need the $match too <raden> DJTrey, I want a scroll bar though Like have a page that displays PART # | Description | Model | Price <raden> and have it be likee 600 pixels wide and 300 high and then have is scroll cause otherwise some crap will return 40 pages worth of info <raden> DJTrey, im dealing with a lil over 30,000 parts <arpegius> kuja looks feasible. thanks. <jonez> raden, you *could* do that, but you could also use some kind of paging routine (I have PEAR::Pager in mind) that will break things down into reasonable pages for you. <Zyclops> http://hashphp.org/pastebin?pid=6257 << hey i'm doing a comparison between two identical doubles and php says they are different. attached is a vardump of about 100 examples and the code below. It's very confusing.. any ideas? <sketch|work> in php 4 can you default referenced parameters? ( function foo (&$bar = null) ) ?? <rj000> how do I require a character cl***? this is returning everything, but I just want urls that are images "/http:\/\/.*[\.jpg|\.jpeg|\.gif|\.png]/" <kuhwallskee> ok.. I'm not sure what I should be looking for... I'm looking for a function that takes a string as an argument, and that will search the string and return something if it matches.. for example.. an email. <kuhwallskee> what do I need? <CryWolf> kuhwallskee: exact match, or pattern? <kuhwallskee> pattern. <rj000> kuh: preg_match <kuhwallskee> one of the preg functions? <kuhwallskee> ok. <avar> if you want to match email addresses YOU DON'T WANT REGULAR EXPRESSIONS <kuhwallskee> why is that? <rj000> avar, do you know how to require a character cl***? <rj000> avar, what else is there for matching email addresses? <avar> rj000: have you read the relevant RFC? <rj000> nope <avar> then do so <kuhwallskee> ok so do I or do I not want to use regular expressions? <avar> a conforming regex for matching an email address is several pages long <CryWolf> kuhwallskee: a regular expression can easily approximately match an email address, at least well enough to flag invalid ones. <kuhwallskee> well all I'm doing is pulling it out of a data payload of a snoted packet? <avar> CryWolf: how do you propose flagging invalid email addresses with an approximation of a correct match? <CryWolf> avar: by seeing if it matches. the patterns in common use - which are not three pages long - are good enough. <CryWolf> a valid email address is anything that a mail server accepts <avar> and a server should accept what the RFC considers valid <kuhwallskee> ok well I'm gonna be capturing someone@asdfasdf.com <kuhwallskee> and that's it. <Jymmm> avar (I wouldn't go THAT far) <avar> a regex that tells you if an email address is valid is several pages long because regexes are not the right tool for that particular job <CryWolf> avar: name the right tool, then. <rj000> avar: then what is the right tool for that <kuhwallskee> please.. <kuhwallskee> hehe <avar> a parser that can handle irregular patterns? <CryWolf> kuhwallskee: preg_match will work.. <avar> a simple state machine? <rj000> you don't know the answer? <kuhwallskee> ;lksdjfglkdsjg <kuhwallskee> Crywolf alright.. thanks <babo> has anyone used the urlencode() function ? <CryWolf> babo: many people have. <avar> really, I thought I was the only one <babo> CryWolf: I'm using it at the moment but it's throwing up T_STRING errors for apostraphes. I checked php.net and it said to use rawurlencode instead. But it doesn't make any difference <CryWolf> babo: perhaps you have a different problem, such as using single quotes inside of single quotes. <babo> Crywolf: I'll post my code here if you don't mind ... it's only two lines <kuhwallskee> so essense.. why sin't preg_match("/*@.*.com/",$clean_msg["sender"],$email); not capture someone@someone.com? <babo> cat job_description | while read file ; do php -r "echo rawurlencode('$file');" ; done > job_description_encoded && URL_ENCODED_DESCRIPTION=`cat job_description_encoded` <babo> CryWolf: I'm also losing all of my newlines for some reason ... :( <MapLappy> kuhwallskee, go and lookup how regexp works <MapLappy> its not the same as dos <CryWolf> babo: bash is probably replacing the variable. Why not write a short php script that does that? It'll be more predictable. <babo> CryWolf: I wish I had done that now from the start, but the bash script is fairly large at this stage <CryWolf> babo: if $file is a bash variable, then you're going to need to find a way in bash to escape the ' <babo> CryWolf: I want to get the hang of bash ... but it's unbelievably awkward and tough to get the hang of. It can take a few hours to get a line that works properly sometimes <babo> CryWolf: the statement itself works fine, it's just the apostraphe and newlines that are broken <CryWolf> babo: yes. and what I say still applies. <babo> CryWolf: I've tried \' in the file but it doesn't work either <CryWolf> babo: rewrite the script in a scripting language. It'll be much faster to do. <callipygous> why is php giving me bogus error line numbers? <CryWolf> callipygous: I'm not familiar with that error. <babo> CryWolf: But this is the last bit ... :-( ... I hope <kuhwallskee> ok now I'm really curious.. I'm using preg_match, and I get an error saying nothing to repeat at offset 0.. If I give pregmatch an array for matches.. do I need to supply an offset? <kuhwallskee> shouldn't it start just filling at [0]? <callipygous> CryWolf, it says "some error on Line 20: <callipygous> when infact I'll find the error on line 280 or line 5 <CryWolf> callipygous: Oh well, in that case...I don't know. <callipygous> oh <chicken-dance> I have a PHP script using GD, i allocate a 500x500 bg image, and on it, i use imagecopymerge to put jpg and gif files in it, but when the images load, they sometimes load with loss of color. <chicken-dance> what could be done to resolve this <^scott^> Hi, I'm trying to use the php mail() function with Sendmail and trying to explicitly set the mailq directory with a Sendmail option. The directory is perm 700, owned by root. But, the Sendmail executable is setuid root, so it should be able to chdir into this directory. Sadly, though, I get permission denied can't chdir errors. Does anyone see what I'm missing? <freeone3000> Add a 11 to the perms? <CryWolf> ^scott^: if it's an error from sendmail, try #sendmail <jaeek> i want to use a DB column for storing binary data (large images/videos)... any suggestions on a specific DB? <CryWolf> jaeek: yes. don't do it. <jaeek> CryWolf, whats the problem? <CryWolf> !tell jaeek about store binary data in rdbms <jaeek> fair enough ;) <jaeek> but i still want the convinence of not having to muck with files <kuja> jaeek: You're... willing to make that sacrifice because you're incompetent? <CryWolf> putting stuff in a database is even less convenient. <jaeek> kuja, no... because the it is crumbersome for the end users to manage file permissions <jaeek> s/the// <CryWolf> jaeek: you would need a separate retrieval script which can be called to output the file when the browser requests it. And hope it's not larger than the memory limit. <kuja> jaeek: What do the end-users have to do with permissions? And if you're worried about permissions and are giving away access to your filesystem, might as well host your server on Windows. <kuja> That way you don't have to worry about permissions <jaeek> i mis-stated... not the end users, but the users of my app <jaeek> the people who are going to install this thing <kuja> The users of your app will stab you for storing binary data in an RDBMS :)
Return to
#php or Go to some related
logs:
SetStdHandle CONOUT printf how to change eggdrop charset xorg +XFree86-DRI messing #ubuntu #linux osdev #css ubuntu +wget +no version information available #css autostart kde suse10.0
|
|