« first day (1993 days earlier)      last day (2955 days later) » 

8:01 AM
Rackspace are doing my nut in./
They've blocked our office address 3 times now "out of good faith" because they've spotted a large number of requests from it.
 
@Sean so? stahp doing large number of requests
 
It's our work system, we can't help but make a large number of requests =p
 
excuses!
 
anyone got hhvm installed, with the type checker thing setup ?
 
mornings
 
8:05 AM
@RonniSkansing nin'
 
@samayo Well, what's it for? Seems like it should be under some sort of authentication namespace
 
Anonymous
@Jimbo sting manipulation, validation and other small scripts ..
 
@JoeWatkins 3v4l?
 
it doesn't do type checking ...
 
@samayo And what is the context for the string manipulation, what is it manipulating? What is the validator validating?
 
Anonymous
8:08 AM
There is no context, that's why I chose Util class for it.
 
@samayo Well, you're using it somewhere in your application. The places you're using it == your context, so what's your context?
 
Util is the class we resist in making
 
Anonymous
@Jimbo Nope. For example, you have a simple function: normalize_str() where you apply trim(), strtolower(), ucfirst() functions, and this doesn't have any context.
 
<?php
class F {
  public int $bar = "things";
}

$f = new F();
var_dump($f->bar);
 
@samayo So where are you calling normalize_str()? stop being awkward and answer the damn question! :P
 
8:11 AM
krakjoe@fiji:/usr/src/php-src/hhvm-test$ hh_client
No errors!
@Sara tell me it isn't so, tell me I'm doing something wrong ?
 
Anonymous
@Jimbo everywhere I see fit. If I was calling it only for User-things, then that would be the context.
 
Anonymous
Anyway, too early to be debating, without a coffee :p
 
@samayo But are you currently using it everywhere? Seems like you've created something you might need in the future, without actually needing it yet, and as a result you don't know where to put it
 
@JoeWatkins start with <?hh // strict?
 
thank fuck for that ...
<?hh
class F {
  public int $bar = null;
}

$f = new F();
var_dump($f->bar);
things.php:3:10,12: Wrong type hint (Typing[4110])
  things.php:3:10,12: This is an int
  things.php:3:21,24: It is incompatible with a nullable type
 
8:16 AM
isn't the HHVM just the most beautiful of flowers !
 
@tereško You are always rude to me why..am new to php kind of things.
 
what are you talking about?
 
Nothing..just saying you have good humour sense for everything..
@Gordon your definition about MVC was fine. Thank you.
 
Anonymous
@astrosixer make up your mind man
 
Anonymous
I hate reading confusing sentences before coffee.
 
8:29 AM
Is there any way in PHP that I can trace where sessions are being generated from?
Apparently each request is generating a new session file and I've got no idea where to start looking.
 
Anonymous
@Sean check in your php config file, for the session storage / dir ...
 
@samayo I'm afraid that's the end result. Our dir has over 200k session files but I've got no clue where they're coming from.
 
Look for calls to the session_* functions and check whether sessions are set to autostart (ini setting)
 
Morning. i have a number of 16 , now I want to know how many 6's will go into that 15. So it work be 2 with a remainder of 4. So i want the answer to be 3.
$holder = 0;
$count = 15;
while($count > 0)
{
$count = $count - 6;
$holder++;
}
echo $holder;
How can i make this code cleaner than a loop?
 
@samayo what are you saying?
 
8:33 AM
@MatthewSmart Why not just do floor($count / 6) ?
 
that brings back the answer 2
but i could just manually add 1 to the answer
 
@AllenJB only calls are to session_start(), session_id() and session_write_close()
 
still a lot cleaner :)
 
Then ceil() or round(). There's also the modulus operator: $count % 6 (gives you the remainder from the division)
 
what is ceil()?
 
8:36 AM
@astrosixer Rounds up
 
Anonymous
!!docs ceil
 
[ ceil ] Round fractions up
 
so i can do ceil(10.5) to get 10 right?
 
hello guys
u guys got time for a question?
 
@astrosixer No, you'd get 11 because it's > 10.0
 
8:39 AM
thats nice..
 
adan dont ask to ask
 
need help if anyone has time :3
 
i have a huge problem! so my c# application downloads a page 'example.com'
how do i control the values of the downloaded page with php?
 
