« first day (222 days earlier)      last day (4952 days later) » 
00:00 - 12:0012:00 - 21:00

12:06
lol
people are DDoS'ing heartbeat.skype.com
All our skype accounts are down :(
windows just gives an error. Strangely though, it works on Android
posted on May 26, 2011

Here's what was popular in the PHP community one year ago today:ThinkPHP Blog: Study about relevance of business goals in PHP software architecture Community News: TEKX 2010 Wrapups Rasmus Lerdorf's Blog: Writing an OAuth Provider Service Keith Casey's Blog: Event Driven Programming Ilia Alshanetsky's Blog: Scalar Type Hints are Here! Web Development Blog: Create PDF documents Online with TCPDF

my skype is still working too
I guess it's sporadic outage. None of accounts on the PCs work
poor MS, they'll probably get blamed for this as well ^_^
12:33
Just secured a really good client for the next few months :D
Anyone here a freelance developer?
I moonlight. Do a fair amount though
You can sleep easy for the coming months knowing the bills are payable :)
@Greg - me
@JohnP @DenissKozlovs I was wondering how to professionally ask for higher payment after project 1 of 5 is complete - they are a good client, but I don't think I asked for enough for the job in hand - luckily I made sure the contract was only in the scope of the first project
Well, the best thing you could do is to build a good rapport with the client. Once I do it, I take the time and lay down the reasons why a price increase is justified (if it is, that is).
Communication is key. Of course this won't work with all clients, but then you don't want to work with those types anyway
Yeah, the thing is my opinion on them is that they are tight with IT budget - and maybe that's why they liked me approaching them with a low-cost (using cloud) solution.
Comparing the offset cost of what I'm offering to how they were going to do it - using MS dedicated servers and the like - surely there is room for more money to come to me? :)
12:41
@JohnP is correct - good conversation may do it. But if they are tight on budget it might not help.
@ircmaxell does your new contract allow you to do additional freelance work?
@greg You'll just have to weigh your options of Higher Charge vs Retaining Client at that point :)
I wonder what kind of updates will be coming through
they will add <blink> for the markdown
@teresko I hope you're joking
lol, that was fast
look the same
12:54
must be internals, I guess.
A changelog would be too much to hope for
boooring!!!! where teh crazy?
The crazy has been over for quite awhile. The update is done!
<blink>blink</blink>
It blinks!
ah no. no it didn't
hi guys, should i use an framework like cakePHP or write my own code?
13:02
58
Q: What Experts-Exchange thinks of Stack Overflow

