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



Comments:

<0> stormchase: thanks as well
<1> $result is never defined.
<2> yes it is
<3> A_Jelly_Donut: $result is defined on 43.
<2> $result might be an array instead of an object
<4> however, i have two problems. first off, apache's .var files don't seem to work at all for me - for example, opening the stuff.html.var file works but if i request stuff.html it's "not found"
<0> kog: no, there is just one line in this table
<2> A_Jelly_Donut: cannibal.
<2> Aldi: and?
<3> Aldi: Also, the way you're doing that is unsafe. Lookup "variable binding" in the ADOdb manual.
<4> second off, if i do stuff.php.var?x=y it doesn't see the GET variable
<3> Aldi: It's much easier and significantly more secure.
<5> I have the following: preg_replace('/field\[(.*?)\]/', '(v.FieldId=$1 AND v.Value', $filter); is there anyway to change the v.FieldId replacement part with a v(ctr).FieldId... so each replace would get v0, v1, v2... ? putting ctr++ there marks all as 0's...
<6> better yet, use something decent like MDB2 :)
<0> thanks, cwhiz



<1> kog: yes, and it is good.
<7> can anyone point me in the right direction on how to send an email without it getting rejected as spam?
<3> chris12349: That's really not a PHP-related question.
<3> chris12349: Search Google or Yahoo!, please.
<7> CWhiz: would that be more sendmail?
<3> chris12349: E-mail in general.
<7> CWhiz: I was thinking it was something in the script maybe a header
<7> CWhiz: alright thanks
<3> chris12349: Good luck.
<1> OS7 for me
<1> oops, wrong tab
<8> lol
<4> guys, anyone? :)
<9> Would someone here be able to help me with a php issue I'm having?
<1> the variable should be $_GET['x], is that what you're trying cheater?
<10> webteeth: mabey, there is only one way to find out
<10> heh.. now I see how TML was getting sick of that quit message
<8> cheater: Um... why do you use .var files anyways?
<1> webteeth, don't ask to ask, just ask :P
<4> A_Jelly_Donut yes
<4> Stormchaser: how would you do that?
<8> file.php?blah=x
<4> A_Jelly_Donut: i do know how to use GET vars. it's just that they're not seen when i do that through a var file.
<4> Stormchaser: i'm using a var file for automatic content negotiation (so, multiple language versions of the same file, automatically selected by apache)
<8> cheater: Why don't you use gettext for your translations?
<4> gettext?
<8> yes, gettext
<4> could you elaborate on that?
<10> _('My Text');
<8> php./net/gettext
<10> cheater: php.net/gettext
<11> lol
<8> s/\///
<4> i think gettext is for something else.
<8> like?
<4> i have the same files in multiple languages
<4> file, rather
<12> This may be better for #mysql, but perhaps you guys could help: I parse a mysql dump file to create initial database schema as part of a webapp install process. Some users are complaining that it results in a MySQL syntax error.. and I'm unable to repeat it. Perhaps it's my parsing code or the query? I've posted an offending query + a users error msg to http://pastebin.com/560245
<4> gettext seems it
<4> err
<8> cheater: You could also check the browser's default language and include the language files accordingly...
<0> :-) It's working now, sql statement was wrong. Thanks so far. Now what's the deal with variable binding?
<4> Stormchaser: how would i do that?
<8> cheater: By checking, where the browser language lies in $_SERVER, and use that
<4> Stormchaser: as far as i know, http request headers can specify multiple languages
<6> how is gettext allowed in php, just wondering?
<3> Aldi: Anytime you build a query (or doing a lot of other things) from unchecked user input, you're opening yourself up to being hacked. You should validate your variables to make sure they make sense, and then use variable binding to execute the queries.
<10> cheater: yes, and you should use the first one that the browswer sends
<4> is gettext a unix-only thing anyways?
<13> hello guys
<8> cheater: Indeed so... But explode on ; and grab the first one.
<4> zircu: ah.
<10> that you support
<14> __FILE__ returns the full path, is it possible to extract just the filename?
<4> grabbing the first one isn't good.
<8> MID-Cloud: basename()
<6> MID-Cloud, sure, read manual, basename() :)
<4> it might be es, fr, de and i only have en and de, with en being default. so grabbing the first one isn't good.
<8> cheater: And why not? That's what Apache does,
<14> thankyou :)
<8> s/,/.