this is php room not c#
 
8:41 AM
for example, my website runs index.html, using php how do i set different values for a website that c# downloads?
 
@AdanRamirez You would need to send / change some value (GET / POST parameter, cookie or header) that your PHP code can check to know whether to change the values.
 
wow something is hot in here
anyway, I have a doubt
$result = new stdClass();
$result->{"2"} = "Hey";
$result->{"1"} = "Hello";
 
good morning
 
but when I send this to client side: the code is becoming like this:

{
"1": "Hello",
"2": "Hey"
}
How to keep the original sequence while sending a response?
 
if you voted positively on the nce rfc, please review the patch ... and get your head checked ...
 
8:53 AM
I don't even know what is nce rfc.
 
I got 500 internal server error when Im trying to login using ajax the erros said that jquery is missing but the path is correct what do you think guys ?
 
anyway, any help with the above quesiton?
 
I think your fired @undefined
 
@Mr_Green Null Coalesce Equals operator (see sidebar)
 
@undefined Hey post the related code
 
8:53 AM
If the session save path is not default, will it not perform its own GC?
 
!!swordfight
 
@RonniSkansing do you have a problem with me ?
 
@Sean Yes. GC is performed as part of the session start process as I understand it.
 
@Mr_Green Im using laravel I cant post the whole code from separated files
 
then create a simple fiddle which demonstrates that problem
otherwise no one can help you. you know that right?
 
8:55 AM
@Sean If you have a shared session file directory, any of the applications that use it could GC any sessions - and some of those applications might be using different GC sessions. Ideally all applications should set their own dedicated session directory.
 
yes
 
@undefined the 500 error is on the serverside
 
Hmm. gc lifetime is set to 24 mins, but I'm seeing session files from 2-3 hours ago still
 
@RonniSkansing it can"t find jquery
 
This is a little troubling.
 
8:56 AM
@undefined but jquery is client side
We are talking about a serverside e500
 
im using ajax to login
 
The request you send ends in a error
in the php code (server sside)
 
@Sean The way session GC works is that there's a chance that GC will run every time a session starts. If you have a low number of requests, it may be hours (or longer) between GC runs. This is expected.
 
Morng
 
MingMong
 
8:57 AM
Gormin
 
@RonniSkansing POST domain.com/auth/login 500 (Internal Server Error) jquery-1.10.2.min.js:4
 
morningz
 
@AllenJB But there's 420k session files here, I don't think it's a lack of session_start calls :V
 
@Sean Then I would suggest checking what the session GC settings are
 
In php, I am doing following to send response to an ajax request:

$result = new stdClass();
$result->{"2"} = "Hey";
$result->{"1"} = "Hello";
return $result;

but when I send this to client side, the code is becoming like this in javascript:

{
"1": "Hello",
"2": "Hey"
}


How to keep the original sequence while sending a response?
 
8:59 AM
@Sean Aside: A different way of handling GC (that can improve performance on busy sites) is to disable GC completely for web requests, then run a cron that performs GC.
 
@undefined there are two major ways to get 500th error: disabled error reporting or some type of endless loop
 
@tereško can you explain more
 
which part?
 
@AllenJB Was checking php -i,. but now that I've dropped a phpinfo() on apache It's saying there's a local setting of 8 hours lol
for session lifetime
 
@Sean no. you have to setup a cron job then
 
9:02 AM
@tereško I think I have to stup <meta name="csrf-token" content="{{ csrf_token() }}">
 
undefined , laravel?
 
... and that was a complete non sequetur
 
hehe morning @tereško
 
was that to me @tereško?
 
@RonniSkansing oiy
 
9:04 AM
@Mr_Green why does it matter?
 
@MatthewSmart tbh, for both of you
 
:) your a sad person
 
@HamZa the sequence is missed as you can see
 
pastebin.com/MSDaxbeJ Spot the red flag?
 
how does it feel to sit behind your computer and insult people all day long because you may have a better knowledge of PHP
 
9:05 AM
@Mr_Green Well, that's what I'm asking, does the sequence matter?
 
lol, imo he really does not do that
 
Cheers for the support by the way, session settings are a bit of an unknown for me so it's nice to get some help on it
 
