« first day (1167 days earlier)      last day (3796 days later) » 

12:00 AM
@y451n and is the column type a varchar or text?
 
@PeeHaa: See utf8mb4 character set, since mysql 5.5 dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
 
@RonniSkansing varchar(255)
 
@y451n that is only the collation, not the character set. collation influences sorting and searching, but is not the issue you describe.
which character set are you using?
 
@hakre hmm where can I see that, sorry kinda new... :(
 
no problem, you have character set and collation. there should be some info next to collation.
I don't know from top of my head for phpmyadmin, but that is per table and also per column.
 
12:03 AM
@hakre Yeah, but you still have to set up some awkward non standard thing for it to be able to truly hold utf8 characters.
 
Was dis??? PHP?????
:P
I hate stuff being translated in Dutch. It always looks retarded
 
Jay
hey guys
merry christmas
 
@PeeHaa haha ;p
 
Jay
I have always wondered if whatever server your running PHP on the chmod() function will always work?>
 
12:05 AM
lolwut
@y451n try to use utf-8
 
@Jay - only if the account running the PHP script has permissions to chmod the file in question
 
188
Q: UTF-8 all the way through

mercutioI'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and...

 
@y451n i tested in 5.5 and 5.6 both databases set as utf8_turkish_ci. Tables are also set utf-8_turkish_ci and using innodb. I could not reproduce the transforming ş...
 
@HamZa utf-8 instread of utf-8 turkish?
 
it just works with np
 
12:06 AM
@RonniSkansing so at your side it works?
 
@RonniSkansing meh
 
Jay
@MarkBaker but it would basically mean that all hosting accunts can do it ? I mean shared hosting can do it right because they have permisson to the root of their hosting?
 
@RonniSkansing thanks though, so weird
 
@y451n are you on linux?
 
12:07 AM
@RonniSkansing how do you set a table to utf8?
@RonniSkansing maybe I'm doing that wrong?
 
@Jay I would never trust some crappy shared hosting to do anything well
 
Jay
@y451n u can set it as an attribute in PDO
 
@Jay pdo? :P
 
Jay
@PeeHaa do you think it is a good idea to change the file/folder permissions within the PHP coding or let the uer do it manually?
 
@Jay - you'd imagine so, but if you're creating folders via ftp then the ftp account may not be the same as the webserver account
 
Jay
12:08 AM
@y451n how are you connecting to the db?
 
@Jay it's aspx ;p
 
Jay
o ok
thought this was aphp room LOL
 
@Jay via mysqlcommand command = new MySqlCommand(sql, connection);
 
@Jay please make sure you database and tables are set to utf8_turkish_ci
 
@RonniSkansing do you know where i can edit the table charset?
 
Jay
12:10 AM
@RonniSkansing pardon?
 
@Jay wheps wrong ping
@y451n in phpmyadmin?
 
Jay
:)
 
@RonniSkansing yes :)
 
Jay
But Ron what do you think about my situation?
 
@y451n you could have googled that.. but click a table, click Operations
 
12:12 AM
@RonniSkansing ye googled and found it haha thnx anyways
 
@PeeHaa yes, charset utf8in mysql is western centric. it however does serve a purpose.
 
@Jay merry xmas, i do not fully get the question
 
Jay
I have builta cms
I have build an installer
But you havw to manually change the permissions of files/folders
 
@y451n what is the default charset of the table and what is the default charset of the database?
 
Jay
I was think of programming thatinto the installer
@RonniSkansing what do you think are the pros and cons?
 
12:13 AM
@Jay this is normally very safe, because the sysadmin needs to decide file-rights.
 
@RonniSkansing meh not working, so weirddd
 
Jay
Will it give errors if they don't have the permission access to chmod() ?
@y451n are you sure its the db and not the website?
@y451n no idea what your doing btw
 
@Jay just make sure to set the permission right
 
@Jay document which folders need to have which access rights and for what reason is normally most what is needed. often missed btw.
 
@Jay trying to write turkish characters to the database,,, every character works except the ş
 
Jay
12:16 AM
@y451n does this help? forums.asp.net/t/1073595.aspx
@hakre @RonniSkansing So basically it is safe to do this?
 
