« first day (1869 days earlier)      last day (3069 days later) » 
00:00 - 18:0018:00 - 00:00

6:02 PM
good morning everyone... wait its afternoon
 
Hi there
Can I ask you something?
 
> Discussion for all things PHP. Don't ask to ask, just ask.
 
@JustinKaz its good night here.. good night and goood morning does not apply to interenet I think
 
Is very good advice.
 
True. If I send an HTTP request to a server which isn't mine, is illegal?
 
6:06 PM
@Danack I secretly knew that... lol, :)
 
I want to send an HTTP request and pass via POST some tracking number in order to read and analyze results with my PHP page
 
@Danack great.. yes.. thats exactly the truth..
 
@AndreaMartinelli no It's not illegal. That's how Google's spyder is born. It's robot makes http requests to other pages to crawl them. Completly fine... why what are you doing with the information? Selling it on the black market (to Google)... jk jk jk
 
@JustinKaz Thank you sir. I want to send and HTTP request to a server with my tracking ID and read where my pack is
 
@AndreaMartinelli I'm not sure what purpose the tracking ID gives you. Most servers won't recognize information that they aren't programed for.
 
6:10 PM
I'm trying only to do like a "bot", because I dont want to complete every time the form, remember the track id, and so on
 
sounds like scraping
 
I want to send and HTTP request with my track id and read where my package is :)
@JustinKaz Thank you again. I'll try to do this simply and stupid bot
 
How to understand all the directives in httpd.conf... the modules and directives are killing me ... what is the easy way to learn them?? the list is too long
youtube.com/watch?v=T5dIQEKSZZM this video has numerous more..
 
@whatever switch to nginx....much easier...
 
I'd go for just easier :p
 
6:20 PM
@Danack nginx?
 
(sorry, this thing is just sooo funny, I literally jump on every occasion I have to use it..!)
 
what is this... its fake google i think @FélixGagnon-Grenier
 
lol. this shows you how to use google. the results are real google results
you know google, right?
 
Google?? never heard of it.. :D
 
oh, I got trolled. nicely done
I think I'll have to go work on my house in skyrim to recover
 
6:25 PM
:D
 
hhhh.. @FélixGagnon-Grenier don't make fun of newbies .. hhh
 
you mean that lmgtfy link?
c'mon, that's fair play
 
That was funny .. I got scarred that something is searching things on my system.. hh
 
@AndreaMartinelli good luck
 
6:34 PM
Guys, can anyone help me to use codes like {$var} ? what are its requirements/
I am very much stucked between typing <?php echo $var ?> everytime just to echo a variable.
 
use <?= $var ?>
 
@FélixGagnon-Grenier it's banned from the main site for a reason
 
the <?= notation?
 
any requirements? i mean changing php.ini ?
 
@FélixGagnon-Grenier if I was referring to the that, I would have linked my message to that ;)
 
6:38 PM
oh, the lmgtfy links. didn't know they were banned. I guess I'll refrain in the future, then
 
@FélixGagnon-Grenier thanks :)
 
thanks @FélixGagnon-Grenier Worked :D and its way too better than typing <?php :D :D
 
three characters instead of nine. I like it :)
 
I also liked it :D but i need to change my habit of typing <?php echo automatically to type <?= echo :D :D
 
no need to write echo @Aadarsha
it really is <?= $var ?>
 
6:46 PM
Good Night guys :D Need to sleep now. Its 12:30 AM here in Nepal :D You guys from?
yep, i got it @FélixGagnon-Grenier
 
does anyone use doctrine DBAL?
 
thanks (y)
 
Should I close my connections, or when the page finishes does it automatically close the connection?
 
@FélixGagnon-Grenier Congrats!! Told you so ;-) just make sure when you're a manager that you don't put others through the same :P
 
6:47 PM
I promise ^^ :)
 
7:11 PM
@Aadarsha you are an fb addict right.
(y) symbol spotted
 
@JustinKaz Not sure about doctrine DBAL, I barely scratched the topic, but generally there's no need to manually close the connection if you open only one during a single request.
 
 
somebody knows what is the name of this Emoji ?
 
@stack :stuck_out_tongue_winking_eye:
 
thank you
 
7:26 PM
What's with the emoji naming flux as of late? Have I missed something? :)
 
beer
 
8:29 PM
@FélixGagnon-Grenier eww mixing quotation marks ':username' => "user" :D
 
