« first day (597 days earlier)      last day (4333 days later) » 

3:00 PM
@rogcg why?
 
to fit my purpose
 
@ircmaxell My next line says the same thing as you did but less succinctly.
 
@LeviMorrison :-D
 
I have a string like this - Lorem" - and I want to create replace it like this - Lorem\"
 
@rogcg Which is?
 
3:01 PM
a problem I'm having with json
 
@rogcg use json_encode and don't worry about it
 
yeah. but how do I replace that?
 
git noob question, is this the workflow when developing something through github (one man band)
 
@webarto It can be
 
3:13 PM
@webarto It's what we do at my work, except the git repository isn't on github.
 
@ircmaxell @LeviMorrison thank you; noob question 2: on server I run
`[dmarjanovic@dev ~]$ git checkout ...`
and when I push from local machine, I do `git pull` on server, to update from github repo...
 
OMG even worse :(
@NikiC doesn't it get thourgh moderation?
 
abuse at its best heh
 
posted on June 04, 2012 by Sean Coates

Continuous deployment is all the rage right now, and I applaud the use of systems that automate a task that seems way easier than it is. That said, sometimes you need something simple and straightforward: a hook that easily deploys a few pages, or a small application, all without often-complicated set up (come on, this is a PHP-focused site, mostly). Sometimes, you just need to deploy code

 
^ just in time :D
 
3:18 PM
lol
sigh I hate this: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Why would you need it :(
shared hosting people who may not upload outside doc root?
 
I guess.
 
@RepWhoringPeeHaa that, and it's protection for procedural programming
 
w00
It's not a protection for procedural programming. It's a protection so that you can't request other PHP files except for the one which has the BASEPATH defined in it.
 
@w00 True, but it seems like a REALLY bad architecture if you have to worry about that.
 
w00
@LeviMorrison Yes, but that's another story :)
 
3:29 PM
@LeviMorrison That was what I thought :P
 
@w00 no, it's protection for procedural programming. If all your files except the main one have nothing but classes or functions, you don't need that protection
 
w00
exit('No direct script access allowed');
i think that says enough
 
@RepWhoringPeeHaa I prefer the more succinct !defined('SECURE') && exit('gtfo');
But it is largely pointless.
 
zzzzzzzzzz
 
3:45 PM
 
What about if(!defined('SECURE')){a: goto a;} ?
 
@Donut that sounds very secure!
 
Of corz!
 
Actually a pro programmer would do:
if (!defined('SECURE')) header('Location: index.php');
(notice the missing die)
 
Jurassic park PC hacker message Ah ah ah, ah ah ah
 
3:53 PM
@NikiC I haven't thought of that :/
if(!defined('SECURE')){ declare(ticks=1); register_tick_handler(function(){echo 'Leave my script alone you bighead';})}
@NikiC Bad enough?
 
@Donut Sure, turn a direct access into a DOS attack. Great idea
 
@ircmaxell That's the whole point...
 
4:13 PM
answers in this topic make me sad : stackoverflow.com/questions/10883274/…
 
ummmm
Skill Experience Need
1)C Expert Required
2)perl Expert Required
3)ksh/sh Expert Required
4)UNIX Expert Required
5)good communication skills Expert Required
6)SQL Expert Required
7)gui design Expert Required
8)JavaScript Expert Required
9)PHP Expert Required
10)LDAP Expert Desired
 
btw , good afternoon
 
^ in an email from a recruiter
 
@ircmaxell , not bad .. i hope they get all the 10 people
 
C, Perl, JS and PHP expert.
yeah, right
ok bbl
 
4:16 PM
@ircmaxell , you could replay "which of the 10 job positions you are actually offering to me ?"
@RepWhoringPeeHaa , did you expect that it won't ?!
 
i probably shouldnt throw stones when im in a glass house... but... why don't people use the search box?
i mean... seriously?
 
Most employment opportunities I've seen who demanded that wide a skillset rarely offered anything like as much as someone with that wide a skillset would want and probably deserve.
 
agreed
 
What is this redbean stuff that suddenly seems to be the flavour of the month?
Oh, just another ORM
 
@GordonM An ORM I actually like because it doesn't require much setup at all. I don't use it and never would endorse it, but as far as ORMs go I personally think it's good.
 