{| align="right" cellpadding="4" style="border: 1px solid #aaaaaa; margin: 0 0 10px 10px; padding: 10px; font-size: 36pt; line-height: 36pt; text-align: center;" | Ş | ş |- | Ş | ş |} Ş, ş (S-cedilla) is a letter of the Azerbaijani, Turkish and Turkmen alphabets. It is also used in the Roman alphabets of Tatar and Crimean Tatar. It commonly represents /ʃ/, the voiceless postalveolar fricative. Romanian Ș, formerly Ş is a letter of the Romanian alphabet. In early versions of Unicode, Ș (S-comma) was not present in the Unicode Standard. It is also not present in the Windows 1250 (Central E...
 
WTF lol
 
Jay
No errors will appear if the permissions don't work?
 
We are getting rid of it and hhvm implements it :)
 
@Jay define safe. what normally is safe is that the application to install has as little rights as necessary to system resources.
 
12:18 AM
@Jay no, saw that too and tried it. that's only working on a sql server from ms
 
@PeeHaa a propos HHVM, I have problem with require_once, it always says the files do not exist. it's with PHP's include path. any idea?
 
Jay
@y451n Wha about connecting like: connectionString= Database=test;User Id=;Password=;Charset=utf8; ?
 
@Jay hmm nice one, let me check
 
^ good point, wanted to ask that next, what is the connection charset and what is the charset your application uses?
 
Jay
Could really do with someone else programming my cms with me
 
12:21 AM
@hakre Other than use __DIR__ relative paths nope
 
@jay <3
@Jay charset utf8 did the trick (in the connectionstring)!!
 
Jay
awesome
 
thnx!!! @Jay
 
Jay
thats what I meant when I said PDO attributes. Because thats set in the connection
 
@PeeHaa I can not use __DIR__. It's about require_once 'PHPUnit/Autoload.php'; which is used in a TestCase and I thought that travis takes care of that.
code in question is require_once 'PHPUnit/Autoload.php';
 
12:23 AM
@hakre Are you using the travis or composer provided phpunit?
 
17 mins ago, by HamZa
188
Q: UTF-8 all the way through

mercutioI'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL and...

 
@Jay oh haha didn't know what pdo meant
 
Good evening
 
Jo
 
good evening Mr. Ferrara.
 
Jay
12:24 AM
hey
 
how is everyone today?
 
Jay
good man
just wondering if there is a better way to do this: substr(sprintf('%o', fileperms(DOCUMENT_ROOT.'temp/cache/')), -4)
 
in a good mood actually. I finally have some days off from work which just feels great :D
@Jay there is. SplFileInfo
 
Jay
@hakre outstanding man thankd alot
 
@Jay it basically is the same but encapsulated. See the examples there.
 
Jay
12:29 AM
looks really good
 
and how are you @ircmaxell? I've seen you're switching jobs?
 
@hakre will be in 36 days, whether I like it or not :-P
 
@ircmaxell :), good luck for finding the next job and be prepared. I kinda switched in november but it took preparation of about 2 months. The months have been kinda rush since then.
 
thanks!
 
@ircmaxell working, but having a great xmas time. I wish you the best for the new year
 
Jay
12:45 AM
why do I sometimes see this error on WAMP?
Error: [8] PDO::__construct(): send of 5 bytes failed with errno=10053
 
and goodnight
 
Jay
night @RonniSkansing
 
1:04 AM
 
1:54 AM
I finally know (100%) the difference between the Mediator and Observer design patterns thanks to @brandonsavage's latest book \o/
 
Jay
@hakre so its a persistence error?
 
Hi room, I am fairly new to php and I wanted to know if $result in mysql_fetch_row($result)is predefined.
 
@webarto
The most awesome webservice ever is back again (in alpha)! http://bit.ly/1cSxhjO #douchey #hipsters #FlareGramster
@MichaelFalciglia What does "predefined" mean?
 
2:14 AM
maybe I mean reserved :)
 
What does reserved mean?
 
@PeeHaa Let my reask my question...
 
Please do
 
@PeeHaa I have a script with this. $rating = mysql_fetch_row($result);
I did not write the script
I just want to know if that mysql fetch is setting $result as a variable
 
It's not setting $result it is setting $rating
Also in related news, see the red warning on the manual page about the function you are using: php.net/mysql_fetch_row
 
2:21 AM
Ok, but $result is not found anywhere else in the script, so that is why I wanted to know what the reason for $result being in the fetch was.
Just trying to understand more than anything, but thanks for the link
 