hmm, right :p
 
Mornings
 
8:52 PM
Hi guys
How I improve my site display in Google search result?
 
:)
@Exception SEO, search engine optimization. Meta Tags, and organic keyword integration...
 
Server configuration and I don't get along.
 
Prayers to Great Zargon the Godly, and the sacrifice of a new-born aardvark to the demon Tebuschka.... that's what most of the prominent SEO companies do
 
What could be blocking me from accessing mysql remotely? I have GRANT ALL PRIVILEGES ON *.* TO 'root'@'my.actual.ip.address
netstat -tln shows tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
 
Error message or GTFO
 
9:06 PM
o/
 
O/
 
what up
 
Can't connect to MySQL server on 'servers ip' (10060)
 
And where in that message is anything related to the account?
 
What account?
 
9:10 PM
You tell me
 
What?
 
What?
 
Tell you what?
I'm not trolling you, I just have no clue what you mean by "that account"
Do you mean user "account" root?
 
Do you know what telnet is or how to debug a connection?
You can grant all permissions you want, but if the connection could not be made it's pretty much useless
 
Let me lay it out this way: I can ssh into the server and bind port 3306 to my local 127.0.0.1, then in sqlyog connec to the db that way. I went to allow remote connections by changing /etc/mysql/my.cnf to listen to all ip's, then I granted root access from all ips.
Does this make sense?
 
9:14 PM
No. Allowing root and binding on all ips do not make sense.
But besides that have you checked your firewall?
Have you enabled networking?
Can you telnet into the machine?
 
If you comment out bind-address = 127.0.0.1 in my.cnf, mysql listens on all interfaces for connections to port 3306
No. SSH only
 
Well. If you cannot telnet into te machine over port 3306 there is no way your sql manager can do the same
Because AFAIK if it is a matter of permissions mysql will tell you so
Meaning it cannot even start a connection to begin with
 
Hey guys a very simple question: I have a div element in my 1.html and I want to use the exact same div to my 2.html page. Any idea?
 
Use jquery
 
Right, so this is what I'm trying to figure out here. What do I not understand between mysql listening to 3306 and me locally trying to connect?
 
9:19 PM
errr include I mean
5 mins ago, by PeeHaa
But besides that have you checked your firewall?
5 mins ago, by PeeHaa
Have you enabled networking?
 
I tried load but I failed making it work ;/
 
@MenelaosKotsollaris Is it really a html file and is it really served as html without being interpreted?
 
skip_networking = off
ufw is inactive
 
it's a simple HTML file in my domain
 
@SuperNoob No idea what ufw is
telnet themachine 3306
 
9:23 PM
ubuntu 12.04 defautl firewall
 
@SuperNoob On both sides?
@MenelaosKotsollaris There is not really a sane way of including stuff in pure html. Change it to php and include your snippet
 
...this is where my very limited knowledge of server configuration comes in. Both side of what?
 
Server and... client?
 
If the client in this case is the computer I'm typing this message on, no, ufw is just on the server I'm trying to access mysql
 
Well if you have properly setup networking on the server and there are no firewalls whatsoever involved I cannot help you, because it might be kremlins or something "exotic"
 
9:29 PM
So you can't somehow have an element like : myDivElement.html and load that element each time you want it in HTML right?
 
You probably can, but not in a sane way
 
Hmm I see...
 
The easiest way would be to simply use php
There are ways to let the server add html, or javascript but that is ugly
 
I've written a cURL script in PHP. How do I run it?
 
I thought of testing Bootstrap so my website is based on HTML now ;/ now that I think of that was a really bad idea
 
9:38 PM
run it by executing the php script? Command line? Web browser? Depends what you've written!
 
@MenelaosKotsollaris You realize that you can mix php and html right?
 
@MarkBaker I want to execute it from command line on OS X. I don't know what file extension to use or what command to run it with though
 
Yes I do but is it normal to make AJAX requests for things like footers, headers etc?
 
I've tried sh script.sh, but it doesn't work
 
php myscriptfilename.php
 
9:40 PM
@MenelaosKotsollaris No that is horrific
Fun fact: that is one of the first pages of the manual
 
It just echoes the script code in the terminal
 
Does your PHP script begin with <?php
 
Thanks guys, all good now :)
 
\o/
 
