« first day (1268 days earlier)      last day (3680 days later) » 

That looks promising.
 
Java usually does...until you have to use it in production.
@BardiHarborow Actually you don't need to do that if Jenkins has it's own local repository, and is building both projects together maven.apache.org/guides/getting-started/…
(or at least building them one after the other in the same environment, i.e. not trashing the maven repo between runs.).
btw if it's your own project, I'd strongly recommend looking at not using Maven. tech.puredanger.com/2009/01/28/maven-adoption-curve stackoverflow.com/questions/1077477/…
 
12:46 AM
Goodbye Lenin! [2003], awesome movie.
 
hello, is unlink asynchronous?
 
Nope.
 
You're probably not looking in the right direction.
 
What do you mean?
 
12:57 AM
Meaning that your problem is not unlink.
 
coz the code seems okay?
 
The file is not created, has nothing to do with unlink.
 
Uhmm, but when I do it with a single login(); secured(); cookies are set flawlessly..
 
Do it twice without unlink.
 
if I do it twice, then i won't be logged out.
but I'll try
 
1:09 AM
add sleep(5) after you unlink...
 
2:32 AM
To those who say you can't see stars in NYC: flickr.com/photos/ircmaxell/13657105344/in/photostream
2
 
3:26 AM
@ircmaxell, There... there are no stars.........nooooooo!!!!!!!!!!
 
 
2 hours later…
5:11 AM
Wiki.php.net: A or B? Involves code samples!
 
 
1 hour later…
6:13 AM
morning
 
6:32 AM
@LeviMorrison A! B is just too much attracting attention… which is not the important part in the RFC…
 
Well, hello guys!
 
@DanilGholtsman hi
 
Sorry if I bothering you but do you ever used PostgreSQL w/ ASP.NET?
 
@DanilGholtsman never, so what's the question ? Remember you're in room 11 (php) :)
 
Because I got strange problems - query works in pgAdmin but not works in sever-side script
@HamZa yeah, sorry. But I assume that PHP and databases are close ;)
And well I'm on job right now trying to fix it :| S here the question stackoverflow.com/questions/22883691/…
Sorry again if I bothering you. I wrote here just because of I got no one to ask about it
I mean nobody*
sorry for my english (my native language is russian so :P)
 
6:40 AM
Also I'm wondering why you created a separate procedure while you could just fire a SELECT query
 
@HamZa tried like that too already
both not working
 
@DanilGholtsman Take a look at this code example yasarmurat.com/Blog/71/…
 
@HamZa oh thanks. But I am not able to use Npgsql. One of the task conditions :P
 
@DanilGholtsman Well I see something like SelectCommand.CommandType = CommandType.StoredProcedure; which I don't see in your code. It's a wild guess, I've never used asp
 
7:11 AM
@HamZa well, it's not the problem.
thanks for the help guys! I solved problem like that - Icreated view by query
and getting data from View
have a nice day!
 
7:23 AM
@LeviMorrison there is a conflict in the parser with labels
not the kind of conflict that prohibits the parser from being built, but the kind that makes compiler confused and leak memory thinking that hints are labels ...
 
user2286243
7:41 AM
Are applications like phpBB, Joomla, Media Wiki considered meduim sized or large size applications?
 
@VarunAgw actually, they are considered "small"
 
user2286243
noooooooooooh. i don't want to hear this
 
then try http://reddit.com/r/PHP
 
^ hehehe
 
Morning
 
user2286243
^ hehehe
 
8:08 AM
@LeviMorrison I am about to start writing tests ... we'll find out what is wrong that way ... I think I got everything working ... I think ...
 
8:37 AM
@LeviMorrison I am just pushing to branch on my github returntypehinting, I'm not completely done but you should take a look at this point in case I got something wrong ...
--TEST--
Basic return hints covariance interfaces nulls
--FILE--
<?php
interface foo {}
interface bar extends foo {
	public function foo() : foo;
}

class qux implements bar {
	public function foo() : ?foo {
		return null;
	}
}

$qux = new qux();
var_dump($qux->foo());
?>
--EXPECT--
NULL
am off out the rest of today ... we'll catch up later on ...
 
@JoeWatkins I'd expect compiler error.
Later
 
@Leri patched, see levi's rfc
 
