« first day (2082 days earlier)      last day (2863 days later) » 

1:00 PM
What thing should I put in the $_SESSION['login'] when the cookie one the server and client are matched? Only set it 1 is enough? Like this: $_SESSION['login'] = 1; ... (Or should I put it a token or a special thing?)
 
yes, thought it might be more useful if you were storing UID there ... or even used the $_SESSION['uid'] to signify that user has been authenticated
 
@tereško UID is the value of the cookie ?
 
No, the (probably database PK) unique ID of the user who is logged in
 
Ah ...
 
Just ensure that there is a single mechanism that you use for checking whether there is a current login throughout the app, don't do if ($_SESSION['login']) somewhere and if (isset($_SESSION['uid'])) somewhere else
 
1:03 PM
@tereško well that's a good idea .. Actually I don't need a separated session to detect being login. $_SESSION['id'] can do that for me :-)
 
@Shafizadeh you have to look at it this why: "remember login" cookie and username/password are just two different authentification methods for a user
 
@tereško Yes .. I know
 
@Gordon I had the issue with throw a few moments ago, could these issues be linked together?
 
btw, @Shafizadeh, it might be pragmatic to change the remember-me cookie, after it has been used once (by sending the new cookie value)
 
@tereško btw I learned a new thing about the "remember login cookie". when user logs in, and cookie is matched with database, I have to generate a new cookie and update it. that would be more secure.
 
1:06 PM
@JamesSnowy If you are running something that was designed for a different PHP version, all bets are off. Either change your Laravel version or change your PHP version. End of story. There is no plan C...
 
@tereško OMG ... we told that exactly in a parallel time
 
@DaveRandom I am currently searching if Laravel 5.0 supports PHP 7, haven't found anything yet
 
Well it doesn't, as evidenced by the error you have there
 
Hm, I see.
 
@DaveRandom good point .. I'll be careful about that.
 
1:09 PM
@JamesSnowy idk. all I can tell you is that you are apparently using php7 and laravel 5.0 doesnt seem to be fit for that. try 5.1 if upgrading to 5.2 is too much of a hassle
 
So, I'll just begin upgrading Laravel to 5.1 and 5.2
@Gordon Thanks anyhow, appreciate it. In addition, seems like Laravel doesn't really allow you to upgrade from 5.0 to 5.2, 5.1 is needed as a space
 
@JamesSnowy 5.1 seems to be okay for 7. but like I said, I am not sure this will cure your particular error with the ParseError because the version in trunk doesnt catch Throwable. So chances are, there is additional things to fix.
 
really?
oh wait, the version in trunk has a composer req of >=5.5.9
 
Gon
Evenin'
 
Another Laravel win
 
1:13 PM
@Gordon Wait, instead of upgrading laravel, can I somehow uninstall it and re-install a newer version?
 
@JamesSnowy idk if you can do that. I know nothing about your setup except for php7 and laravel5 and that you inherited it from some other developer and that you are struggling with very basic errors ever since.
 
@Gordon I see, by the way, thanks for sharing the story that is unfortunately true..
lol
 
The only good news is you're not stuck trying to compile PHP 5.2 for a program you don't understand at all
 
technically, an upgrade from a minor version to another minor version should not cause any trouble. however the upgrade notes suggests at least some hassle. yay for laravel!
 
PHP7 is still spotty in places. We use Smarty and it still has some issues with it
 
1:20 PM
yeah, I noticed that upgrade note, #laravelforlife
 
@JamesSnowy it might be easier to downgrade your php version to the latest 5.6 branch
 
@Gordon Hm, i haven't had a look, however, if i do that, the PHP code i inherited from another developer wouldn't work?
since it is written in php 7?
 
@JamesSnowy yes, obviously, php 7 code will not work on php 5.6
 
@Gordon so, basically it is a lose-lose situation
 
With Laravel, the only winning move is not to play.
 
1:25 PM
@Danack Just realized that, lol.
 
OH: Laravel is a tool for creating legacy applications.
7
 
@JamesSnowy without knowing any more details, probably yes.
 
As you know, sessions are stored on the server. I want to know, what thing of my device will be stored on the server which the server knows that's me?
 
@Gordon Guess I'll just have to deal with it, thanks for all the assistance once more, I appreciate it deeply.
 
@JamesSnowy yw
 
1:32 PM
Ugh, postfix is nothing less than magic and wizardry.
 
!!giphy magic
 
:P
 
that's the wrong one…
 
It is
 