10:01 PM
I want my script to log in to a website when I run it. I'm not sure if it succeeds or not, what can I do to make sure it works?
I also found a cURL command which could potentially work as well, but I have the same problem there.. don't know how to verify
A cookie is created, can I somehow verify by reading the cookie?
 
Request a page after login and see if it succeeds
 
Not even slightly confusing:
let x = (() => { for (var i = 0; i < 5; i++) { try { return i; } finally { if (i != 3) continue; } } })(); console.log( x ); // ? #js
 
10:16 PM
@Abe why the ping?
@Ocramius I think PHP may have the same nonsense
tests
 
seems like someone prevented some weird stuff there :D
 
@Ocramius Probably by accident :P
 
probably
 
@Ocramius It's a leftover from the time when we weren't able to handle it correctly (i.e. pre PHP 7)
 
ah, we do what C# does
@NikiC OH GOD
 
10:19 PM
revelations :O
 
While that particular case does not work, there is a enough other weirdness you can have ;)
At the very least you can overwrite the return value in finally
 
kinda annoying
 
> Fatal error: Return inside a finally block is not supported in /in/VtVjn on line 8
 
@Ocramius The usual way to work around lack of continue support is doing something like 3v4l.org/W967o
 
#lolHHVM
 
10:25 PM
Which also shows that the restriction is arbitrary ;)
 
@NikiC bwahaha, nice
 
I mean nested finally makes a kind of intuitive sense, but
 
now I need reasons to do that
then I'll write .phpt tests
:P
 
When have you ever needed reasons?
 
10:26 PM
@Danack the reason is going against the greater good
 
Other than:
 
@Danack that is on my slides :D
 
okay php actually makes sense here: 3v4l.org/GGD6Q
so when do we get try: and finally: and endtry;
I'm expecting this for PHP 7.1, don't disappoint
 
hey guys how to add an empty space after echo "<td>" . $row["name"] . "</td>" so after the name
 
oh, my presentations are all broken
nice
 
10:30 PM
i tried . " ".
and "\t"
 
next time I'll think twice about hosting stuff on my own -.-
 
Apparently you can't jump from finally, but you can do recursion!
 
That seems offset on the page differently from before?
(aka that's probably what you were said was broken)
 
should I put my scalar type hints talk on talks.php.net
for the prestiiiige
 
10:33 PM
if anyone would like to answer my question please use @lynob so id be notified, i'll leave now have a nice evening bye
 
@Danack loads of stuff broken in ANYTHING I do that includes HTML
I hate frontend: all of it.
 
@Lynob Just put a space in " </td>"?
 
@Lynob Like this? @Lynob?
 
you troll^^
 
@AwalGarg ughhh, now I see the problem >:/
 
10:48 PM
@Danack tried doesn't work
 
@Lynob How can you tell?
 
coz i refresh the page, the row after the name isnt shifting
 
Look at the page source and see if the space is there.....
btw are you just trying to pad things out using spaces?
 
i guess a minor issue wont require css
would it?
 
@Lynob Do this:
echo "Hello                                  world!";
And tell me how many spaces you see on the page....
vs
echo "Hello &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;world!";
 
10:51 PM
nicely done ^^
 
"To help a dumb-dumb, you must first think like a dumb-dumb!"
/wait
 
Each time I read such questions like stackoverflow.com/a/33971248/2153758 about C++ I hate it more… std lib having obscure overloading… argh.
 
/that can't be right.
 
c@Danack changed my mind will work with css coz no spaces :P instead it's on top of each other, damn :) thanks anyway :)
 
@bwoebi C++'s << for streams is awful
 
10:54 PM
@Lynob Or you could read the "vs" bit of my last message....
 
it's one of the first things you learn, so people don't notice it's an overload
 
@Andrea everything wtf'y in C++ (unrelated to types) is an operator overload…
 
@Danack that worked thanks a ton!!
 
this is why, if I add overloads to PHP, it'll be done in a way which discourages this BS
 
10:56 PM
@Andrea and how would you do that?
 
interfaces
 
??
 
you'd implement the Number interface and have to implement all its operations
and those operations would only be allowed to take other Numbers
 
you mean internal interfaces?
(like ArrayAccess basically)
 
yeah that kind of thing
 
10:59 PM
Ah, that's fine
I just wonder how much abuse it'll cause…
Now you implement that interface and abuse the methods willy-nilly to match your desired bullshit.
But it's already like a million times better than C++ in the way that you have to intentionally abuse something…
 
is this guy trolling me or does he simply not know english? stackoverflow.com/questions/33973520/…
 
I guess the type of troll who doesn't even realize they're trolling
 
oh well, I was just not patient
 
@bwoebi I mean, you could
but it's slightly harder to justify
 
yup
 
11:08 PM
class FilePath impelements Floating, haha no :p
 
jut ^^
 
anyone happen to know why parts of Brazil are UTC -2?
 
crazy brazilians
I know a few
 
@NikiC A thought: We can't randomise the hash function, exactly. But perhaps we could add offsets to it/multiply it/bitmask it somehow, per-table?
or, in other words: hash the hash with a salt
 
11:25 PM
@Danack in a non-binding referendum held on 31 October 2010, a slight majority of Acre voters voted in favour of returning the state to the UTC-05.[3] On 30 October 2013, Brazilian President Dilma Rousseff enacted Law 12876, establishing that the time zone switch would occur on Sunday, 10 November 2013.[4] Since then, the state of Acre and 13 municipalities in the southwestern part of the state of Amazonas[5] are again 5 hours behind UTC.
Democracy in action
 
It just seems an hour off from everyone else at that longitude.
 
@Andrea If you have some concrete suggestion...
 
now that I think about it, though, that can't work
a collision happens when two things have the same hash. if you multiply the hash, same collision
oops.
 
@Andrea If you can solve the problem for distinct hashes only, that is good enough
 
ah. hm.
I guess you could have a maximum collision chain length before you switch hash function?
no, that doesn't work
ooh! I have a horrendous idea!
 
11:40 PM
:D
 
let's change the hash function's starting value with every micro!
 
you mean µop? or what micro?
 
@bwoebi micro release
 
ah
lol
 
I said it was horrendous :p
 
11:41 PM
@Andrea You probably didn't even realize that DJB hash collisions are completely independent of the starting value ;)
 
@NikiC welp
 
@NikiC are they? especially due to overflow…?
 
what happens if the hash is 0
 
@Andrea that's why we or the hash with the highest bit…
 
11:44 PM
does that confuse the Zend Engine
@bwoebi ah :)
Incidentally, why can't we throw an exception in zend_hash?
Can we not return and set some flag saying we should raise an exception ASAP?
 