4:28 PM
That's kinda like saying "As far as venereal diseases go, chlamydia is the best!" :)
 
Pretty much, yes.
 
ROFL
besides you know how i can tell that ORM isnt that bad
the site sucks
and in my experience, if the site design is shitty... the product rocks
lmao
 
Does it annoy anyone else that PHP has array functions where you can specify a custom compareTo function, but then others that use some compareTo don't have a version to do that? array_diff, I'm looking at you.
 
PHP 5.2.14 (cli) (built: Dec 31 2010 08:08:29) :(
 
Okay, does anyone know how to use PHPUnit assertTag() to test that a HTML tag DOESN'T have the specified attribute? I'm testing some code that's supposed to remove an attribute from a HTML element.
 
4:35 PM
@GordonM Kudos for testing HTML, but I can't help.
 
@LeviMorrison Meet array_udiff :P
 
Although, I'd just check it from the DOM perspective.
@NikiC I swear it wasn't there, but now that you mention it, it is.
 
Ah, apparently there's an assertNotTag method
 
@tereško No, I can low-ball the offer. I want $50k per year... Per position
 
Wanted: Renaissance man wanted to do all the work of a fucking development department. Must be skilled in everything remotely pertaining to computer science. Pay scale: insulting to derisory, depending on experience level. Medical benefits do not include treatment for stress due to overwork. Apply now!
 
4:40 PM
guy on chat says his computer sucks $2.50/hr
bajeesus
 
@GordonM tried with "Not" ?
 
Yeah, like I said, just noticed there was an assertNotTag method.
 
user895378
@LeviMorrison I completely agree with you. I'm not sure why that's the case other than many PHP devs have little or no formal training. I'll check it out in a bit.
 
> There’s nothing “closed” about the list or the decision-making process. Anyone who wants to drive the group to open even further is free to join the list and make suggestions for doing so. (I’m looking at you Anthony Ferrara. ;-)
hehehe, I love getting mentioned by name in posts :-D
@GordonM I've had that job
 
4:54 PM
Morning fellas
 
user895378
@LeviMorrison I know better than to say "I'll definitely work on it by X day/time," but I'll start contributing via pull request ASAP :)
 
user895378
@orourkek morning
 
@rdlowrey I'm still getting used to the toon avatar. I was like, who is this guy?
 
user895378
@LeviMorrison Ah, well, it's only temporary. I'll be too tanned once more in a couple of days.
 
lmao
god i love stack exchange
 
user895378
4:58 PM
@LeviMorrison I'm close to 100% coverage on the eternal routing refactor. Once I commit those changes I'll be able to merge/incorporate your http stuff and we can get on track :)
 
@rdlowrey :) I read quite a bit of the HTTP spec over the weekend.
I'm nearly ready to talk implementation of stuff.
 
user895378
@LeviMorrison Sounds more productive than my weekend ... I probably snuck in a few hours of code but mostly implemented your suggestion to not be a terrible hermit and do things away from the computer :)
 
@rdlowrey I also did some of that myself. I think I spent 23 hours total over the weekend with a friend from my freshman year of college and his wife.
 
I'm really starting to like unit testing.
I wish I could unit test real life.
$this -> assertNotDick ($potentialEmployer);
 
user895378
lol
 
user895378
5:01 PM
public function testGirlfriendDoesntThrowExceptionOnFootballAndBeerSundays()
 
user895378
Hey girl, you're awesome, but you didn't reach 100% coverage ...
 
i need to update my careers profile
 
@rdlowrey And just like your code, don't expect 100% coverage . . .
 
I'd have thought low coverage would be a good thing in a girlfriend.
 
user895378
@LeviMorrison Hehe, very true.
 
user895378
5:03 PM
@GordonM also true!
 
Brrrr, Euro 2012 starts in 3 days
 
user895378
@LeviMorrison Input requested: how do you feel about disallowing "blanket" HTTP method coverage by a callable controller. I.E., you can't register a single closure for all HTTP methods on a given resource. Lazy class controllers have this built-in: they simply specify their own methods matching the HTTP method verbs they support. I'm proposing that eager-loaded controllers must specify a single, specific HTTP method when registered.
 
user895378
$router->get('/widgets', function() {}); <--- this is okay
 
user895378
but not this:
 
user895378
$router->all('/widgets', function(){});
 
