| |
| |
| |
|
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
Comments:
<0> chovy: I'm not stuck with anything - if only I were.. The problem is that people using my systems could use ISO-XYZ-Something, EUC-JP og what ever - and PHP dosn't really support anything besides ISO-8859-1 or UTF-8 properly <1> Jemt: your app, db, and server all need to support the same encoding. <2> yep <1> if the common denominator is iso-8859-1, then that's all you can use. <2> otiuk, give it write permissions for "others" <2> to the file <0> chovy: Oh, so it dosn't make sense to ie. use UTF-8 on the server and ISO-8859-1 on the DB? <3> i get "You are not authorized to view this page" on IIS when installing PHP <2> Jemt, You'll get strange chars... <2> I vote for utf-8, unless your server do not allow it <2> like mysql 4.0 <1> Jemt: utf-8 is a broader encoding, so it might work db(8859)->apache(utf-8)... but you can't store other encodings in your db. <4> ? <2> chovy, yes it does work that way <4> set names 'utf8' in db <2> I have a latin1 db and utf-8 in apache. All other db's are utf-8
<0> Oh, great. That makes sense. But the encoding on my files matters too, right? (my stuff.php files) <4> danf_1979: do the query: mysql_query('SET NAMES \'utf8\''); <3> any idea? <2> did you enable php in apache config file? <3> im on iis <1> Jemt: i think so...not sure about the actual application logic code. If it's content (like xml) then yes, definitely. <2> oh, right <2> :) <2> well, on iis config file? <2> lol <3> dunno how / where <3> ? <2> then it's a great time to go for apache... you'll have a great community support :D <0> chovy: Well, I was refering to my *.php files (my logic) <1> Jemt: i'm not sure... on that one...since your php is not being displayed to the browser. <3> danf_1979: i can't its a dev system to mirror the production which has to be IIS! <1> unless you're writing comments in japanese or something <1> Jemt: there is a command line tool to convert files <1> fileenc or something <5> danf, if i put the file empty in the directory of the script... and run it.. it will write... but if i set fopen to x+ then it says it can't create it :/ .. and the directory is writeable to ALL (777) <0> chovy: Well, it matters if you use special characters in your code - ie: echo " 100.39"; <2> that little billy making ppl use his server, well ok... maybe there is a iis channel here <6> Andy298, read the INSTALL file in the php distro for how to install on IIS <1> Jemt: yes...but what about "echo $foo" and $foo contains special characters. <2> special chars like...? <1> arabic <0> chovy: Depends - does $foo come from a database or is it something like: $foo = " 100"; ? <7> ASCII RULES! <0> chovy: It's probably the database's encoding that matters if so <1> Jemt: no...from the db/user input. If you want to have UTF-8 in your code, then you have to make the files UTF-8. <1> Jymmm: we lucked out on that one. <8> hello <5> hi <2> Jemt, if you decide to use ISO-8859-1 you'll be seeing a lot of strange chars on output <0> chovy: Yes, makes sense. But if $foo is something like : $foo = $query["data"]; then $foo will contain data encoded in what ever the database is using, right? <2> even if your db and apache are on iso <9> in a static cl***, with all static methods, it makes sense to make a db connection in EACH method,.. since the object is called and destroyed after method termination anyway, correct? (if the methods all need a db connection) <2> yes, but you could use something like this <0> What will $foo contain in my example? Data encoded in what ever the php.ini says or what the database settings says? <2> htmlentities($clean['user']), ENT-QUOTES, 'UTF-8'); <10> is "while(list($key, $val) = each($array))" faster than "foreach($array as $key => $val)" ?? <9> wrs use the foreach construct <9> readability is usually preferred. and if php is intelligent enough, it will optimize to quickest access method anyway. <9> the Zend optimizer i mean. <10> i do, i just noticed in the phpBB source they seem to go out of their way to use while() <2> I like foreach <11> wrs: phpBB should NOT be where you take your coding standards <9> lets not bash ;) <6> phpBB is horrible! <0> Hmmm .. <12> HARRIBLE! <10> hehe <9> why don't you make a product that's that successful, then speak again... <6> ahh Jax are you a phpbb developer? <12> OMGZOMG DIS PHPBB! BAD BAD BAD BAD I HATE YOU DIE DIE DIE DIE <9> it's like the most popular forum on earth. <13> Personally I prefer SMF. <9> no, i have nothing to do with it, nor have i ever used it. <11> Jax: i've seen PLENTY of apps that successfull, which have wonderfully secure and proper code
<0> danf_1979: So the htmlentities will return my data in what ever encoding I specify? Are you sure it takes other encodings then UTF-8 and ISO-8859-1? <6> well then Jax, when you use phpbb make that comment again <9> yeah but have you made any of them? <12> I like vbulletin <12> it's neatly organized <6> I use vbulletin <9> it's just not worth bashing - enough said. <9> get back to work. <12> yet not too hard to make hacks for <12> OMG! YOU USE VBULLETIN!?? BAD BAD BAD BAD BAD BAD DIE DIE DIE <11> i have nothing to get to work on <9> maybe the code isn't great.. but maybe the person who started phpBB wasn't thinking it would become so popular.. <14> migs: *blink* <6> uhh Jax <9> so maybe not everything is perfect <9> who cares <2> take a look at the charsets: <2> http://cl2.php.net/htmlentities <6> they did a complete code rewrite for phpbb2 <13> I dont understand how vbulletin is fast. It uses literals for array keys. $array[key] instead of $array['key']. Or at least the last version I looked at <11> Jax: regardless, he should have written it properly... not like crap <9> maybe at the time, foreach didn't exist, or he didn't know of it.. who knows <9> phpBB is like SO old <14> Wilik: You mean phpbb3 <9> is that while(list() thing still in phpBB2 ? <6> phpbb 2 came out like 2 years ago <11> foreach i think has been arround since..... php3 <9> or 3 or whatever <9> well so has phpBB <6> foreach has been part of php since like php3 <15> No, foreach was new in 4. <2> phpbb is bot's favorite forum <2> they even post a lot! <9> anyway, what are we arguying about ? <6> !+phpbb <2> and is no joke <11> and php3 came about 20th of october <6> lol <9> back to work with y'all <6> anyways <6> phpbb isnt the most popular forum software, vbulletin is <11> heh <11> i dont see as many vb's as phpbb's <6> thats becuase vb costs money <6> but as they say, you get what you pay for, right? <2> vb's is used on medium/big projects <2> Yes, that's why I don't like 0.0002 dolar per year webhosting <6> http://www.big-boards.com/ <11> Wilik: i disagree in certain places.... <6> phpbb is number 1 <6> but most of the other 'large' sites use something else <7> phpbb is number 1 in security exploits <16> $dji <16> sry, wrong window <6> Jymmm, thats true <15> Heh. phpBB gets exploited so often I ran into a random guy at the bar last week who runs a phpBB that got hacked. <6> Jymmm, again that falls under poor coding standards <17> Hello! <2> yup, but *very* often are the plugins who are insecure... Kiddy designed plugins = danger <18> fudforum was created by ilia, a lead phpdev developer... it'ts fast and efficient <17> i'm having some throuble with LDAP (ldap_add, specifically), it doesn't add the new uid. buf if i create the ldif by hand with the same content, it works... <2> "SELECT * FROM table WHERE id='".$_POST["user_input"]."' "; <2> great way to get problems <19> danf_1979, these days, also mysql_real_escape_string is must <2> yes it is, ofcourse <6> Ashura, what exactly are you feeding to ldap_add? <2> htmlentities too <18> (int) as well :) <6> Ashura, it should be $ldapconn_object, "dn", $info_array <6> i.e. <2> is_numeric, ctype_alnum, etc... the are many nice gifts from php.net <2> :) <17> Wilik, i copy'd the example from the doc page, using the type conversion with the numbers
Return to
#php or Go to some related
logs:
Circular Dependency +kernel +panic arris rndis #fedora #fedora #linux remove root password ubuntu bind windows key hl2
#python #gentoo expat-compat + suse
|
|