@Andrea well, that's basically with zend_throw_exception_internal() does
 
hmm
I figure the problem is the bit where we'd have to return with a hashtable that isn't how it's supposed to be
 
the issue is rather code possibly misbehaving when an array entry just wasn't added.
 
@bwoebi yeah
 
yep… and there we have to evaluate how much code is affected first.
 
11:48 PM
does that mean it's not allowed to fail to add an entry now?
no failure codes?
 
@Andrea Update operations are infallible
Add operations are fallible
 
@NikiC so they can return -1 or FAILURE or w/e?
 
Append operations are also fallible
@Andrea null
 
Okay. What's the problem with doing that?
 
@NikiC Though I'm sure most array modification ops being able to alter the array and could possibly hit the collision limit aren't critical…
 
11:51 PM
@Andrea Nothing. We just have to introduce checks for failure on each an every update operation.
It might also have performance impact, hard to say
 
after all, most array altering ops are only on values and don't add keys
 
We don't have such checks now?
 
@Andrea No, because updates are infallible
 
Is it currently void? If not, why are people assuming the insertion cannot fail? D:
Oh.
Hmm
But updates shouldn't be a problem, right? We shouldn't even get that far. We should error when they first add the key
 
There are only very few funcs actually altering/adding keys of an array
 
11:52 PM
Anyone got any idea of alternate approaches for keeping a DSL tree separate from an execution context except for the Visitor pattern?
 
@Andrea Update is how you insert into an array ^^
 
I really hate implementing Visitor: so much work :|
 
@NikiC WHAT
ugh php
 
@Andrea yeah, add or update basically
add is just an optimization of add or update
 
ffff
I mean that makes sense. but, ugh
well.
we can break the internals API in a minor ;)
 
11:58 PM
@NikiC after all, when we have an exception, the return value is just simply freed, so we don't even need additional checks for most functions…?
 
and it's a security issue. a security issue can justify anything! :D
 
I might be wrong, but I currently can't imagine any case where having an insertion fail on an userland controlled array is going to have negative impact… @NikiC ?
 
00:00 - 18:0018:00 - 00:00

« first day (1869 days earlier)      last day (3069 days later) »