8:53 AM
Can website visitors see the php code in my website?
 
@Qwertieϟ If it runs properly, no.
 
@Qwertieϟ unless a misconfiguration or a hacking attempt, no
 
so it is safe to have mySQL login info in my php?
 
@Qwertieϟ It would be safer to put it outside the root public folder
 
9:07 AM
We've completed ~60% of the regex reference.
 
 
1 hour later…
10:34 AM
@Gordon I bought the php.ac (academia). Want to become a member? :)
 
@webarto I'll join once it has a sustainable concept ;)
 
OK; where do I get that so called sustainable concept? :)))
 
@webarto thinking and peer review with like minded people
 
@Gordon I was more towards drink a lot of beer and sit on the toilet, but taht works too.
 
@SecondRikudo thats basically the same
 
10:37 AM
@Gordon Where drinking beer == thinking and like minded people are the toilet?
 
my idea for a group like that is that it's freelancers sharing a common understanding of how working on web software and with clients should be approached technically and professionally. kinda like a community of practise that's also commercially available to clients.
 
And with Porsche and Rolex Patek Philippe, so they know we mean business.
@Gordon when I worked for zee Germans in January, I worked on gea.com, do you think you could arrange clients like that?
Speaking hypothetically.
How to say... big league?
 
such naiveté
 
@webarto no i cant. i'd have the same problem getting clients as eveyone else
 
Which are (pardon my ignorance)?
 
10:43 AM
@webarto finding them
and atm I am in a permanent position anyways
 
Just having conversation, same for me.
@tereško Who, me? Nah :)
 
11:00 AM
So... I have a function A that calls B and then B calls A, that's supposed to be recursive... isn't the A calls A recursion?
 
11:11 AM
is there an aggregated page with PHP conferences in Europe?
 
@webarto if A gets called during the execution of A, then there's recursion involved...even if A's not the one calling itself
 
@CSᵠ joind.in
 
@webarto recursive means it's calling itself, and in your example since a is going to be called somewhat from a, its recursive
 
@cHao Yes, sort of like that, when I read definitions it states itself.
 
@Gordon ty (bow)
 
11:12 AM
I was just wondering if it means explicitly or...
@CSᵠ Yes, thanks.
 
if it's not defined like that, then whoever wrote the definition doesn't understand mutual recursion.
 
and what @cHao said...
 
38
A: What is a RECURSIVE Function in PHP?

Anthony ForloneyLaymens terms: A recursive function is a function that calls itself A bit more in depth: If the function keeps calling itself, how does it know when to stop? You set up a condition, known as a base case. Base cases tell our recursive call when to stop, otherwise it will loop infinitely. What...

It's not wrong answer, but...
 
yeah, it's technically right. only because they're talking about "a recursive function". were he trying to define recursion itself, that answer would be sorely lacking
it's kinda already lacking, considering the factorial masturbation. hardly anyone cares about factorials, and even those who do don't calculate them recursively :P
 
12:07 PM
Doesn't seem anyone's here but I'll ask. I have members telling me if they want email notifications upon new private messages. I don't want to send private messages to them upon every message (if a friend decides to send 5 messages like "hey look at this", post, post, etc.). How should I handle this? Should I send 1 email and mark that an email went out if the user has been inactive for ~30 minutes, and not send more? how would you handle this? They have the option to disable email notifications
 
@cHao LOLOLOLOL
@Darius Track if receiver read the message and if he's logged in, if both are false, stop sending more notifications, something like that.
Anytime you do something a la ~30 minutes, that's bad, it should be triggered by some events.
 
Can you rephrase that one more way? Are you saying, if user hasn't logged in, or read the email, stop sending messages? What happens while the user is logged in? Constant emails?
 
No, when he's logged in, don't send any emails, just display notification somewhere on page.
 
Cool, that part's clear. And now, when they're not logged in, just send 1 email* until they log in, then reset the status for emailing, and email them the next time they're not online right?
 
Yes, sort of, but group by user (sender), I someone sends me 1000 or 10 messages, I should receive only 2 unique emails.
 
12:23 PM
yep great. Thanks!
 
Just store somewhere that you've sent the notification/email, and when user logs in, invalidate (delete) all of that, so they get the mail next time, etc.
Just an idea, there are many ways, depending on the current structure you have.
You're welcome.
> LARAVEL - PHP THAT DOESN'T HURT.
Whoever wrote that is a fucking idiot.
 