I know :(
 
1:33 PM
That's what I was thinking
 
1 message moved to Orphan GIFs
\o/
 
thanks
 
So I got a new job... I might have to use Laravel /o\ ... but I also get to use Go \o/
 
@Sean what else.
 
Gon
1:34 PM
@Leigh grats!
 
ah, so ZF3 has just been released
 
Trying to track how mail works on this server. It uses swiftmail with the default mail transport, which uses PHP's mail. It's running as cron, so I'm checking the CLI php.ini and it points to localhost for smtp business.
 
@Gordon oh … someone noticed a sack full of rice in China…
 
postfix's mail.log shows outgoing mail, but how is it treated as a valid email when there's no postfix settings which correspond to the correct domain name?
 
@bwoebi That's what I was thinking, too first. Then I decided in favor of images of undead instead.
 
1:38 PM
@Sean mail() on *nix uses sendmail, smtp related settings in php.ini aren't used afaik
 
@Gordon But is it PSR15 compliant?
 
@Ocramius ping
 
Reply from chat.stackoverflow.com: Destination user unreachable
 
@DaveRandom heh
 
@Sean I think it would just look up the target domain's MX and try to deliver it directly
 
1:44 PM
@DaveRandom How does it verify that the sender's address is legit though? Totally out of php scope, sorry!
By legit I mean the sending source is authorised to send on behalf of the domain
 
@Sean It doesn't, that's not how email works. The burden of proof is on the receiver (that's why spam is a thing)
The recipient looks up SPF records, screens against spam blacklists etc
Any host anywhere can send anything
This is the root cause of most of the problems with the whole comically broken system
@Sean XY: what's the problem you are trying to solve?
 
Comically broken, yes, but the alternative is what? A central authority controlling who can message whom? That's far worse IMO.
 
@Sara dmarc?
 
@Sara a certificate-driven system
 
1:50 PM
And who issues the certificates?
 
@DaveRandom Problem was my lack of knowledge, I wanted to know how it works so I understand it more. The overarching problem is that one of my server domains goes through an external smtp mail service, so the mail logs aren't stored locally. I want to change it to send emails locally instead but wanted to first confirm that it was alright to do so
in this case I'm guessing it's safe to do so if the server's IP address is listed in the domain's SPF lookup
 
@Sara Someone like the Let's Encrypt initiative. Something open-source that issues short-term certificates that can be auto-renewed, but which require proof of ownership to do so.
 
They're either centrally controlled like SSL, or they require massive trust networks like PGP which we as humans are GUARANTEED to fuck up.
 
@Sara I don't disagree
 
:)
 
@Sean Yes, although names are better in SPF IMHO (others disagree)
Basically I prefer to structure everything such that when an IP address changes, I update a single A record and a bunch of CNAMEs follow suit
Essentially it's insurance against forgetting
Give each server an actual name (like web01.mydomain.com or something descriptive), create a single A record, then point all the names for applications/services it hosts as aliases to that name
 
AH right, so if the spf record contains the 'a' type then it also checks against the a name lookup
 
yes, which also follows aliases
The SPF record should use the machine's name (web01.mydomain.com) rather than the app/service's name (awesomeness.mydomain.com) because you are still giving the machine itself permission to send mail, but doing it with a name means that you can't forget to update the SPF if you move that machine to a new IP for whatever reason
 
heya felix
 
2:05 PM
Cheers @DaveRandom super helpful! Just picked up something else I'm not sure on but it's cool
 
@PeeHaa watch GoT right now. There's not much things that are more important.
 
I wonder if I can fix this: my resume has a bunch of freelance experience.... I can't list company's names due to NDA...but listing them as a list makes a very long list to read
 
@FélixGagnon-Grenier work work
 
meh. only one hour!
I just learned that in the site we're refactoring, the usernames were not unique, and to login they'd loop through all user with the name until they find a passwd / user match.
 
hello guys
 
2:09 PM
hi
$query = $this->db->query("select * from login where username='$username'")->result();

in codeigniter this query fail and return false.but in mysqlconsole i can see it is correct
 
var dump $query see what it returns
 
@AnmolRaghuvanshiVersion2.0 var dump show the object .i get error when i'm calling $query->num_rows(). errors says call on none object
ohh right it returns a array
@AnmolRaghuvanshiVersion2.0 yes thanks
it actually return an array
 
Anonymous
@DaveRandom Congrats dude
 
@DaveRandom congratulations
 
2:22 PM
Oh wow I never knew this was here.
 
hastebin.com/imomacuweg.1c i am sending this string to server .... php script is not generating image from it while sending this same string from rest client pc generatin image from it
 
@BradFletcher That's because it's a secret society run by the Illuminati, if you are here it's because you are now one of the Chosen Ones. Welcome. We'll teach you the secret handshake when you have proven yourself worthy.
o/
 
@FastSnail awesome. Now, what will happen is I have a usersname: foo' OR '1'='1
 
@tereško i use codeigniter filters
 
ya know, that's a lot less reassuring than you think
 
2:28 PM
@tereško i'm using active record pattern this is just a example.my real query is
$this->db->select('*')->from('')->where();...
 
hello @Danack
@Danack i posted data to server which made this string on the server hastebin.com/imomacuweg.1c i got it from there .... the code i wrote for this to parse it and decode the image using base 64 is not working i post it from appllication ... and when this same string is posted from rest client the code works and save image .. i m shocked because this same piece of string working from rest client and not from app
 
@DaveRandom I'm pretty sure I asked you this before, but if not. Have you ever found a way to make outlook 2007 behave when it comes to imap folders?
The asshole only recognizes sent and inbox and there is no obvious way to fix it that I can see
(removed)
 
@Trowski is this your website - trowski.com? If so, ssl cert expired Jun 22. JFYI.
 
@pinepain Whoops, thanks! Will fix asap.
 
@PeeHaa a) when you right click on the account (top level) in the the "Mail" tree view, there's an "IMAP Folders..." context menu item. Dunno what it does, but worth a look. b) in the Account Settings -> More Settings -> Advanced tab, there's a setting called "Folders -> Root folder path". Also dunno what it does, but worth a look.
Currently I don't actually use IMAP for anything so have no means to play with them
 