5:09 PM
@rdlowrey I think I agree with you.
 
user895378
@LeviMorrison I just see no point to allow poor design ... and it makes this bit of code I'm finalizing much simpler
 
Wouldn't an all method be a bad idea anyway? Would you want an object to respond the same way to a GET, HEAD, POST, PUT or anything else?
Other than to return "method not supported" HTTP error
Maybe that's a silly question
 
user895378
@GordonM My router does that for you ... so you don't worry about sending a 405 for disallowed methods
 
user895378
@GordonM yes it would be a bad idea, but sometimes people want to do it anyway
 
Okay, just checking
 
5:18 PM
jesus christ, its like pulling teeth to get an answer out of the electrical engineering site
all i want is the formula to calculate peak usage of a device
 
user895378
@Donut +1 woot!
 
@rdlowrey which framework do you like to use
 
bindtime!
 
here we go...
 
user895378
@fluty I generally don't unless forced under threat of bodily harm :)
 
5:22 PM
(1200 + (2 * 110) + 300) / 1000 * 0.11 * hours. Add all wattages, put wattages to kilowatts, multiply by cost per hour, multiply by hours.
about time
 
@rdlowrey You still like to use them when under threat of bodily harm?
 
@fluty jk he uses cakePHP
 
user895378
@LeviMorrison Yeah, the bodily harm fits with the sado-masochism of framework usage ...
 
@carrie ok :)
 
@rdlowrey but... its called "cake"... how can that possibly be bad?
 
user895378
5:24 PM
On the recommendation of @CarrieKendall I tried CakePHP and I've never looked back.
 
user895378
She extolled its virtues and I just couldn't resist.
 
user895378
And it tastes delicious.
 
LOL its true.. wordpress was just too complex :]
 
whenever a wordpress ticket comes into my inbox my day gets 10x worse
 
user895378
I had to help a friend the other day who installed a WP plugin that instructed him to chmod his entire web directory to 777 so it would work. Of course, ensued.
 
5:28 PM
oh lord
 
some really lazy coders on that plugin
 
does automattic filter and approve plugins?
 
wordpress is so good at the internet.
 
or do they just let any joe blow in
 
is it a good idea to start from reading code directly in order to learn framework?
 
user895378
5:28 PM
I have no idea.
 
user895378
@fluty Reading code is always a good place to start!
 
I don't think there's anything bad with frameworks in theory. Unfortunately for PHP the framework with the biggest userbase has some highly questionable design.
 
@fluty every framework worth it's salt will have documentation & guides for getting started :]
 
i recall when timthumb had that security flaw
hilarity ensued there
 
@rdlowery .. i did same for zend framework but then it consumed a lots of time even to understrand its bootstrap process
 
5:30 PM
and considering almost every wp-plugin that deals with images in some way uses it, it was a pretty big deal. lmao.
 
@orourkek agreed :)
 
I am agree with all
 
Does anyone see a difference between 'disabled' and 'disabled'? Am I blind?
Because that's what I get when I echo the two variables, the var_dumps are the same, but they aren't equal when using ==, and when used in array_key_exists it doesn't work either.
WTF is going on.
 
Nik
equal when using ===?
 
Actually, the var_dump's aren't the same.
	string(8) "disabled"
	string(9) "disabled"
o.0
Where's this additional character coming from?
 
5:38 PM
Both trimmed?
 
@tereško I did. I was hoping it wouldn't happen though :)
 
When I call trim it drops down to 8. However, I have NO idea why there is an extra character. The strings come from the same place, but one gets sent over a POST request and it is somehow different.
 
@LeviMorrison unicode chars?
 
encodings?
 
Are those the real chars? copy pasted? So I can check
 
5:41 PM
how to access java classes in PHP
 
@Bharanikumar Why?
 
@Bharanikumar What have you tried? What do you mean?
 
i have java lcass
trying to accessing the java class using php code
 
@LeviMorrison probably a control character?
 
we are deriving some properties which is written in java
 
5:42 PM
@Bharanikumar Why?
 
its client specification, they already have product which is developed using java
so need to access the java class in php
 
@Bharanikumar Why can't you use a Java server then?
 
How do I shot web
 
levi: we are doing php development only
plz advise how to access java class in ophp
 