@webarto Where did you see that?
 
PHP never hurts
 
12:40 PM
It hurts, but mostly E_PEBKAC.
"Hurts" like any other out there.
I'm just pissed off that they've (php developers) "admit" that and supposedly offer "solution" in form of crap Laravel.
 
Yeah I don't like larevel
I just like to steal a component or two from Symfony
 
That's a good thing, ZF2 too, even ZF1.
 
To be honest I have not looked much into ZF2
 
Me neither, just at some components.
 
@webarto Are the components nice and highly decoupled?
 
12:45 PM
Personally I don't use 'em as a "MVC framework". Yes, decoupled, haven't seen one that it isn't.
 
Hey Webarto, new question, I'm storing my sessions in the database right now, but I want to keep track of when my users are last online. I set up a trigger in myself, when a row in the sessions table gets updated, update the accounts row and set the last online to NOW(), is that proper?
(first time using triggers), it works for now. No idea on performance
 
I started using the Symfony session wrapper about a week ago, I will check out the ZF2 one
 
since the sessions get cleaned up by the garbage collector, I don't use that as the last online representative, that's why I decided to make a trigger
 
12:56 PM
Hello
Is anyone here familiar or used phpcrawl.cuab.de?
 
a project manager just now asked me: "So, will you be able to connect CMS to the site tomorrow?"
which was just after "Did you read the mail which was sent by client 10 minutes ago?"
 
1:12 PM
So the project manager is a mediator?
 
... while in his end there was some kind of party going on
@RonniSkansing currently I am too pissed off to say something, that I might later regret
 
Join the php.ac 1337 club and never worry about it again.
Free membership for Room #11 users.
 
1:49 PM
@JoeWatkins I'll clone and start writing tests ^^
 
I want to know C and ZE and make all of these cool things.
:P
 
When I run a page speed test it says I should specify a height and width for each image to improve loading times, does this mean I should store the height and width in mysql or just run a getimagesize(); on every page load?
 
@Darius what test, where
and how is that related to PHP ?
 
I used a chrome extension PageSpeed to measure site speed, and it gives advice on what to do. It says "Specifying a width and height for all images allows for faster rendering by eliminating the need for unnecessary reflows and repaints."
 
well , that's actually true
 
2:02 PM
So dealing with PHP, when I output the images, using a foreach, should I run a getimagesize(); on each image, and put it in the image tag on each page load, or when uploading do the getimagesize() and put it in the database and just use that when i run through that row
 
You will lose more than you gain.
 
So just ignore that "advice" it gives then?
 
If it's costly for you. And it is if you're planning to do that.
 
Hello guys, I have this code:

            $query->setFetchMode(PDO::FETCH_INTO, $this);
            $query->execute();
            $data=array();
            while ($row = $query->fetch()) {
                $data[]=$row;
            }
            return $data;
 
You do not know the image size before you display it?
 
2:05 PM
when data is returned it have the same content anyone know why?
I mean each array element is the same
but if I write var_dump($row) inside while loop the $row is correct
 
if you var_dump($data) after loop?
 
@webarto it have 3 object and all 3 are the same
i just put $var_dump($data) inside loop and the result was strange will paste it in pastebin
 
Why don't you $data = $query->fetchAll() @Loclip?
 
@webarto just tried and its the same with while loop
@webarto did you see the pastebin? its seems that $data overriding itself on each loop or something like that
 
2:29 PM
guys, how do you share domain objects between services ?
.. in particular the "currently logged in user" object
 
Using tokens?
Oh wait, you asked about objects.
 
i hate kicking back the "current user to the controller just so that it would pass it to a different service
it's really ugly
 
@JoeWatkins I don't want to allow ? for arrays or callables, just classes.
 
but I am kinda pressed for time to implement/think-off anything better
a fully implemented DI Container would do this quite beautifully, but I don't have one ATM
 
Damn, my laptop cooler has broken, just when the weather is getting hotter too
 
2:49 PM
@JoeWatkins And for test 10: you are not allowed to relax from requiring a type to allowing null.
The other direction should be permitted.
 
@JoeWatkins I'll submit a PR with what the tests should look like, then maybe you can make them pass when you have time.
 