Are you sure there isn't some require, require_once, include, include_once somewhere?
 
So basically $result just means the result from the sql query?
 
Yes correct
See the examples on the linked manual page
 
I searched the entire script folders locally and found so instances of $result
so that is why I thought maybe it was a predefined function
 
Aaah nope. It has to be somewhere.
How do you search for it?
 
2:25 AM
maybe that is why this script does not work...lol
 
What error do you get?
 
syntax
oh no
actually last night before I start messing with it I did not get something regarding a variable
either way thanks, I just wanted to rule out if it meant something else
 
Can you post the exact error you get and the lines the error is on?
 
oh I think I just found it, it was misspelled $tesult
 
Good :)
 
2:37 AM
@PeeHaa I got a question, I am trying to figure out how to get an average product rating on the script I was just asking you about. I have come up with this...
$result = mysql_query("SELECT AVG(rating) FROM cashbackengine_reviews GROUP BY retailer_id WHERE retailer_id = '$storeid'");
$rating_for_page = mysql_fetch_row($result);
$rating = $rating_for_page[0];
 
And what is the question?
 
If that is correct, how would I echo the $rating by the $storeid
 
When in doubt use php.net/var_dump to see what is in some variable
 
2:55 AM
Hello everyone.
Does anyone know any good SQL tutorials for SQLite or SQLite2?
 
3:43 AM
I have 3 projects on git. Each has different build process. Now I want to deploy it all together. The tool should build first and then using the build artifact it'll package it and put it a separate folder. What type of tool is good for this? I am preferring python. The projects are written in Python.
 
@shiplu.mokadd.im Right place to ask this or? I dunno sorry XD
 
@Loper324 I can ask main site. But I need know what are these tools called so I can first search them.
 
 
1 hour later…
4:54 AM
@joewatkins : how do i change my system temp file to another directory for php while using
"sys_get_temp_dir()",means how should I overwrite that function ?
 
5:12 AM
@jerrpham : do u know , how to change system temp path for php ?
 
5:45 AM
@CvetomirLazarov have you never heard the phrase "you should favor composition over inheritance" before ?
also, FYI, model is not a class
@ircmaxell some days the internet just wants to make you sad
 
6:09 AM
@Naro I didn't try
but If you want to change it for session, session_dir in php.ini, or for upload is upload_tmp_dir
 
@jerry : yes,I have did it... but still some temp files with php prefix are generated in /tmp directory
http://stackoverflow.com/questions/20580383/centos-tmp-directory-has-php-file-with-large-size
 
@Naro, How about create new directory somewhere and link it to /tmp ?
 
is it possible ? if it how ?
 
assume you want your tmp folder in your /home/user, let do:
cd /home/user
mkdir mytmp
mv /tmp tmp.bak (if you dont want do remove current /tmp)
ln -s /home/user/mytmp /tmp
do it as root user or sudo
 
okay
so problem temp size issue will not be more?
 
6:23 AM
I have no idea about php*** files, it could be generate by your application, let read it's document
It just resolve the /tmp to another location
 
okay...thanks...for this solution..i will tell my developer to do it...
 
Im looking for symfony2 chatroom on stackexchange but there is no one :(
 
6:48 AM
Morning
 
morning
 
@MichaelFalciglia Note: mysql_* is deprecated use either PDO or mysqli_* API with prepared statements. For reference use php.net
 
hello...
 
hey
why does this not work?
$String = "JB,JVB,JVBB,JVGB";
echo explode(',', $String);
 
what "not work" means?
 
6:57 AM
i get Array echoed
 
good mornings
 
@EliteGamer you need to do print_r($String);
 
:D
 
Ok, let me try that
@dskanth $String?
 
@AlmaDo Morning
 
6:58 AM
or the array?
 
@Leri hey, @Leri - how it goes?
 
@EliteGamer OP would have to find it out themselves
 
OP?
 
"original poster"
 
@EliteGamer $String = "JB,JVB,JVBB,JVGB"; print_r(explode(',', $String));
 
6:59 AM
@AlmaDo Pretty well. Messing with tcp on Android.
 
yea
 
How're you?
 
moin
 
@Leri finished my ios app :p
hello, @JoeWatkins
 
@AlmaDo Have you already released one?
 
7:00 AM
@Leri well.. TCP is the same on android (:
 
@dskanth then why does this not work?
`<?in_array("VB", $GamesArray) ? ' checked' : '';?>`
Games Array is the array that is gotten out of the emplode
 
@Leri not yet. App store is not available for uploads during Christmas holydays
 
@EliteGamer please consider choosing another career
 
haha, this is for a hobby
 
@AlmaDo Not quite, when I take phone in offline mode null byte is received for some reason. I just ignore one but can't explain behavior.
Well, half-open socket is always PITA.
 
7:02 AM
@dskanth the reason i used that "Compact" if statment, is because i am adding it into a line of HTML
 
it's not a "compat" if statement
 
Really?! i actually used it once before
like one
and it worked
 
Google keyword: ternary operator
 
@EliteGamer Try this: echo in_array("VB", $GamesArray) ? ' checked' : '';
 
@Leri and not that
it's a "conditional operator"
 
7:04 AM
ah
 
@zerkms conditional operator is larger group. :)
 
Thanks
that worked.
 
@Leri yep. That's why it's not entirely correct to call it that :-)
 