Do you realise that something like include 'MyClass.java'; $c = new JavaClass(); is not possible?
 
5:45 PM
@Bharanikumar It's not that simple.
The real solution is to use a Java web server.
 
we can go with javabridge know
 
@Bharanikumar You can't access it directly in short.
 
using javabridge
 
@Bharanikumar if they want you to access java trough php it's their problem providing a public API to access your stuff imo
 
ok, first we give small kick
 
5:48 PM
I had enough java with installing jenkins tonight. Finally I have continuous integration. 3am. Time for bed.
 
Nik
any new developments on the 'disabled' variables?
 
user895378
@Paul later -- let me know how you feel about jenkins
 
@Nik No, still looking.
 
@LeviMorrison You sure it isn't a control character?
 
user895378
5:49 PM
How to access langX using langY ... I would answer REST every time to that question.
 
@LeviMorrison tried comparing character by character?
 
@RepWhoringPeeHaa Well, it might be, but I don't know where the character is coming from.
 
@rdlowrey Are you using any continuous integration tool? I'll be getting a better feel for it over the next few days.
 
@donut: installation steps
 
@rdlowrey Common Lisp from Objective C?
 
5:50 PM
@Bharanikumar Yes, installation steps.
 
user895378
@Paul Jenkins seemed a bit heavy-handed to me ... I just use phing for build scripts and have tests running at all times
 
in that url there is not installation steps
 
@LeviMorrison And the one which is screwed up is coming in over post?
 
@RepWhoringPeeHaa Yep.
 
user895378
@GordonM lol, no. my point is that if you're a multi-language organization you're wasting your own time if you don't have some sort of service-oriented-architecture (SOA) to leverage all of your different assets.
 
5:52 PM
yep, it was a bit confusing for me. it seems like there will be some pretty graphs though.
 
user895378
REST is the preferred way (IMHO) to implement services.
 
see you around.
 
I think I'll just open a support ticket for myself and move on. Don't want to spend this much time on it right now.
 
@Bharanikumar Are you banned on google or what?
 
i googled lot
and tried lot
 
5:53 PM
Oh, I see.
 
Hey Guys Quick Question Here! I'm creating a file upload website which is working just great but I want to improve 1 thing, I want to be able to upload several files at once instead of one at a time.
I'm using <input type="file" multiple /> to choose several files BUT I have no idea how to manage each file individually so I can use the functions I already have.
 
user895378
@LeviMorrison That situation sounds soul-crushing. Good luck :)
 
looks
i am not able to successfully call the java class
 
@JesusAdolfo how are you uploading the files now?
 
some where i am missing
 
5:54 PM
'normal' for submit? or xhr?
 
