« first day (2252 days earlier)      last day (2922 days later) » 

12:04
@go_oh https://rebecca.blackfriday/r11.php will this suffice?
Wes
Wes
@user3931314 fulltext works only on actual words of at least 3 letters
now everyone say thank you to @norrskal
4 letters. But that doesn't matter. Ok above was an example
RT @norrskal: @go_oh https://rebecca.blackfriday/r11.php will this suffice?
Wes
Wes
12:05
12 mins ago, by user3931314
In database i have a record "The - Thing", ""The - T " FULLTEXT search on The - T return both.
also, do you think we can understand this? :P
@norrskal you sir, are awesome. thanks <3
sorry, I'm tired
Wes
Wes
so, what was your question?
@Wes Modify the MySQL source: In storage/innobase/handler/ha_innodb.cc (for InnoDB), or in storage/myisam/ftdefs.h (for MyISAM), see the true_word_char() and misc_word_char() macros. Add '-' to one of those macros and recompile MySQL. How to do this?
Wes
Wes
12:10
you shouldn't do that
there is LIKE for that precision, or regexps
@Wes i know, it's the only way.
oh. how to use regexps
Wes
Wes
if you explain what's your use case i could have a solution
19 mins ago, by user3931314
In database i have a record "The - Thing", ""The - T " FULLTEXT search on The - T return both.
Wes
Wes
6 mins ago, by Wes
also, do you think we can understand this? :P
$this->db->where("(naslov LIKE '%$query%' OR v.opis LIKE '%$query%')");
Wes
Wes
12:12
@littlepootis can you understand that? i read that like 10 times. couldn't compute
the above where returns when $query is DORS/CLUC 2016 - LibreOffice moves online, but not when DORS/CLUC 2016 LibreOffice moves online
in db naslov is "DORS/CLUC 2016 - LibreOffice moves online"
Wes
Wes
you need to replace all special characters with %, basically
foo LIKE "%DORS%CLUC%2016%LibreOffice%"
but it's still not clear why fulltext doesn't work for you
It finds the record, but also it finds others that start with DORS/CLUC.
2 days ago, by PeeHaa
You can normalize the field data, but that will probably be slow if you do it on demand
2 days ago, by Joe Watkins
normalize input
it escapes on (-) and return all records that start with DORS/CLUC 2016.
Wes
Wes
12:20
you need to get rid of the -, because that means "not containing" in fulltext
basically what peehaa said...
in fulltext or in LIKE search?
Wes
Wes
in fulltext
keep only the words, remove all other characters and replace them with a single space
you can do it with LIKE as well, replacing it with %, but it's going to be slow as hell
str_replace('-', ' ', $query )
@user3931314 preg_replace_all('/\W+/', ' ');
12:25
preg_replace('/\W+/', ' ', $query);
does anyone have "5 stages of development" image saved?
nevermind, found it
Wes
Wes
@PeeHaa check twittah
@Madara It works but on the string $query. But the problem is in the db.
in db the record is "DORS/CLUC 2016 - LibreOffice moves online" and the query "DORS/CLUC 2016 LibreOffice moves online", and the LIKE wont find it.
we already done this
replace - with _
ok here i go.
12:36
Good morning
@MadaraUchiha ping
@JoeWatkins it's still returning every record starting with DORS/CLUC 2016
$query = str_replace('-', '_', $query);
$this->db->where("v.show_search AND (MATCH (naslov, v.opis) AGAINST ('".$query."' IN BOOLEAN MODE))");
Wes
Wes
kill me with fire
/me obliges, and is also killed by the fire
Wes
Wes
16 mins ago, by Madara Uchiha
@user3931314 preg_replace_all('/\W+/', ' ');
_ is a wildcard character that only works with LIKE @user3931314
Will check later. I'm about to go out and get rid of my hair (at least some of it)
12:41
apologies, I saw the same words he used yesterday and thought he was asking the same question ...
he was using like yesterday ...
with LIKE it also doesnt work.
do an sqlfiddle
you can't just say "it doesn't work" ... show us ...
also, there should not be variables in your query like that ...
but in my adminer the same returns The - Thing and The - Novi
and also in codeigniter code. The - Thing is not even the first in return array ???!?
@JoeWatkins it still uses the overlay filesystem, but it's not insecure in and of itself
12:56
@FlorianMargaine any clue what levi was meaning there ? the overlay filesystem does seem to allow some strange things, and there doesn't seem to be a way to configure it otherwise ...
can you do silly things like write /root/ as any user in a docker container ?
he something like "if you care about security don't use docker" it was very general and I wasn't interested in what he meant at the time ... so didn't question him ... no one else did either ...
wait, I'm confused
forget everything I just said ... yesterday night I thought I managed to write /root/ as a normal user in an overlay ... but I can't, I'm either remembering wrong, or I was doing something wrong ...
I was probably root ... it was late :D
@JoeWatkins this is a result of notion that has been floating around NIX community few years now: containers breed stupid incompetent admins
Anonymous
@PeeHaa are you not bald yet?
13:34
I hate character set conversions so fucking much
user7172542
Has anyone ever upgraded InvoicePlane here? ^.^
Hi, why is the header not working? I know about the SQL injection.
<?php