@HamZa the key in those objects is meant for different manipulation other than maintaining sequence
 
@MatthewSmart do you know what "non sequetur" is?
 
9:07 AM
then explain to me, how exactly was it an insult?
 
!!wiki non sequitur logic
 
@HamZa Sorry I couldn't find that page.
 
-_-
was there any need to say that?
so every single time someone goes a little of topic, you will say "non sequentur"
 
!!urban non sequitur
 
whatchoo talkin bout willis
 
9:08 AM
!!wiki dinosaur
 
[ non sequitur ] a statement that has little or no relation to what preceded it; illogical inference; (Latin for "it does not follow")
 
@Sean or rather, it depends what you put there and/or which distro you run, e.g. it wil disable GC if you use the 5;/tmp syntax and Debian overrides some gc settings and uses a cron job instead. I found the latter to be unreliable.
 
@HamZa any idea how to maintain the sequence?
 
@Mr_Green yeah, sorry, my spelling was off
 
yeah np any help with my above question?
 
9:12 AM
sequence of what?
*scrolling*
 
In php, I am storing key value step by step. I need in the same stored sequence only when comes to JavaScript's object. but that is not happening currently.
 
you can't AFAIK
 
then how to handle this situation?
 
@Mr_Green by not storing information in the array's index
if you you need an array item to have two values, then make each of those items into a two-value array
 
I am not using array here. it is php object ot javascript object
 
9:15 AM
@Gordon No it's another situation,thanks 4 asking bro :D
 
{ ["2", "hey"], ["1", "hello"] }
 
or use python haha
 
oh ok
@AdanRamirez hi
 
@Mr_Green that would mean that you are relaying on BOTH js an php having consistent order in object's variables
 
yeah thanks guys
 
9:17 AM
20
Q: How are associative arrays implemented in PHP?

Y PgjnCan someone explain how PHP implements associative arrays? What underlying data structure does PHP use? Does PHP hash the key and store it in some kind of hash map? I am curious because I was wondering what the performance of associative arrays where when inserting and searching for keys.

 
@tereško yes I was expecting that
 
@tereško can you please explain this error Call to undefined method Illuminate\\Filesystem\\Filesystem::exits() sorry to bother you
 
I think the answer answers your question. "it's a hash table" and AFAIK there's no order in a hash table
 
... that's like juggling tigers, in snake pit, on fire
4
@undefined it means that class "Filesystem" does not have a method "exists()"
 
@tereško was that for me?
 
9:19 AM
where can I fix this probl
 
I didn't get though
 
@Mr_Green tigers were for you, yes
 
@undefined by not calling the method that does not exists
 
@RonniSkansing it is in the facade direcoty
 
9:20 AM
@undefined look up the documentation for that "Filesystem" class
 
ok
 
Well shit
 
@Jimbo is that for real :/ ?
 
@HamZa Yeah, he's my mate. This is war.
 
lol
 
9:22 AM
Hmm need to add table flipping to my linkedin
 
@Jimbo you are both idiots
seriously
 
:D
 
:D
 
morning
 
@Jimbo This is spartaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
9:22 AM
haha
 
you can fuck up your future careers, if LinkedIn doesn't go tits-up in next few years
 
@tereško Mate, I haven't added them to my profile. Nobody else can see those :)
Only you lot
 
I don't have linkedin, is that bad?
 
@Jimbo are you sure. Do you know what "employer" paid accounts can or can't see?
 
@HamZa Nah, there are others. Like DE has Xing I think
@tereško Nope, do you? If I don't accept someone's endorsement or recommendation it just disappears though
 
9:24 AM
Not the only one! Burninates image
 
@Sean Fantastic, more ammunition.
 
Anonymous
@tereško If an employer is judging you based on your LinkedIn skills.. You probably do not want to work for them.
 
My thoughts ^ If they don't like that I like pole dancing, they can gtfo
 
and LinkedIn tends to fuck up ... like a year ago they added facebook integration to their mobile app ans started to email evenyone in your phonebook
 
ah shit
 
9:25 AM
@Jimbo lolz
 
Hahah, I don't want to keep that in my chat history :V
 
@tereško I don't think they fuck up - they do it on purpose. It's one of the reasons I refuse to use linkedIn.
 