This is my function to upload images
function upload_image($image_temp, $image_ext, $album_id, $image_description){
$album_id = (int)$album_id;

mysql_query("INSERT into `images` VALUES ('', '".$_SESSION['user_id']."','$album_id', UNIX_TIMESTAMP(), '$image_ext', '$image_description')");

$image_id = mysql_insert_id();
$image_file = $image_id.'.'.$image_ext;
move_uploaded_file($image_temp, 'uploads/'.$album_id.'/'.$image_file);
 
Today is a sad day. The Trollolol guy died.
 
omg really?
 
Yeah
 
'', '".$_SESSION['user_id']." ==> this is ,
in prefix
 
5:57 PM
@JesusAdolfo uhhhhm why are you using the old mysql_* functions?
 
@GordonM It's a sad sad day for internet :P
 
Gentlemen, a moment's silence please.
 
@RepWhoringPeeHaa I'm not a seasoned veteran when it comes to web developing I found those functions in a tutorial which I found easy to follow and it worked great for me
 
@JesusAdolfo let me get a gist 1 sec
 
5:59 PM
Ah those damn old tutorials.
 
How a PHP developer writes it's own "MVC" (My Very Code): stackoverflow.com/q/10880838/367456
 
FU onebox!!!!!!!!!!
@JesusAdolfo Please stop writing new code with the ancient mysql_* functions. They are no longer maintained and community has begun the deprecation process . Instead you should learn about prepared statements and use either PDO or MySQLi. If you cannot decide, this article will help to choose. If you care to learn, here is a quite good PDO-related tutorial.
 
@RepWhoringPeeHaa Wild thought of making it -10
 
@RepWhoringPeeHaa oh man I learned that from phpacademy.org the tutorials is from 2011. I think it could be pretty hard to change all my functions now x_x
 
6:01 PM
I'm trying but it will only let me vote once
@JesusAdolfo never ever trust any php tutorial you find on the web
 
Downvoted it
 
Most of them are just terrible :(
 
delete it for sake of humanity
 
@JesusAdolfo Doesn't it suck when you come to php chat with a problem and people tell you you have more problems than you thought ;)
That's PHP chat for you :-)
 
6:03 PM
This is why my PHP tutorials suite needs to go public.
 
@RepWhoringPeeHaa dude I'll be doing some research on pdo and mysqli and eventually change the functions but I want to know how to manage the multiple file upload since this is something for college x_x
 
First the PHP questions turned to crap. Now the answers are too
 
@RepWhoringPeeHaa youtube.com/…
 
6:04 PM
@RepWhoringPeeHaa it kind of sucks when that happens but it's good to know it though
 
Crap will be ashamed when he hears you called those answers crap
@webarto lol
@JesusAdolfo I'm pretty sure Google knows the answer.
 
Huh. Someone downvoted an old question of mine that was on +10. Then someone else apparently upvoted it again. Woot, free badge.
 
hmpph thaks for your help @RepWhoringPeeHaa
 
Never trust a jQuery tutorial on the web, especially if PHP is involved as well ^^
 
6:12 PM
What about: Never ever trust the internet, only php chat?
 
what about never trust anything nor anyone
 
im using a "check database" tool inside a script im using (CRM) it says there is (1) error: 1 table is missing indexes and it shows the code to fix it:


Array
(
[list_subscribers] => Array
(
[missing_indexes] => Array
(
[0] => subscribers_email_list_idx
)

)

)

Can anyone tell me what should i fix there? i cant get it to work
 
PHP / MySQL Pros! Pls take a look at this question stackoverflow.com/questions/10885801/… THX in advance
 
@GordonM Since when do you understand dutch? ;)
 
6:15 PM
I don't. But I don't need to. Just watch it!
 
can somebody help?
 
@rdlowrey What're you up to?
 
@GordonM And 2 upvotes :(
 
I should have started using templates from the start on this intranet site, converting it is a nightmare
 
6:28 PM
@Event_Horizon Conversions of most kinds are nightmares.
 
@phpdocs people: Shouldn't this comment just be removed?
 
@RepWhoringPeeHaa Let's don't introduce the good pratices tyranny.
 
@LeviMorrison How would you handle converting tools into content pages, such as a schedule formatter (takes schedule.txt and parses it into an html table on page) ?
 
@Donut I hate it when the useless comments are at the top :(
sorry for triple ping :P
 
Don't worry, I had worst :P
 
6:38 PM
@Event_Horizon As long as schedule.txt is well formatted, that one isn't too bad.
@RepWhoringPeeHaa Personally, I would say yes, delete it.
Good practice tyranny is one thing, perpetuating bad advice is another.
 
@LeviMorrison You guys can delete it or how does it work?
 
@RepWhoringPeeHaa I haven't looked into that kind of cleanup, but @NikiC probably knows.
 
k will ask him tonight. tnx
 
I think my problem is I'm too tired to convert this stuff at the moment, I'm having trouble keeping my eyes open and converting path pointers
 
6:56 PM
what a stress for the cows ;)
 
sigh
Why doesn't anyone in ask about directed graphs or the law of demeter?
 
@GordonM because those that know, know, and those that don't, don't
 
heh
 
@LeviMorrison Just login on master then you'll see littel icons for delete etc
 
7:14 PM
@ircmaxell back from vacation? or are you still on vacation?
 
back in the office
 
@ircmaxell do you have any presentations/talks coming up ?
 
did one two weeks ago
looking to do it again soon, just need to find a venue
 
Cool I really enjoyed the last one, looking forward to see another one.
 
Now that's what I call a pull request: github.com/hakre/simplepie/commit/…
If you're a SimplePie user, too, you might want to support this issue: PHP 5 Branch of SimplePie 1.2
 
they look pretty similar haha
 
@ircmaxell They went through a bit of trouble if it's a copy.
 
they did?
        if ($range == 0) {
            return $max;
        } elseif ($range > PHP_INT_MAX || is_float($range)) {
            throw new Exception\InvalidArgumentException(
                'The supplied range is too great to generate'
            );
        }
vs
if ($range == 0) {
    return $max;
} elseif ($range > PHP_INT_MAX || is_float($range)) {
    /**
     * This works, because PHP will auto-convert it to a float at this point,
     * But on 64 bit systems, the float won't have enough precision to
     * actually store the difference, so we need to check if it's a float
     * and hence auto-converted...
     */
    throw new \RangeException(
        'The supplied range is too great to generate'
    );
}
 
@ircmaxell Well, looks like they were too lazy for changing the names of the variables and the exception text. Have you tracked the change? Not that you copied from them ;)
 
No, I got an email from the guy who wrote it thanking me for the insparation
 
7:30 PM
Well, one reason to use the GPL license for one's own code. You can then say: Bello, thank me in cash if you want to ripp this.
 
@hakre Don't need GPL for that
 
@ircmaxell Sure you need. Right now they just need to conform with your license and things are fine for them.
Which they will do if you tell them you don't like their behaviour.
 
sigh...
 
Your MIT License has no termination clause.
 
no, but they can't change from MIT to BSD without permission though
so there is a license violation
 
7:33 PM
Sure there is, but one with not much consequences.
In the moment you put this on the agenda, they will mark the code as such. Job done.
But the funny part is that all ZF developer signsomething
I wonder how that guy managed to declare his copyright on your code ^^
You have the name of the developer?
 
yes
 
ezimuel (Enrico Zimuel)
 
copypasta
 
Looks like that working @ Zend is getting paid for copy and pasting other coders code.
 
corporate bastards :P
Q: which OS do you guys use for development, and to code on, are there 2+ computers in your network, or you do everything on one.
 
user895378
7:46 PM
@LeviMorrison Just got back from a late lunch ... organic tuna salad ... now, on to some unit tests!
 
asking because now I need to take 3 computers with me when I go somewhere...
 
@webarto The life of a computer nomad.
 
@webarto I always use some kind of Linux and make sure to use github a lot :)
 