2:43 PM
@DaveRandom a) doesn't let let me assign "special folders", but just lets me subscribe. b) Just changes the imap root, which is also not what I want. :(
/me gives up
tnx anyway
 
@PeeHaa What do you want to assign?
 
When using outlook. It thinks it has to created a folder "Junk E-mail" and use that for junk instead of the fucking folder called "Junk" already there
Such a POS client
 
Well that's because they are two different layers of junk
 
:P
 
srsly
 
2:46 PM
Yes I know
one is client
1 is server
 
I'm not sure if there is a sensible way to handle that situation, like, in general
Unless you can outright disable client-side junk filtering for an account, and then just subscribe to the Junk folder
 
What happens now is:
 
I would hope that if you subscribe to the Junk folder then it would essentially be empty all the time because the client side filtering would pick them up
 
> Hey girl. I know you normally create audio software, but I'd definitely make some nsfw audio from your hardware.
 
2:50 PM
1. outlook (client) finds spam and moves it into "Junk E-mail" (outlook folder)
2. /me sees it and says "hey yeah that's spam indeed" and move it to the server's spamfolder so that the server can use it for spam training
3. /outlook sees a new message in some folder somewhere ("Junk") and thinks "Hey! Imma find spam!" and moves it back into outlooks spam folder again
durrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
ah yeh that is a problem
 
It works pretty very well when you have everything MS (read exchange), but once you use something else it goes full retard
Not sure if on purpose or just retarded
Both are valid options imo
Fuck even the mail app of my mac does it properly
 
=)
hihihihi
 
@PeeHaa Yeh I got nothing except "probably doable with some VBA horror"
 
3:10 PM
hi
I have a problem with php upgrade
 
whats the problem?
@DaveRandom congrats on da house
wow
 
when i upgrade php 5.5 to php 6 now showing php vertion correct but showing php modules are missing
 
do you mean php 5.6 ?
 
@RonniSkansing yes
 
okay, did you enable the extensions in the php.ini's
 
3:14 PM
when i use the command a2enmodule showing missing
 
what does it "say"
 
I think the problem is when i install a module its goes to old php path
 
did you have a look in your apache conf files?
 
Is that any way to install php modules to particular php i have 2 old and new
Ok
 
"someone" should update this =) php.net/manual/en/install.unix.debian.php to php7
 
Wes
3:27 PM
evenin'
 
If I need to update a record value on a db table, and I need to check for another value of the same table to be "ok"... Is there any special SQL command/syntax to make it all at once? Or I need to execute 2 queries anyway?
 
There's a whole lot of ambiguity in that.....what do you want to happen if the other value is not "ok"? Also, probably use a transaction.
 
3:42 PM
@FélixGagnon-Grenier why username are same ?? What if passwords are same
 
@AnmolRaghuvanshiVersion2.0 yep, that precisely is the problem. Trying to speak some sense in the people there, but that would oblige them to ask something of their members, which they are very reluctant to do
 