Back to the exciting world of sessions, if I issue 2 curl requests to a page which calls session_start, I'm going to be generating 2 unique sessions right?
 
I deleted my linkedIn a few years ago.
 
@Jay wanna bet that there isn't some team in Silicon valley working up some "candidate aggregator" ?
 
9:27 AM
@Sean yes, well no cookies at all. You need to use cookie jar to maintain the session
 
On a site with a session length of 8 hours, if something hammers the site they're going to be generating a lot of session files on the server though
Seems like an easy way to bring a site to its knees if the server can't handle the load
 
It all depends on the requirements and what you're going to do
 
@Sean if you are using a session just to keep user authentication token, then just stop :P
 
@tereško It's been in a .htaccess file since the start of time, I'm honestly suprised this problem hasn't came up before.
 
If a site is going to break because of sessions overload...
 
9:30 AM
Our server guys are saying the server is straining because of some 420k session files in the last 3 hours, I'm not sure if it is that. But if it is, I'm thinking we should be reapproaching how we store our sessions lol
Liberally uses the royal we
 
Ooooh I see... I initially thought you were scrapping some data :P
 
@Sean so what are you storing in the sessions?
 
I once saw someone handling sessions using a DB...
Not sure if that's advisable...
 
@HamZa it wouldnt really change the problem
and MySQL is a bitch, when it comes to giving up the used space
 
haha I see...
Nice problem
 
9:34 AM
@HamZa Ive used database, memcache, redis for it all worked great
 
basically, deleting 1'000'000'000 rows will not reduce size of /var/db/mysql ... unless you do additional fiddling and have specially configured engine
 
@tereško it depends on the command
a truncate deleting them is fine
 
@tereško Nothing great I bet.
Let me check it out.
 
@bwoebi afaik - no, it doesn't affect the file sizes on the system
 
And you probably don't want to be truncating session store on a busy site anyway
 
9:36 AM
try it yourself … truncate removes the table file and recreates it.
(at least for myisam)
 
@Sean is this for some API?
 
@tereško also … OPTIMIZE TABLE.
 
80
Q: MySQL InnoDB not releasing disk space after deleting data rows from table

Sumit DeoI have one MySQL table using the InnoDB storage engine; it contains about 2M data rows. When I deleted data rows from the table, it did not release allocated disk space. Nor did the size of the ibdata1 file reduce after running the optimize table command. Is there any way to reclaim disk space ...

 
32 secs ago, by bwoebi
(at least for myisam)
 
MyISAM doesnt count :P
 
9:38 AM
bhahahaha "but it spared 250GB of innodb file."
 
@HamZa main system, not an API
 
Who uses MyISAM anyway...
 
so, class, what did we learn today :P
 
@HamZa I use it because innodb has shitty behavior sometimes…
 
The majority of the sessions are all storing an empty array >>
 
9:39 AM
@tereško use postgresql?
 
something to do with queuing logins or something, this is whack.
 
@HamZa 10 point for slugpuff
 
Help! I have three web pages, a category page and the two inner pages. The last page is the product detail page. I need to set password for first two pages only that means users can only access these two pages by login with the password. But users can access the third page without logging in, by means we will send the url of detail page to the users. Is this possible to do?
 
@tereško MONGO IS WEBSCALE
 
@tereško is that a pokemon?
 
9:40 AM
@SergeyTelshevsky … for storing sessions, maybe, lol.
 
@bwoebi AND ITS FASTER THAN SQL
E_NOT_ENOUGH_CAPS
 
I think key-value stores like memcache / redis are a better fit for session storage - considering all you're storing is a serialized data string
 
@SergeyTelshevsky Luckily we can't use <h1> in chat :_)
 
@HamZa it's a house in Hogwarts
 
@HamZa ## 123
damn
really
 
9:42 AM
@tereško slugtherin would've been more logical…
 
@bwoebi don't judge, I made it up on the spot
 
Please anyone help me?
 
hehe
 
@astrosixer the answer to the question is yes
That is possible to do
 
@RonniSkansing any idea how to do will be greatly appreciated..
 
9:48 AM
$255 /mo for a 2.5gb dedicated redis server is way too much, right?
 
@astrosixer domain.tld/?sharesecret=fjiosdfj90209ifd ..
 