user895378
@LeviMorrison I still don't totally understand why you want to prevent nullability for arrays and callables. Can you explain?
 
user895378
It seems to me that those are special cases that complicate things and force you to remember more unnecessarily.
 
Callable maybe, but array can always return [].
 
user895378
2:59 PM
^ That's what I was thinking. Returning NULL for a callable is something I'd find useful.
 
user895378
But it still seems like one extra thing to remember. If you don't want to allow a NULL return when you're expecting an array just don't use ? ... making an exception for one specific case with ?array doesn't seem like a good idea to me (just my opinion, of course).
 
When is it acceptable to use a regular expression for parsing HTML?
 
@AmalMurali When you have entire control over it.
 
user895378
By the logic used to disallow ?array you could eliminate ? altogether because you could always return SomeNullObject ... seems like ? should be an all or nothing thing.
 
At which point you probably could just GENERATE it differently
@rdlowrey If you look at the RFC I actually haven't decided on whether or not I'm going to allow any nullable ^^
Honestly I'd like to propose it with no option for that and have a subsequent RFC that considers these at more length.
 
user895378
3:03 PM
I would be fine with removing ? entirely ... if you want mixed returns simply don't use the typehint. Seems like an unnecessary complication.
 
user895378
IMO that's something Hack hack did wrong.
 
user895378
Every return value is mixed by default. The ? is redundant.
 
looks like I will be writing a hybrid DI Container next week
 
user895378
Because there aren't 50,000 of them on github that you could use already ;)
 
3:05 PM
But if we include any kind of nullable in this RFC I want to restrict it to ONLY object types.
 
1. because I want to
2. because most of ones on github are crap
3. because I don't like your naming convention =P
 
user895378
Rule #1 of Github: if it's on Github and you didn't write it yourself it's crap.
6
 
user895378
Rule #2 of Github: if it's on Github and you wrote it yourself it's probably still crap.
 
.. and I am kinda sure that there is a very limited set of hybrid-DICs out there (your's is not a hyrbid)
 
Also, I'd like more feedback on this since we have people here:
10 hours ago, by Levi Morrison
Wiki.php.net: A or B? Involves code samples!
 
user895378
3:07 PM
@LeviMorrison Surprisingly, I like B a lot.
 
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 
user895378
I don't usually like dark stuff, but this one I do.
 
@LeviMorrison BBBB
 
@rdlowrey I tried to not make it too dark because I needed to blend with the site.
 
3:15 PM
C
 
hey PHP lovers helllo
 
s/lovers/enthusiasts/
 
4:17 PM
I suspect, that I will be working though-out the night
 
@tereško That makes two of us
 
.. I'm not sure I can muster the enthusiasm appropriate for this statement
 
hello room
 
hey @redshift
 
HI I am a PHP newbie....can i post a question here?
 
4:20 PM
If it is about php :)
 
well .. there is this site, stackoverflow.com ... maybe you have heard of it
 
of course:)
 
they say it's good for asking question on it ... there is a "ask question" button and all ..
 
i know but i feel my question is too basic and risk getting closed.
 
BTW your email code is vulnerable to header injection @redshift
 
4:21 PM
lol
where
u talking about a recent question i posted?
 
no, he's just guessing
 
I can add headers here
$sender = "From: $replyTo\r\n";
WHat happens when I post the following email address:
peehaa@peehaa.com\r\nExtra-Header: yay header injection
 
oops
 
Oops indeed ;)
 
i actually am building a form for a site within a closed intranet
but ill take a look at that
so I am a designer, very basic understanding of back-end code
but i'm using the php mail function and had a question
what do you reocmmend i use to load the code so you can view it? jsfiddle?
 
4:26 PM
@redshift What is the question about in specific?
 
Is there a function to replace all \ with / ?
str_replace, but when I add \ in it, it breaks the string, how do I escape \ ?
 
'\\'
 
@user3123545 google.com/…
 
when I receive mail when the user fills out the contact form, I get things like "I\'m" in the text. how do i fix?
i have it set as: $message = $_POST['message'];
 
which PHP version are you using ?
 
4:29 PM
Eeeeeeeew @redshift
 
unfortunately, 5.1.3
 
disable magic_quotes
 