Wes
@FélixGagnon-Grenier ha. beautiful
 
@DaveRandom Yeah forget about it :)
And yeah those idiotts forget a cert... again...
 
Wes
speaking of refactorings. i just started a new huge one. i heard you do small changes and test every time. i don't. i break all the things in a single stint. i like to think that it takes less time
 
3:53 PM
I do that too. Fucking testing it if it's not what I want it to be yet
I also work on master whenever I do that for extra annoyance
 
Wes
we are real men
 
brofist
 
Wes
rofl
 
real men don't use source control
 
Also true :)
 
3:58 PM
=)
 
Wes
i think i do that too. last commit was 150 ish files changed
Files changed (129) actually
in my defense, it's still a wip
 
@Wes That looks more like @DaveRandom fixing a typo
 
Wes
rofl
moving on... pipe operator news? hell i so want that feature
 
Anonymous
4:17 PM
!!rfcs
 
@Wes I guess it was beaten to death by Stas and co. (c) and now Sara doesn't want to continue with it
 
It would've been a great leap forward in making code Look Neat™
I guess in at least 2 senses of the word "neat"
 
Wes
:(
 
4:34 PM
hola o/
zf3 is available
 
Wes
\o
 
Anonymous
Is it possible to use the npm and the whole stack without using VirutualBox?
 
npm? As in the package manager?
 
Anonymous
Yeah.
 
I don't even understand where virtualbox come into play :P
install node and install npm
 
Anonymous
4:49 PM
I have nodejs in it.
 
Anonymous
I have nodejs, Windows and Linux versions.
 
So why would you need a virtualbox?
 
Anonymous
Not sure how it would work out, with the terminal in windows.
 
If you are using a recent version mostly just fine
I even think it comes installed out of the box, but I could be wrong about that
 
Anonymous
You are right, I tried nodejs in Windows7, with ghost installed and I but I don't remember having much freedom with the cli.
 
Anonymous
4:53 PM
I did manage to get ghost working on local, but that was that.
 
What is ghost?
 
Anonymous
 
Anonymous
It used to be a 'thing' ~2 years ago.
 
Oh that blogging thing
Well surely it's better than WP
 
hi room
 
Anonymous
4:55 PM
Yeah, at least it looks neat on the surface.
 
basically i want to do try-catch on extension level
but for some reason in userland code i can't catch thrown exception:
try {
    fun();
} catch(\Throwable $e) {
    var_dump($e);
}
this code doesn't catch thrown exception.
or should i ping NikiC?
 
Anonymous
ping him
 
ping @NikiC ^^
 
@pinepain o/
> The vote began on Jube 8 and will finish on July 6.
When did it begin??
 
@NikiC for me it's strange that when I wrap existent try-catch in one more try-cath block, that latter block catch exception. I see that there are zend_exception_save/restore() functions, is it something what i'm looking for?
 
Gon
5:07 PM
Night o/
 
o/
 
Gon
All this homework is killing me!!
 
Anonymous
What homework?
 
Anonymous
Are you still in school?
 
@Gon Dude staph. Wait till you have to work proper
Then you can complain :P
 
Gon
5:11 PM
heh
@samayo yep...
 
Anonymous
UNI?
 
@pinepain not quite clear to me what's wrong. To ADDREFing the exception and replace EG(exception)=NULL with zend_exception_clear()
 
zend_exception_clear? (ah! zend_clear_exception(), will give it a try)
 
@Jimbo is there a way I can PM you?
That was an easy one @FélixGagnon-Grenier ;-)
 
@pinepain you can also use zend_throw_exception(), it seems more appropriate for your case
 
5:18 PM
@NikiC Thanks! zend_clear_exception() solved my problem!
 
@PeeHaa well, gotta start with the easy ones, if you want to get the harder ones, don't they say? :p
 
:D
 
@nikita2206 that is meta-code, i need to set extra property on that exception
 
Gon
@samayo 9th std.
 
        zval exception;
        object_init_ex(&exception, php_weak_reference_ex_class_entry);
        zend_update_property_string(zend_ce_exception, &exception, ZEND_STRL("message"), "One or more exceptions thrown during notifiers calling");
        zend_update_property(php_weak_reference_ex_class_entry, &exception, ZEND_STRL("exceptions"), &exceptions);
something like this
 
5:25 PM
@pinepain great
 
Anyone know what the status is with lxr.php.net?
 
@Trowski It's down
:P
 