shouldn't we migrate stackoverflow.com/questions/36329731/… to server fault ?
 
Should this tag be removed as the errors are not just 'warnings', or maybe replace with 'errors' to be more general? stackoverflow.com/posts/12769982/revisions
 
@tereško where can I find this method Call to undefined method Illuminate\\Filesystem\\Filesystem::exits() I looked up in the controller view but in vain
 
@Saitama the quality is low tbh
"trust but verify"
 
9:52 AM
hmm
 
@RonniSkansing is there actually anything to do with the last page i have mentioned earlier?
 
@RonniSkansing Nice joke but in my current internship, I saw someone sending the password via GET :/
 
@undefined when you find exits( .. in your code, it was probably meant to be "exists" which is a method in that class
 
Im trying to find it
 
hi, is it safe to send password via POST?
 
9:57 AM
@HamZa well, it wasnt a joke =) it was more meant like a share secret, like when you have a "secret" gist
 
eh, I see
 
@astrosixer It's no safer than sending it via GET. If you site has a login, it should use SSL
 
@AllenJB At least it doesn't display it in the address bar :P
 
It is safer than GET =) ^
 
@AllenJB POST > GET because using GET will leave a trace in the browser
 
10:00 AM
Browsers frequently save form POST data for autofill (and may do this even if autofill is disabled). And it's still transmitted in the clear across the network, so you don't even need access to the machine (if someone has that level of access, you're screwed anyway as they can just install a key logger).
 
it also makes it easier to do multiple requests (like a bruteforce attack) with easier xss payloads
 
what is ssl?It means encrypting the password?
 
@astrosixer I think you need a crashcourse general web development (maybe computer/network fundamentals as well?)
 
@astrosixer https:// - it encrypts the entire connection, so all data is encrypted (bar the IP address and possibly hostname)
 
@AllenJB so all the web hosting service will come with ssl,right?
 
10:07 AM
@astrosixer no, usually there is no ssl support in standard packages
 
does php 7 give you the option of working with multiple constructors?
 
@GeoPhoenix we should add ssl then? Is it something we can do by coding?
 
@astrosixer nope.. you should check this out
 
@AllenJB if you have make any requests over any network you should use ssl
#FTFY
 
10:12 AM
TLS FWIW
 
BTW why doesn't SO use ssl as default?
 
@HamZa same thing
Stupid crap naming
@Saitama Because they don't care
 
:/
 
@PeeHaa source?
 
@HamZa The fact that they still haven't fixed it is my source
 
10:15 AM
hehehe
 
If they really cared they would have made more effort to fix it sooner
 
@PeeHaa Wouldn't a simple redirect fix the issue/?
 
@HamZa They are complaining about technical issues for years now
 
haha
 
10:17 AM
We (the users) don't care. Just fucking fix it
 
Oh I see that blog post...
 
Hi i need some help with displaying some information about a prodcut
 
10:34 AM
Jack Daniels... product
 
Use PDO
 
Yeah nice
 
@Saitama I got the feeling: "why don't you use vagrant?"
 
:P
 
10:44 AM
@Saitama Your link about ssl was very useful. I think i have seen that certificate appearing when i login to the server via ftp
Prompting window asking to trust the connection or not.
 
Pranks -1
 
@astrosixer probably because it was self-signed
 
Morning 11
 
nin'
 
10:51 AM
php: Zend/zend_language_scanner.l:1662: lex_scan: Assertion `!(*__errno_location ())' failed.
[1]    24035 abort (core dumped)
Is this actually a problem?
no core dump when compiled without --enable-debug
 
Anonymous
'Not an answer' flags are supposed to be automatically disregarded if the answer is edited, right?
 
@HamZa then it will not be a secure connection provided by ssl..am I right?
 
@Leigh lxr.php.net/xref/PHP_7_0/Zend/zend_language_scanner.l#1686 this? well… what errno do you get? when looking with gdb?
 
well it's a sigabrt because of the assert right?
 
@Jay I think so, yeah. Not 100% sure though. Could also take a while because of caching.
 
10:59 AM
Hello , I'm getting issue with create XML using php can any one help me?
 
@Leigh that's the signal the process is killed with… yeah … but what is the value of (int)*__errno_location()?
 

« first day (1993 days earlier)      last day (2955 days later) »