Adam RackisAfter noticing a $10 experts-exchange fee on my credit card, I realized I've had an idle EE account for quite a few years. I sent them an email asking for instructions on how to close it, and mentioned that they were great, but that they couldn't compete with Stack Overflow (which is true; I got...

@DownDown how well do you know PHP?
I think i am a newbie compare to you guys, but i can create averge applications
@DownDown depends on what you want to do. one/two pages just write raw php
otherwise highly recommend cakephp
people says your stricted to these frameworks and it is not good for your skills
also people talk about security holes like xss etc
frameworks makes your code very modular
easier to maintain
@DownDown it's partly true. If you start out on a framework like CakePHP without knowing too much PHP you can get into trouble. A lot of automagic stuff going on
however, if you know what actually goes on inside, go ahead. I know I do. Makes my life easier
13:05
@DownDown i always discourage the use of a framework to people that dont have a grip on php basics
But developers like to write there own code or not:P
indeed
But I'd rather get to the fun parts
I think it depends on what kind of project you do but those frameworks makes your application slower aswell right?
a framework is a tool. if you have a problem it can solve easier or faster than it would take for you to solve it with custom code, go for it. but dont use a framework to use a framework
3
@gordo
thats a good argument
13:08
@Gordon perfect. hope all this is CC-Attribution as well. Easy to copy paste that for users ^_^
i have sometimes some stupid errors like a syntax missing etc, when using those frameworks your mistakes are also reduced
@DownDown not really
ok, I'm heading home. Catch you later people. Go crazy with the <blink />
later JohnP
Is there any site on the web where you can check if your site doesnt contain security holes like xss en injections
what would make a webserver that has very little load serve static assets in >100ms
13:30
@Gordon something between the server and the pipe
but that's a blind guess
try to chech with some development tools the breakdown for the download
you should be able to see how much time each state requires .. like dns lookup and stuff
RPM
RPM
Good morning
Has anyone used curl to login into to a site? And to ultimately retrieve a piece of information?
@teresko its all waiting
@Gordon : yes, its a non exclusive contract...
RPM
RPM
@Gordon, @teresko -- Whats up guys long time no talk
@ircmaxell i might be coming back to you then in the next weeks
13:41
@RPM yes , i think most of us have
Lol. Nice
but its not something one cna explain to you from top of his head
just store the cookies
RPM
RPM
I'm gonna be at this all day I have two monsters and 1 red bull ready to be drank
If you know any sources for a starting point let me know!
is there any way to do an additive update with PHP and mysql? so for example, if i had a record in the database already: Name 13 15 18 and i wanted to update it with Name 10 7 12, after the update it would be Name 23 22 30 ?
i have absolutely no clue what might be causing this
13:44
Why @Gordon : that busy?
Default value of an undefined variable is null, right? (PHP)
Well, when you think about it, it does sound weird :)
@ircmaxell "causing this" => static assets being in "waiting" mode for too long
but also yes, im that busy :)
Nice. Gotta love it...
RPM
RPM
Does anyone know if chase online has an API?
14:01
posted on May 26, 2011

Michelangelo van Dam has posted a book review of one of the latest offerings from the php|architect presses, Ivo Jansch and Vito Chin's "PHP Development in the Cloud". A couple of weeks ago, my dear friend Cal Evans asked me to review the book "PHP Development in the Cloud" written by "Ivo Jansch" and "Vito Chin". I accepted as I was very interesting in exploring more of the cloudy world I

Sid
Sid
14:21
Hi all,
I'm trying to implement a smart location field in my php application;
a field that displays addresses for the user to click from as they type.
like googlemaps search field.
I checked out some JQuery plugins but they require the display of a googlemap.
any1 pls?
14:44
posted on May 26, 2011

This new post on the Zend Developer Zone (from Ralph Schindler) is announcing this month's Zend Framework Bug Hunt Days starting today (the 26th) and running through Saturday (the 28th). For those who haven't put the reoccurring event in their calendar, this announcement is for you: Zend Framework Monthly Bug-hunt is here again! Tomorrow, Friday and Saturday of May (the 26th, 27th and 28th

14:55
Sid: Grab a database of all locations in the world. Something like GeoPlaces, They provide a .tsv file. Import the places file into your mysql table using mysqlimport. Then just search over that table, making sure that the place names is an index. Using an external service for what you need is going to be slower and you would presumably want to use the locations for some purpose anywya.
any suggestion on what to try to improve speed of an apache?
How do you know apache is the problem.
And for what purpose are you using it.
i'm getting pretty long response times for static resources. on average 110ms for <1kb png
according to firebug that time is spent "waiting"
user771071
Try installing mod_deflate perhaps?
@Gordon Have you tried any other web server on the same machine?
14:58
@jwandborg nope
@Boy already installed and configured
@Boy That won't help, it's rather going to increase the time spent waiting.
Sid
Sid
@Laykes I'm interested in Uk addresses, can't find geoplaces - can you send me a link pls?
@Gordon You should first be sure that it's not your server hardware, or your home connection. Can you try to test your server performance from your server -> your server?
user771071
@Gordon Do you have the HostnameLookups enabled?
according to vmstat and iostat the server is nowhere even close to what could be called "load"
@Boy its disabled
15:03
@Gordon If you have, e.g. a 3200 RPM HDD, it's going to take a while to collect the contents of the file.
i dont know the exact hardware but given that these are virtual machines on solaris servers in the corporate server center, my guess would be its not a 3200 RPM HDD ;)
@Gordon I saw you mentioned a figure about the load time, was that measured from your desktop via Firebug or do you have any other reference?
via firebug
@Gordon And you know "corporate server" does not automatically mean "carefully maintained, good server with great hardware" although you often assume so.
well, if you know how to get the hw specs from a solaris machine, i can find out
the vm is a linux tho
so i guess no way to get to the host hw from there
anyways, any other pointers? i will gladly try anything. might be blind shooting but its the best i can do right now
15:26
That is what I use.
@Gordon Can you try accessing the server from another high-end connection without the bulk that Firefox can be? Something that does not load scripts and images.
It might be that the page waits for the scripts to be fetched during the time you expressed earlier.
And then it's more of a web design and optimization than an Apache configuration question.
sorry? the issue is specifically about the scripts and image. what good would it do to omit them?
Oh, I'm sorry, I was jumping between threads in my brain and apparently did some really bad memory mapping.
The issue is then to test the connection from another high-end connection. I have one at hand which is located at Rackspace in San Antonio, TX. Do you want me to test the loading time from there?
thanks. you cant test them from your location. its on the intranet and you'd need our vpn software to get access to it
is there a similar PHP construct to allow setting a variable to another - only if it is set?
In JavaScript: var foo = bar || "bar isn't set yet!";
because bar would be undefined, and undefined == false
In PHP, is there a way of doing this without $foo = isset($bar) ? $bar : "bar isn't set!"; ?
15:45
@Greg