@PeeHaa Thanks :-P If it is a hosting issue I might be able to help out with that, though I'm not sure of the logistics with that.
 
5:40 PM
@Trowski I have seen a bug issue where @tyrael basically said he had given up on the box and wanted to install it somewhere else.
 
o/ @tereško
 
@tereško Which router you suggested me to use captive portal?
 
6:25 PM
@Machavity I... lol. wat? What does it even do..
 
@FélixGagnon-Grenier Regex to call a variable static method... I just don't even...
I upvoted the one using call_user_func
 
@Machavity WTF
 
@Machavity yeah, it actually seems like the sensible one
lol, that user even have a silver badge in php
wtf. they give those as swag too now?
 
6:41 PM
that second answer. it hurts of truth
 
6:59 PM
dmitry
bwoebi_: what mail client do you use?
dmitry
bwoebi_: For some reason I don't see text of your emails in M$ Offcie 365 :)
lol
 
Anonymous
7:10 PM
Evenin :)
 
hoi jay
 
\o
 
o/
 
9
Q: Hosting company advised us to avoid PHP for security reasons. Are they right?

YumecosmosI'm doing a redesign for a client who's understandably concerned about security after having been hacked in the past. I had initially suggested using a simple PHP include for header and footer templates and a contact form they wanted. They are reluctant because they were advised by their hosting ...

 
7:24 PM
php is abused unecessarily...
 
Wordpress gives PHP a bad name. It's not alone tho...
 
@AnmolRaghuvanshiVersion2.0 It's mostly just a moronic "hosting company"
:)
 
is there anything which gives php good name?
 
@AnmolRaghuvanshiVersion2.0 The drama
 
7:33 PM
@AnmolRaghuvanshiVersion2.0 perl
 
Wes
lol
 
hehehe
 
Florian in 3... 2... 1...
 
@DaveRandom Can I hit some magic refactor button in phpstorm that allows me to change the namespace in a project?
 
@MarkBaker do you have some code I could use to visualise? For me, if you have to check defined() then you are basically working with a var but I'm open to persuasion
@PeeHaa right click on the namespace and "rename" (single level) or move (recursive)
It's under a sub-menu I think
in the right-click context somewhere though
 
7:50 PM
Much amaze
\o/
 
No code yet, I'm considering options; but the PHPSpreadsheet Reader factory has a method to create a specific file format reader by passing in the reader name; those names are just string values
 
Are they class names or parts thereof?
 
Is this fine to generate a token for the cookie?
$salt   = bin2hex(openssl_random_pseudo_bytes(16);
$uid    = $_SESSION['uid'];
$cookie = hash ( 'sha512', $uid.$salt );
Or should I use microtime() for the $salt?
 
hence $reader = \PHPSpreadsheet\createReader('Excel2007');
 
$slut?
Something lost in translation there I think...
 
7:52 PM
@DaveRandom that's a random string
 
was referring to the var name...
 
@DaveRandom Oh .. yes you are right .. I meant was $salt
 
The string value Excel2007 then uses the factory to instantiate the appropriate reader
 
@Shafizadeh protip: keep safe-search on if you google "slut" at work
 
I was looking to create constants for all Reader names, so it could more easily by hinted by IDEs
 
7:53 PM
@DaveRandom :)
 
Except that not all readers will always be available (depending on extensions available)
@DaveRandom LOL re protip
 
@MarkBaker what happens if I pass the string for an unavailable reader?
 
So I could create all constants regardless, or I could selectively define only the constants that were available at run-time
 
Ok which one is correct?
1. $salt = bin2hex(openssl_random_pseudo_bytes(16);
2. $salt = microtime();
 
Unavailable readers throw an Exception, that's still the same, like if you passed a random string
@Shafizadeh - The first, more entropy
 
7:56 PM
@MarkBaker thx
 
@MarkBaker the thing is, if you define them dynamically you introduce a situation where I have to check what's defined, and that turns them into variables. Define constants by all means, but define all of them and let me check with isReaderAvailable() and/or getAvailableReaders()
(imho)
 
Yeah, that's my alternative; I just got to thinking about dynamically defining constants as an option earlier
I don't think it contradicts what a constant is; once defined, the value remains constant
Exactly as it would if created using define()
 
Because of the fact that I can just pass any string I want anyway, by dynamically defining them all you've done is turn your nice handleable exception into an ugly "use of undefined constant" error
@MarkBaker It's the "once defined" part that's tricky for me. another property of constants for me is that they are given values, they always existed
 

« first day (2082 days earlier)      last day (2863 days later) »