lolwtf
 
@redshift Upgrade your PHP version
 
i know but i don't have that power
i've requested a php upgrade
long story, just got to stick with what i have for now
 
4:30 PM
41 secs ago, by PeeHaa
disable magic_quotes
 
5.1.3 was released in 2006
 
@PeeHaa was this for me?
 
yes
 
you probably should leave that hosting , immediately
 
But the fact you are still on 5.1 is really scary
 
4:31 PM
it's a development server within a closed network that i have to use
 
That's like still using xp in 8 years from now
 
then you are being employed by a bunch of retard
 
@redshift Windows?
 
thanks for that link, i will make note of it
ye aand guess what...we are just getting rid of WinXP this week
and still use IE8
 
Of course
Reminds me of my time in the IDF...
@redshift can't you get some sort of Wamp or something inside the system?
 
4:33 PM
possibly
 
@SecondRikudo he probably will have to deploy to 5.1.x anyway
 
some of us still develop for IE7
a lot of the products in the field that the GOV uses must work for IE6-
etc
 
@redshift change the company, as soon as you can
 
@redshift Wow your job is pretty horrible :P
 
@tereško Governmental stuff is a bunch of crap
At least he can use PHP... everything governmental or military in Israel uses Microsoft tech.
 
4:35 PM
@SecondRikudo sorry, I assumed that you were not from 3rd world countries
 
@tereško We are surrounded by Syria, Lebanon, Jordan and Egypt.
 
yea
 
You assumed wrong.
 
can i do any kind of form sanitation and validaiton based with the php version i got?
i know there are some newer functions starting with 5.2
 
not really , no
 
4:36 PM
can i use htmlspecialchars with 5.1.3?
 
@redshift That's the thing with EOL, no one develops in it anymore.
 
@redshift Anything before PHP 5.3 is chock full of security problems so you could try pitching that angle.
 
OK so i'm better off not even trying to do server-side validation, right?
 
That means no library, very little community support, etc etc.
 
the site i'm building is within a closed network availabnle only to the agency
 
4:37 PM
you can use htmlspecialchars and you have use mysqli prepared statements , but that's about it
 
so no outside traffic allowed
 
next options will be from "use regex" variety
 
however, what i am scared of is like a guy within the agency taking the server down
ok thats what i thought, thanks teresko
 
@redshift I know those agencies specialize in a tutroise-like defence.
Very thick on the edges, none on the inside.
Please don't contribute to that approach.
 
@SecondRikudo agreed
 
4:38 PM
Tell them that PHP 5.1 will result in horrible bugs and break ins, it's best if you can find a piece of existing software and break its security
How much stuff sit on that 5.1?
 
ive been able to disable javascript within the browser and then try to submit a form with no data, and was able to break it
but they use mostly coldfusion
 
The PHP obscurtion thingy?
 
i meant the form
 
How much stuff sit on the current system?
2-3 projects? 20-30?
 
im not sure
its just development, not actual production anyways
 
4:42 PM
Your best course of action (and also to prevent you from spending lots of money on psychiatrists in the future), is to convience the higher-ups that upgrading is worth the hassle.
 
You won't have a lot of tools available to you, such as PHPUnit.
 
@redshift Production probably runs on the same version
 
... What version is the production?
 
@SecondRikudo this is what im working on. it's been a long process, but im making a little progress. We are finally getting IE9
@SecondRikudo IM not sure yet
is there a way to find a php version without having access to ftp?
 
@redshift Do you have access to the server?
(via SSH or remote desktop or anything?)
 
4:44 PM
prob not, just development. I'll try to find out later
 
Although we're talking about a governmental Windows server, so I doubt it...
 
thanks guys, appreciate for the chat.
gotta go for now!
 
later @redshift
 
Basically, just upload a file with phpinfo() in it
Then access it.
 
4:54 PM
Oops forgot to ask my question
so I have the following code in my process.php script
if (isset($_POST['firstName'])) { $firstName = $_POST['firstName']; }
Do i not need an endif ?
 
@redshift No, that's the alternative syntax.
 
that's what i thought, but wasn't sure
 
Namely, if (condition) : ... endIf;
 
ok so i don't need an endif for this if statement?
only if I did : ?
 

« first day (1268 days earlier)      last day (3680 days later) »