C:\Users\user>php -a
Interactive mode enabled

<?php

function pick(){
  $args = func_get_args();
  return current(array_filter($args));
}

echo pick(@$a, "default");

^Z
default
C:\Users\user>
@Greg not as far as I know. Not for assigning variables anyway
It's a feature of JavaScript I have got very fond of and used to
you have the whole do() or die() style. but that won't work with assigning
someone'll probably tell me it's bad practice anyway
@Greg it's just matter of syntax - you can do this with the snippet I've just posted:
$var = pick($a, $b, $c, "default");
15:48
@Greg it's bad practice anyway
Anonymous
@salathe yes... @Greg that's generally bad practice
Anonymous
@Greg doesn't account for typeof == 'undefined'
@salathe it's same as optional parameters - they're bad for maintainability but good for end-user (API is easier to use)
my notifications just went mad!
it's the update!
62
Q: What Experts-Exchange thinks of Stack Overflow

Adam RackisAfter noticing a $10 experts-exchange fee on my credit card, I realized I've had an idle EE account for quite a few years. I sent them an email asking for instructions on how to close it, and mentioned that they were great, but that they couldn't compete with Stack Overflow (which is true; I got...

ummm, sorry if I posted this while I was at work
I don't remember if I did
15:58
i have a problem
strip_tags don't work
..?
strip_tags('<b>bold</b>') return <b>bold</b>
Anonymous
whaaaaaaaaaaaa
Anonymous
?
@AdrianB yeah, just tested on my machine. That works fine
my bad
16:01
^_^
i use strip_tags in wrong area
Anonymous
@AdrianB was going to say.
posted on May 26, 2011

In a new post to his blog Justin Carmony shares the story of how he took a platform running with MySQL as the backend (Dating DNA) and made the choice to move to Redis for storing compatibility scores for every user in the system. We wanted not only for people to be able to visit a profile and see a score, which is easy to generate a score on demand. We wanted our users to be able to browse

@Greg what about $foo = $bar ?: "bar not set";
$text = strip_tags($text);
$text = $_POST['text']
it's my bad,
need to put first line after second
16:06
if $bar isn't set it will throw a notice
@Gordon , for php , use codepad.viper-7.com
@teresko i use both depending on my needs.
@JohnP yup, but ok if notices are off in production?
anyway .. AFk
@oblig you shouldn't ignore notices
that's bad bad bad
16:10
@JohnP i agree, but i was just throwing out a syntax similar to javascript
a browser wouldn't like it either, but likely supress the error
isset() is the closest there is
shame, as it returns a boolean and you'd need the fuller ternary syntax
plenty of sites out there, if you turned on full error reporting in your browser, show undefined variable notices
but yeah, bad practice
posted on May 26, 2011

If you're a user of Ubuntu 11.04 (Natty Narwhal) and are needing to get a full LAMP stack up and running, you're in luck. Omar Abdallah has put together a guide to help with just that. I wont cover what's new in php 5.3 since it would be another article, however it contains alot of improvements including PHP Namespaces, Late Static Bindings, lambda functions, closures�etc. I would strongly

posted on May 26, 2011 by Eli White

This to me is a very sad blog post.  It represents the death of one of my dreams. You see, back when I was in High School, and getting the “You can do whatever you want to do” dream speech.  I decided (after a brief fascination with chemistry) that I wanted to get into Computer Science. Why?  Well one reason only.  I loved video games, so I wanted to make them. Fast forward a few years, and

@oblig I meant that PHP throws notices. Not JS.
PHP throwing notices isn't good because that means you'r doing something wrong
yeah, i understood you. wrong as in practice, not parse/fatal error
the construct in javascript is wrong too
16:27
0
Q: PHP & MySQL: Check if table's data has changed without polling?

GregIs there a way to test if a MySQL table's data has changed at all, without connecting or querying. This might sound weird, but in ASP.NET you can set up SqlDependencies that are kind of events that occur when data is changed (so you don't have to poll your database).