<13> mfonda: finding a function isnt always that easy
<10> grap the first one you support, there is also priority flags within that list as well
<4> no, apache has a more sophisticated algorithm. read up in the manual.
<6> mareks, ?
<0> Chwiz: ist there some skript which checks for user inputs? For example that no one enters "; delete from table users; commit" or something?
<13> mfonda: and not everyone always has the time to read the whole thing...
<4> zircu: yeah
<4> zircu: is there really no way just to make php work with .var?
<3> Aldi: There's plenty, and you can also use common sense. For example, do you know of any phone numbers with a " in them?
<15> cheater: You might be able to fake it out with virtual().
<16> CWhiz "1-900-FREE-***"
<16> CWhiz "1-900-FREE-***", only $29.95/minute
<0> jymm: lol
<3> Jymmm: I said "in," not "around," but your contribution to the channel is appreciated nonetheless.
<17> No it's not.
<16> CWhiz 1-900-"FREE-***", only $29.95/minute
<18> What causes PHP error line numbers not to match up?
<17> rixth: The PHP parser ****ing
<4> Charbal,
<4> sorry bad keyboard
<10> cheater: .var is an apache thing you might be able to get apache to make apache recognise those files as php scripts, but that is way beyond topic here
<18> Undefined variable: adHtml on line 42. The actual error is on line 40.
<4> Charbal, "virtual"?
<8> php.net/virtual
<15> cheater: The PHP function virtual(). Performs an Apache sub-request.
<3> rixth: Sometimes PHP can't detect the error right away, because it doesn't have all the necessary information yet.
<18> Ah okay
<9> zircu: PM
<3> Aldi: Here's the part of the manual on variable binding -http://phplens.com/lens/adodb/docs-adodb.htm#execute
<0> cwhiz: thanx so far!! You don't have a link fpr me for such a user-input-checking function, don't you? :-)
<3> Aldi: The question mark sample is the one you want.
<3> Aldi: I don't know of any validation library link off the top of my head.
<0> CWhiz: Thank you so much!
<4> hmm ok, virtual seems interesting enough
<4> any other way you guys would find the default requested language with php?
<6> CWhiz, theres always http://pecl.php.net/package/filter :)
<3> Aldi: There 'ya go.
<8> cheater: I already told you 2 ways to do it.
<4> Stormchaser, yeah.
<4> and thanks :)
<19> good night
<12> what's the best way of distributing mysql schema in PHP (ie. for a webapp install script).. right now, I'm parsing a mysql dump file made w/ phpMyAdmin, but it results in syntax errors for some ppl with older MySQL servers...
<2> tell people to stop using MySQL 3.23
<10> heh
<20> Brice: Best would be not to use PHP at all, but use MySQL tools for that.
<2> exec()!
<10> besides phpMyadmin has a tool to select what format you want it exported as
<21> Dump the schema in 4.0 compatibility mode.
<16> TML how you get a list of factoids?
<21> kog, Tell people to stop using 4.1 too :)
<2> will: tell people to use PGSQL? I'm with you there
<4> hmm so the _SERVER thing would be $_SERVER['HTTP_ACCEPT_LANGUAGE'
<9> zircu: please check your PM
<4> $_SERVER['HTTP_ACCEPT_LANGUAGE'] rather... right?
<4> :)
<2> zircu: don't do it, it's a trap!
<12> TML true.. but I'd like to make a very user friendly install
<10> webteeth: read the instructions when you joined freenode
<15> I usually use listvalues to search them, I think.
<12> TLM a la wordpress
<15> Jymmm: ^^^
<9> ok
<9> I'll ask all of you then
<16> Charbal never heard of it
<9> I just moved my website to a different host and I have a php error on my website
<2> webteeth: no I will NOT go to the prom with you
<9> damn
<20> Brice: That means nothing to me, as I've never seen wordpress. What is "user un-friendly" about using the mysql tools to interface to mysql?
<2> oh wait... different question
<2> sorry, proceed?
<2> webteeth: what's the error?
<9> I don't know if this room is the best place to get help, I'm not that experience with php
<16> Charbal ah, ok
<6> webteeth, probably they have different php versions. try making your question a little more vague


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#qemu
#math
sharedmem buf
nvidea ubuntu sudo command not found
umbutu 6800
#suse
#fedora
#debian
dynip autostart fc5
#web



Home  |  disclaimer  |  contact  |  submit quotes