// Connect to database
require_once($_SERVER["DOCUMENT_ROOT"] . "/includes/config.php");
require_once($_SERVER["DOCUMENT_ROOT"] . "/includes/opendb.php");

$email = $_POST["email"];

// Input
$sql="INSERT INTO Contact (Name, Mail, Message, Datesent) VALUES ('$_POST[name]', '$_POST[email]', '$_POST[message]', CURRENT_TIMESTAMP())";

// Check mail
if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) {
echo("The message has been sent. You will be redirected within 5 seconds.");
I think header is already set (you are using echo), this might help you php.net/manual/en/function.headers-sent.php @Julian
Anonymous
@Julian Why are you still using the code if you know it's vulnerable ?
13:51
Found whats the problem, and it's in the codeigniter code.
@DaveRandom you should hear what they say about you ...
@user3931314 codeigniter itself is a problem
I use laravel, this is someone elses big project.
@JoeWatkins I assume they say something along the lines of "□□□□□ □□ □ □□□□ □□‽"
@user3931314 congratulations, now you got two problems
13:55
@DaveRandom haha
@AlmaDo pong
Brexit, in a single shot. This morning at the EU summit. https://t.co/1WlKeekRQy
4
lmao
that's sad
user7172542
Has anyone used InvoicePlane before?
Anonymous
@JoeWatkins like a playground
14:27
@Dan if someone had they would have answered the first time you asked
user7172542
@Gordon I thought it may have been missed that's all.
Anonymous
@Dan If you can generalise your issue to PHP, someone may be able to help
user7172542
@JayIsTooCommon it isn't a PHP error; was just wondering if any of you guys here had used it in the past. :)
Anonymous
oic
Wes
Wes
@DaveRandom is it possible to write a generic targeting "self" only? eg:
interface Foo<T> where T : self{ public void bar(T bar); }
class Baz implements Foo<Baz>{ public void bar(Baz bar){} }
* class Baz : Foo<Baz>{ public void bar(Baz bar){} }
14:37
@Wes there are no generics in PHP what is this languiage you've used?
oh, it's Java
Anonymous
@DaveRandom ping
@Wes You mean interface Foo<T> where T : Foo<T> {}?
@JayIsTooCommon pong
Anonymous
@DaveRandom hoi github.com/JayPHP/Jeeves/commit/… Was thinking I could do this in my PR as well. Any idea what your favourable approach would be?
Wes
Wes
@DaveRandom maybe
@brzuchal c#
@Wes iirc you can do that, I'm just wait for VS to open with the project where I think I did it
So I'll come back to you in a week or two
Wes
Wes
14:42
yeah you can do that. but it's not exactly what i mean i think
interface Foo<T> where T : Foo<T>{ public void bar(T bar); }
class Baz : Foo<Baz>{ public void bar(Foo<Baz> bar){} } or
class Baz : Foo<Baz>{ public void bar(Baz bar){} } ?
@Wes The latter, Baz was passed as T
@JayIsTooCommon Nope. Am bold though
I just checked and it does work like that
Anonymous
@PeeHaa indeed, you are a bit wild
Wes
Wes
right. yeah makes sense :B thanks
14:47
@JayIsTooCommon Define it here (and any helper functions to go with it that seem useful)
Well @Wes the scenario I have is actually:
interface Foo<T> where T : Foo<T>{ public T bar(); }
class Baz : Foo<Baz>{ public Baz bar(){} }
And in that case the compiler considers the return value of Baz.bar() to be a Baz
I assume that args would work the same way, I see no reason they wouldn't
Wes
Wes
indeed
Anonymous
@DaveRandom alright, thanks
@JayIsTooCommon What's weird is that I'm sure I did that already :-/
But whatever, just go ahead and do it :-)
@JayIsTooCommon I suggest, in fact, that you do that as a separate PR, first, and then you can base your other work on that PR
Although I'm not that fussy
It would just be good practice
Anonymous
Yeah agreed, I can do the MainSiteUser changes in a separate PR too
and here I was thinking ServerName would actually be a straightforward apache directive
but no, it has to be ServerName [scheme://]domain-name|ip-address[:port]
screw you apache
Wes
Wes
14:54
@PeeHaa you can be boldly bald
evening room
15:15
Hi, Im a PHP Programmer :)
Anonymous
@JelleBotman condolences
@JelleBotman I'm sorry man
nope nope nope NOPE...
Better than having that thing fall on you.
15:18
hahah
oh goddammit
@Jelle respond
@JelleBotman Shhh, someone might hear you. Be careful
:P
> git commit -am "The commit's Factoring. Re Factoring."
:P
15:33
...aaaand I deployed to the wrong server. Great.
what is wrong?
this is a PHP group xD
Anonymous
yeah but
Anonymous
yesterday, by Ocramius
php is shit
hahahaha
why condolences?
PSA: the soundcloud api is still a piece of turd
15:41
@JoeWatkins you can, if you mount your local folder in the container
then in the container, given that you are running as uid 1, it will create files as uid 1
user895378
Grovo is moving into the same building as Soundcloud in a week ...
but really, if you mount your local folder, it's normal.
I didn't realize they had an office in NYC
Or are you also in germany?
Apparently I'm going to PHPUK on the Thursday
because work said so
@Leigh Popov != Popova
user895378
15:45
@PeeHaa nope, they've got an office here
@rdlowrey Smear some poop on their door handles for me will ya :P
Anonymous
lol
user895378
the rooftop is sweet ...
@FlorianMargaine Russian naming system is different to yours
@rdlowrey pics?
user895378
15:46
user895378
That's dcousineau ^
user895378
of dcousineau.sexy fame
Anonymous
Why do Grovo have branded hard hats O.o
user895378
Anonymous
oh wtf
15:47
I could drink there
I could compete with that view but I bit my phone and my camera doesn't work anymore
Anonymous
Aug 22 at 14:02, by JayIsTooCommon
@rdlowrey My view is of a dying tree...
Anonymous
still
o/
What are you doing this time with php...
:P
Anonymous
15:51
@ZachSaucier You have the best second name
@PeeHaa nothing :P
I'm trying to redirect /blog/blog/ on my site to /blog/posts/ using htaccess. For that I have: RewriteRule ^blog/blog/(.*)$ /blog/posts/$1 [R=301,NC,L] which seems to be working on an htacccess tester but not on my site. I have made sure the rewrite module is installed, AllowOverride All in the apache2.conf file for /var/www/, have restarted Apache, and hard refreshed. Any ideas what else I can try to get it working?
inb4 install nginx (pokes PeeHee)
:P
Is your blog in /var/www or some subdir?
@ZachSaucier install nginx
(I think it should propagate, but it's apache so not sure)
15:53
@PeeHaa subdir - /blog
I can try doing it for that dir
@ZachSaucier Could you try setting the AllowOverwrite directive in the vhost of the site itself
I think it has to go in the Directory block
that doesn't seem to help
Can you try to put random crap in your htaccess to test if it is being read?
lol what do you mean?
Do you have a cat at hand?
15:56
:P
Dan
Dan
So... dafuq do I do with a DOMNamespaceNode?
object(DOMNameSpaceNode)#3 (8) {
  ["nodeName"]=>
  string(9) "xmlns:xml"
  ["nodeValue"]=>
  string(36) "http://www.w3.org/XML/1998/namespace"
  ["nodeType"]=>
  int(18)
  ["prefix"]=>
  string(3) "xml"
  ["localName"]=>
  string(3) "xml"
  ["namespaceURI"]=>
  string(36) "http://www.w3.org/XML/1998/namespace"
  ["ownerDocument"]=>
  string(22) "(object value omitted)"
  ["parentNode"]=>
  string(22) "(object value omitted)"
}
will it give me an error when I try to access a page or something?
Dan
Dan
I can't access any properties.
@ZachSaucier yes IIRC it should throw a 500 at you
@Dan dafuq is a DOMNamespaceNode?
doesn't seem to throw any
Dan
Dan
15:57
@PeeHaa $navigator->query('//namespace::*')
@Dan That looks like an xpath query, but I have never seen a DOMNamespaceNode before?
!!lxr DOMNamespaceNode
@PeeHaa There were no results for that search
Dan
Dan
@PeeHaa Yea, when you query a document with namespaced nodes, you get a collection of DOMNamespaceNode objects
Wes
Wes
var_dump(class_exists(DOMNameSpaceNode::CLASS)); til
15:59
@Dan You're own your own :P
Dan
Dan
Fuckery.
@ZachSaucier Do you have to use a htaccess file?
Dan
Dan
ob_start(); var_dump($node); magic_parsing(ob_get_clean());
^^ So that's my strategy for the moment.
@PeeHaa No? How else would I do it?
16:00
@Dan When in doubt throw magic at it
Dan
Dan
Pretty much :-(
Seriously, no accessible properties.
(array) casting yields a []
@ZachSaucier Just add it to your vhost config
Sanity check: you do have the RewriteEngine On line right?
Dan
Dan
var_dump(get_parent_class(DOMNamespaceNode::class));
bool(false) FFS
!!docs DOMNamespaceNode
[ DOMNamedNodeMap ] The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive.
16:02
Docs doesnt even know about it
Dan
Dan
Yep. It's marked internal.
Wes
Wes
!!> var_dump(get_parent_class(DOMNamespaceNode::class));
And yet here we are :P
[ hhvm-3.12.0 - 3.13.2 ] string(7) "DOMNode"
I have the solution for you @Dan
Use hhvm
4
Dan
Dan
16:03
lollerskates
:-)
@PeeHaa where would that line be?
@ZachSaucier It should be the line before your rewrite rules
Oh, in htaccess
yes
@PeeHaa never used vhost before
Wes
Wes
16:05
yo zach
Wes
Wes
why can't we just use chrome or firefox's dom in php? (cc @pinepain)
@Wes AFAIK it's the binding that's the actual problem
Wes
Wes
global objects?
Although libxml is probably just craptastic too
Ask @DaveRandom. Bitches love the dom
I currently don't have a working apahce install sadly @ZachSaucier which makes my guesswork harder :)
16:17
@PeeHaa Screenshotting that...
Oooooh noes
:-D
@rdlowrey Looks like a nice place to relax and code a few hours straight
Wes
Wes
16:30
Introducing Private Packagist - finally making #composerphp easy for private code https://medium.com/packagist/introducing-private-packagist-492553d10660#.gkp60lv6l Try it out https://packagist.com
noice
Good for them
Wes
Wes
@PeeHaa still trying to decipher what you wrote earlier :B
What did I write?
Was I drunk at the time?
@Leigh nope
16:46
f me, I was editing my local copy on /Documents and uploading the one in /Downloads
I hate programming
lol
wasted 2 hours
@ZachSaucier
:P
i need some help
16:49
i need help about instagram api
?
how many help do you want?
17:05
actually
i am integrating instagram api
on my site
THAT'S AWESOME :d
:/
picbear.eu here i am integrating but instagram doesn't approve public content of api
the same thing is done here picbear.com
@BadshahSahib What is your question?
@Alesana instagram team replied me that Don't use follower information for anything other than analytics without our prior permission. For example, don't display these relationships in your app.
In order to create a great Platform experience for everyone, we ask developers to ensure their apps comply with the Instagram Platform Policy. Your app appears to be in violation of the following:
17:17
@Wes lol I was actually waiting for something to happen
@BadshahSahib You still haven't asked a question
that's awesome
@Jeeves summon the psychic
@Ekin Good answer.
17:21
@Alesana
didn't you found my question yet
@BadshahSahib It doesn't seem you are asking a question, you are just notifying us that your website used Instagram's API in a way that was against their Platform Policy.
@Jeeves evening sir.
@Linus What is your date of manufacture, Penny?
i meanhow i can solve this problem
17:26
@BadshahSahib You're asking us how to use Instagram's API in a way that violates their Platform Policy?
@Alesana the same thing has done here picbear.com
@Jeeves good night sir.
@Linus Why are you going to bed?
For sleeping?
@BadshahSahib So, not only are you trying to get away with violating Instagram's API, you're also trying to rip off another site?
17:32
@Alesana if you have solution so plzz
i need a team and a friend
programing alone feels so wrong
@JustJacob I am the only developer at my job...
I would think developing w/others would be strange to me
Who reviews your code?
I like working with others, as in I do the backend they do the frontend
Or, I do one part and they do another, unrelated, part of a project
You need someone to tell you when you've been an idiot, it's important :)
17:48
@JoeWatkins Ping.
@JustJacob What type of projects do you work on, and what is your experience level?
18:17
@Alesana i mostly work on project that produce visual result, so no DB, and for my experience ehnrrr..., i've been doing this for about three years now, and I still can't confident rate my experience, cause, I have never worked with my fellow PHP devs.
So, mostly design?
@Alesana kinda, i still do quite enough backend scripting.
@JustJacob do have a github account?
@PeeHaa yeah i do i do, it a tradition, but am not really quite active.
Ah, I am not extremely experienced but I know a good amount of PHP. I'm always down to partner up with someone on a project though!
18:22
Because that's one way to get peer reviews
Anyone know what Apache 2.4 LogLevel I should use for a production server?
19:02
@kelunik @rdlowrey any further thoughts on github.com/amphp/aerys/issues/110#issuecomment-263928041 ?
So you can do INSERT INTO table (...) VALUES (...) ON DUPLICATE KEY UPDATE (...) but, is there a way to make it so ON DUPLICATE KEY it checks if the key that already exists has any fields that are any different than what you are trying to insert, and if it is different update it?
And then, have it report back whether it inserted, updated, or did nothing?
@Alesana Add a column with the hashed values?
@PeeHaa Then would I first do a SELECT query and compare the hashed values column via PHP to figure out what to do?
Just make it the key and do ON DUPLICATE KEY UPDATE like you do now
But if I am trying to update it with something different wouldn't the hashed values be, different, therefore not being a duplicate? Maybe I don't understand what you're suggesting
19:16
oh lol. Yeah brainfart :)
Good point :P
In that case you need an extra query yes
Now that I think about it. I forgot to ask an important question:
why do you want to do this?
I should have started with that one :)
Hah, that is an important question. I want people to be able to get a list of "offers" from a network, and be able to upload them all at once. The network is always changing things about their offers, adding in new ones, taking out old ones, etc...
So I want them to not have to worry about it, just put in the JSON or the link to the JSON, then it will say "389 added, 320 updated, 938 exact matches", or something along those lines
I think in that case a hash should work
If I understand what you want to do correctly
A hash, with two queries?
added means the id didn't exist, updated means the id existed but the data was different and exact matches means both the id and the data exists right?
Also I assume you are doing mysql?
Yes
To both!
19:33
I don't think there is something smart you can do in mysql besides running separate queries. So run query to check if id exists -> check if the hash matches -> insert or update accordingly
The first two should give you the stats you are looking for
That sounds like a good plan
A hash would be much simpler than checking each field individually, would it make a significant difference in performance of the queries?
With a transaction.
@Wes what do you need that for? Basically, that DOM needs to be implemented first, php-v8 is just api to V8 Javascript engine, which doesn't include DOM, global object, timers and so on what you normally expect in browsers or node.js.
@LeviMorrison In what way would I use a transaction?
I am trying to think of in what situation I would need to rollback the query
19:48
@Alesana You are doing a SELECT and INSERT - what if something else inserted in the meantime?
@LeviMorrison Ah, so you are suggesting that if there is a duplicate as it inserts, then rollback?
@Alesana If your select is in the same transaction as your insert/update then no one else will insert that id in the meantime because of the transaction.
@Alesana I'd recommend doing that in code with a row level lock: stackoverflow.com/questions/8849518/…
and probably to remember to set all of the expected values when doing the update, just in case.

« first day (2252 days earlier)      last day (2922 days later) »