@oblig ha, thanks for the comment :)
not sure it'd work though, ha
everything's quieter than i expected
LOUD NOISES
:D
@ping salathe
16:50
where I can find a general website heat map?
google for clickheat
17:06
okay, 10x
0
A: Convert Tab delimited text file to XML

GordonYou can iterate the file line by line and write the contents with XMLWriter XmlWriter Example (demo) $xmlWriter = new XMLWriter(); $xmlWriter->openUri('/path/to/destination.xml'); $xmlWriter->setIndent(true); $xmlWriter->startDocument('1.0', 'UTF-8'); $xmlWriter->startElement('root'...

Hm, looks like the syntax highliter doesn't like the space between the <<< and the heredoc token.
How put google analytics on my wordpress blog(at .wordpress.com)
?
Do they give you access to edit the HTML in the header/footer? If so, you'd just stick the GA javascript in the footer.
@Charles yeah, i wonder if that should be flagged as a bug
17:18
@Gordon Possibly, though I expect that they'd just point at the docs, which lacks the space.
@Charles that doesnt change the formatting though
Oh, you're right. Maybe it doesn't understand heredocs at all.
17:37
How ai can get in an array all vaiabels used before
?
*I
blog.silktide.com/2011/05/… - Cookie law makes most UK websites illegal: what you need to know
@teresko Psst, might wanna edit that out, someone'll flag the profanity
@AdrianB This is possible, but it's a bad idea. Before we show you how to shoot yourself in the foot, can you explain what you're trying to do?
@Charles , read the article which i linked above . That will explain the reaction
@teresko Oh no, the reaction is justified. It's just that we're supposed to be SFW here, that's all.
im not even sure now it that EU directive makes php SESSIONS legal or not
17:47
It does, implicitly.
Sessions are automatic.
We can't tell whether or not a user has opted in or not.
Well, we can. By setting a cookie. *twitch*
On the other hand, from the PDF:
> The only exception to this rule is if what you are doing is ‘strictly
necessary’ for a service requested by the user. This exception is a
narrow one but might apply, for example, to a cookie you use to
ensure that when a user of your site has chosen the goods they
wish to buy and clicks the ‘add to basket’ or ‘proceed to checkout’
button, your site ‘remembers’ what they chose on a previous page.
You would not need to get consent for this type of activity.
man that cookie law is ridiculous
yes it is
does anyone actually know if sessions are illegal?
after all, they couldn't really prove the cookie wasn't strictly necessary
I love the picture in that article ^_^
0
Q: Are php sessions legal under EU’s Privacy and Electronic Communications Directive

tereskoAfter reading the article about new "UK cookie law" (which most likely will spread all over the rest of Europe), I am quite unsure how does this relate to PHP $_SESSION's. AFAIK, php sessions use single identifier for a lot of unspecified information. But the directive states that cookies should...

made a topic ... but looks like there was already one like that
18:01
darn, that was a really bad decision
They have no idea how the web actually works do they. I thought they consulted experts on things like this
internet is made of pipes
@Charles I want to see visits from my blog on google analytics, but I don't know how put GA code in wordpress?
@AdrianB I don't understand how the variable list will help you accomplish the GA code thing.
18:24
hi, does this make anyone here cry?
if(isset($_GET['term']) and $_GET['term'] != '') {
	$part = $_GET['term'];
}
else {
	exit;
}
and if it does, what's a better way to do the same thing?
Why exit?
script is useless if the query string is not there, is there a better way to degrade that?
As long as whatever calls the script (assuming ajax here) knows that no response means that something bad happened and communicates that effectively to the user, there's nothing wrong here.
Though I'd add a comment to that effect around the exit call.
okay. Is checking if the parameter is set necessary, or can I just do $part = $_GET['term']
The isset check is required in order to avoid a PHP notice if the 'term' key does not exist, and I'd advise keeping it.
18:33
okay, was just wondering if it's standard practice. Thanks!
Yup, totally standard (and irritating)
I guess I'll shuffle it in it's own file since I've got to check for multiple params in that way
18:52
@Charles Wich variable list?
19:10
I'm trying to switch to using PDO with mysql but I'm having trouble getting the same results from a query
code:
	$q = $link->prepare('SELECT *
						FROM :db JOIN names on :db.tax_id = names_tax_id
						AND names.name_class = "scientific name"
						AND :db.Symbol LIKE :term');
removed some junk so it looks a bit weird
then:
$q->execute(array(':db' => $db, ':term' => $term));
$arr = array();

$arr = $q -> fetchAll();

echo json_encode($arr);
my previous code:
	while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		array_push($arr,$row);
	}
sorry for posting all here but I feel like it's too little to pastebin
@Radu you cannot use names parameters for table names
hell .. why would you even want to
ah, I'm not sure why I did that now that you mention it
well, actually, isn't there a potential for sql injection if the raw data is just inserted in the code?
or do I not understand how prepare() works
the query has already been sent
you are just sending data
besides , i woul suggest to use bindValue() or bindParam() methods , then you can even define shat type of variable it will be
19:39
fixed as much as I could but still getting nothing
what's the equivalent of this statement using PDO
	while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		array_push($arr,$row);
	}
do I need to use PDO::FETCH_FUNC with a custom function?
morning...
god how I hate php
@Radu why?
because it hates me :(
I doubt about that
19:50
maybe I should be using some sort of dev environment, debugging this is killer
yeah, you can either use some debugger or decide to rewrite it from scratch
do you see anything obviously wrong here: i.imgur.com/SJzdH.png
the exception is being thrown but I get no information from it which is infuriating
I'm playing around with the fetch since I don't know what to use in my case
^_^
0
Q: Emailing password on sign up

EmanuilIs it a horrible idea to email users their password on sign up - before it's hashed by the server side code and stored into the DB?

alright so my vardump was after the exception happened so it never got hit. Doesn't really matter though: array(0) { } Caught exception: Invalid query: Array
I'd ask a question on SO but I barely know where to start
20:24
alright, so I figured out my mistake, I'm doing LIKE :term, but really the query that I want to push is LIKE 'foo%'
however, :term% isn't working and neither is ":term%" even when there's a perfect match
ended up doing $q->execute(array(':term' => $term. '%'));
00:00 - 12:0012:00 - 21:00

« first day (222 days earlier)      last day (4952 days later) »