:)
 
Since we don't call a + operator a binary operator
 
7:06 AM
can anyone tell me, how do i receive multiple parameters in my SOAP method ? I tried loading the WSDL in SOAP UI, and it is showing a bunch of parameters. More than 50. I don't think i need to declare those many parameters in my SOAP method in php.
 
@zerkms but we call ++ as unary (or something like that) :p
 
yeah
 
@AlmaDo if you want to refer to a particular operator you would call its name
telling "use unary operator" isn't helpful at all
 
no, I refer to group
 
7:07 AM
and even "use ++ unary operator" isn't helpful either
 
@zerkms Depends we do something with expression trees or not. ;)
 
@zerkms sure it's not helpful. Only usage of brain is always helpful
 
@AlmaDo using the correct terms is helpful
 
@zerkms well, I can use "unary" for decrements or increments
 
yep
you can
 
7:08 AM
don't see what's incorrect there.
 
you can even name it "some operator"
because it is
 
so you're referring to issue's context while I'm not
 
I'm referring to using the not entirely correct term
it was about the name of a particular opeartor
not about the name of the group it belongs to
 
doh.. E_I_GIVE_UP. too early morning for me
 
Anyway, any of you is free to use "ternary operator" instead of "conditional operator"
for average php developer both terms mean the same
 
7:11 AM
they're not the same
but.. I don't want to start another arguing :D
 
@AlmaDo they aren't, but if you are attentive you will see that in 99% the "ternary operator" term is used
in cases where it's assumed for the "conditional operator" to be used instead
 
Many programming languages that use C-like syntax feature a ternary operator, ?:, which defines a conditional expression. Since this operator is often the only existing ternary operator in the language, it is sometimes simply referred to as the ternary operator. In some languages, this operator is referred to as the conditional operator.
(source: Wikipedia)
@zerkms: So, when you're talking about echo (isset($foo)) ? $foo : "not set"; syntax, what's the correct term to use?
 
@AmalMurali the correct name for this particular operator is a "conditional operator"
"ternary operator" is a family name that may include multiple different operators
 
I see. When should we use "ternary operator", then?
 
When you refer to the group of operators which accept 3 operands
 
Hello all.
 
Hello, @KamranAhmed!
 
I am currently working on a large application that will be used by many people each having a large amount of data. I thought to manage these multiple users through a single database but I am asked to create a separate database for each new user that is registered. Now what I am wondering is : is it a good idea to do so i.e. having the app create a separate database for each new user that gets registered and manage it's data through it? What will be the performance issues, if any?
 
@KamranAhmed if it will be really large - you aren't confident enough to implement it to handle it
otherwise - it doesn't matter how exactly you implement it
and now seriously: it's a stupid idea
 
@zerkms that's what I am trying to convince the team lead.. but in vain
 
@KamranAhmed oh lol
Well, I hardly doubt that you will be able to convince them then
 
This will get fun when you need to change the schema.
 
I'm sure team lead won't confess they propose a stupid decision
 
@zerkms it's basically an ERP System and the argument that they provide is:
If a person A has 10,000 transactions and person B has only 10 transactions then why would we make the person B wait that lot time to fetch through these 10010 just to get those 10 records.. Consider the same for approx. 100 users some having a large number of records and some having least
 
Why do they think someone will wait?
 
7:59 AM
what waiting?
 

« first day (1167 days earlier)      last day (3796 days later) »