@webarto I have recently started using vm's for development as I have two bases to work from with a separate computer in each. I just load up the vm for whichever project I'm working on and there is my familiar dev environment. I run ubuntu with a lamp stack and netbeans on the vm.
 
@hakre he works at Zend?
 
7:50 PM
posted on June 04, 2012 by Henri Bergius

I've written about Decoupled Content Management before. As the Symfony Live event in Paris is nearing, I thought to give Symfony CMF a spin. Symfony CMF is a new approach at building PHP content management systems, and adheres quite well to the principles of decoupled CMS: Content is stored into a standard PHP Content Repository Symfony2 is used as the web framework Front-end editing works on

 
do those feed posts get generated automatically?
 
@hakre :) @LeviMorrison using Debian w/ PHP5.4 etc right now, but coding on Win7 (I need PS and np++ being favourite editor), but LIN + WIN, not working good together, thinking of just switching to Linux entirely (this is the situation where Mac could be useful)...
@vascowhite nice solution indeed, it's just that my virtual machines are currently real machines (and heavy too!)
 
@webarto You can try it out, I use the free version of virtual box, the biggest pain is the initial setup, but you only do that once and clone that machine for a new project.
 
@vascowhite they are a feed (RSS feed)
 
I take it the room pulls it automatically then? Set up by the room owner?
Ah, just found the link.
 
7:53 PM
@webarto I'm using OSX and using a VM for big projects and dropbox for small ones.
 
@vascowhite yup
 
@Nick nice, I currently have only one big project, which is daily job, so I decided to setup a machine for it, but... pokit.org/get/img/6407875e12dc10f2344bb277fec44b96.png
somehow, it's painfully slow (xferring files)
 
Just found out a major #PHP framework violated the license (copy-pasta code) of one of my projects. Let's see how this sorts out...
 
11
 
hey, you copy pasta my copy pasta line :P
 
7:56 PM
@webarto lmao
 
@webarto I'm pretty sure memebase has you on that one :-P
 
Oracle V Google, eat your heart out!
 
4chan probably :P
 
megusta
 
Using OSX here too, with the liip PHP package. 5.3 on one machine and 5.4 on the other
 

« first day (597 days earlier)      last day (4333 days later) »