Anna FilinaBad conduct: the root of the problem (26.7.2014, 00:35 UTC)

More and more tech events are publishing codes of conduct. Although I think that it’s a good idea, I find it sad that we need to tell people things as basic as “treat others like you want to be treated”. I would like that in addition to treating the symptom, we understand and treat the root cause. Bad behavior incubates and spreads like a virus. We have a plague on our hands and we need to start controlling it!

Bad behavior existed since the dawn of man, but the Internet makes it easy to be offensive, mainly because the target is just a name or a profile picture. The interactions are less personal. Here are examples of bad behavior. I have personally been victim of ALL of these, as well as guilty of a few myself. Watch out for these both in others and in yourself.

Rape jokes

  • “Don’t drop the soap.”
  • “We totally raped your team.”
  • “He’d rape you if he knew that you listen to that singer.”

What’s really sad is that there’s no shortage of top ten lists.

Harassment

  • Not leaving the person alone when asked to.
  • Directing derogatory comments at an individual. “You are an idiot.”
  • Using profane or indecent language, or make obscene suggestions. “He’ll stick his d*** up your a** if you say no.”

Yes, many insults are considered harassment by the law. As a side note, law exists to tell people how to behave in society, like telling people that they shouldn’t kill others, which is basically an expanded version of the ten commandments.

Intimidation and threat

  • “If you use that programming language, this is what will happen: (posts image of a person with a gun)”
  • “We’ll take your head off.”
  • Including partners, employers or clients in a disagreement to put the person’s livelihood at risk.
  • Suggest that harm may come to the person’s children.

Basically, if it can cause someone great discomfort, it’s intimidation. If it can cause fear, it’s a threat.

Bullying

  • Spreading gossip and rumors with the intent of making others dislike or hate the person.
  • Posting material to intentionally defame or humiliate someone (e-mail with cc, blog posts, wikis, forum thread, etc.)
  • Vandalizing the person’s website, or websites that talk about that person.
  • Tweet trash about people without addressing them directly, but instead referring to them through mentions and links to their websites (exposing).

This is not limited to teenagers as you might think. Even CEOs sometimes engage in bullying. I’m not joking.

In the real world

Seeing others behave badly on the Internet makes such behavior seem acceptable, eventually making it seem acceptable offline. This got so out of hand that we need to explain to people that it’s not ok to use sexual imagery during a presentation at a tech conference. I even had a user group organizer draw his knife twice during a meeting because someone mispronounced his group’s name.

But what if the target did something wrong?

No. The reason is irrelevant. Nobody has the right to be the judge and executioner. If you see someone doing any of those things, no matter the reason, no matter what the other person did wrong, remind them that it is NOT acceptable behavior. They can’t solve a war with more rockets. That’s a great metaphor, use it. You can even post a link to this article.

Yes, you will be accused of tone policing and such, but you don’t need to reply. Anybody who thinks that the end justifies the means is just part of the problem. The silent witnesses of the thread already heard you. The seed has been planted. If some replies bother you, unsubscribe, ignore, block, stop notifications.

Will we succeed?

Everybody can make mistakes and correct them. If you want people to open their minds to criticism, call out their mistakes it in a non-threatening and non-humiliating way. People don’t respond well when their ego is attacked. Give them the benefit of the doubt to increase your “conversion rate”.

If enough people call out bad behavior, it will seem less okay. People will start to question themselves. Together, we will slowly tip the balance and eventually won’t need to explain the basics of respect on our websites.

Related read: On ethics and optimism.

Link
Bruno ŠkvorcUsing Guzzle with Twitter via Oauth (25.7.2014, 16:00 UTC)

In a previous article, we found out about Guzzle and how it can aid us in the task of establishing communication with third party API’s over HTTP. We used it to get the output of a random number generator and basic interaction with Github’s API. It also offers a series of ‘subscribers’, log-subscriber being one of them and showed us how easy it was to integrate monolog into it.

While interacting with Github’s API we discovered that it supports basic authentication (sending plain username/password). But what if the API we want to use just offers OAUTH authentication?

Guzzle’s Oauth

Implementing OAUTH from scratch can be a hard and time consuming task, and would be like reinventing the wheel… You could grab a third party library to deal with OAUTH requests, but why do that when guzzle has its own OAUTH subscriber? Yay!

First of all, I have to make you aware that Guzzle has dropped support for PHP 5.3, so you’ll need PHP 5.4 to follow this exercise. The installation instructions from the previous article changed a little bit, yet composer makes our lives a lot easier.

Our goal is to interact with the Twitter API and get our own timeline for which ever purpose we need. We’ll begin with our composer.json file:

Continue reading %Using Guzzle with Twitter via Oauth%

Link
PHP ClassesPHP Core Developers versus Facebook: Round 3 - The PHP Specification (25.7.2014, 08:43 UTC)
By Manuel Lemos
Recently Facebook developers played on another episode of a saga that seems to antagonize Facebook and PHP Core developers.

This time they announced an initiative to create a formal specification document for the PHP language.

Read this article to learn more about this and previous episodes of this saga, and what this may mean for the PHP future.
Link
Bruno ŠkvorcGetting Started with ImpressPages (24.7.2014, 16:00 UTC)

Content management systems (CMSs) are among the most used web tools nowadays. Users range from designers and developers, to bloggers and project managers. However, even with a wide range of products on the market, users often neglect to try out new systems and experience new possibilities.

To broaden my horizons, I decided to explore the market and see what other CMSs have to offer. This time I am going to look into ImpressPages, a PHP based CMS built on an MVC engine.

What makes ImpressPages differ from other CMSs is code structure, customizability, the admin panel built on Bootstrap and an inline drag and drop editor. In this step-by-step tutorial, I am going to cover the very first steps of launching a website on ImpressPages.

Downloading and Installing ImpressPages

Download ImpressPages first. It’s important to check if your system meets all the requirements for running the CMS:

  • Apache server with “mod_rewrite” (adapt to Nginx as needed)
  • PHP 5.3.3 or newer;
  • PHP GD library;
  • PHP mbstring library;
  • PHP curl library;
  • PHP PDO library;
  • MySQL 5 and higher;
  • 30+ MB free disk space;
  • ini_set function enabled.

After you create a database in MySQL which ImpressPages will use, unzip the contents of its archive into your web server’s root, or wherever you mean to serve it from, and run it (either via localhost, or through the virtual host you’ve set up, depending on your configuration). The installation process has been recently updated and now takes only two steps instead of six.

impresspages1

After configuring your site information (website name, email and time zone), you will be automatically transferred to database installation. If your system doesn’t meet all the requirements, an error will be shown with information on what needs to be fixed.

impresspages1

Once the installation is complete, you will be transferred straight to your new website. You’ll be be able to change the administrator’s credentials there.

Continue reading %Getting Started with ImpressPages%

Link
Simon HolywellFunctional Programming on Three Devs and a Maybe (24.7.2014, 13:11 UTC)
Link
PHP: Hypertext PreprocessorPHP 5.5.15 is released (24.7.2014, 00:00 UTC)
The PHP Development Team announces the immediate availability of PHP 5.5.15. This release fixes several bugs against PHP 5.5.14. All PHP users are encouraged to upgrade to this new version.For source downloads of PHP 5.5.15, please visit our downloads page. Windows binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
Link
PHP: Hypertext PreprocessorPHP 5.4.31 Released (24.7.2014, 00:00 UTC)
The PHP development team announces the immediate availability of PHP 5.4.31. Over 10 bugs were fixed in this release. All PHP 5.4 users are encouraged to upgrade to this version. For source downloads of PHP 5.4.31 please visit our downloads page, Windows binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
Link
Stefan KoopmanschapStop Fighting (23.7.2014, 21:15 UTC)

I posted this on Facebook about an hour ago, but this is not limited to Facebook. It should not be. So I’m reposting it here.

Today was a day like any other, except that it wasn’t. It was an official day of mourning in The Netherlands. This morning as I woke up, it was still a day like any other. When I got into my car to drive to work was the first time I noticed a difference: Other music, special requests. As I got to work, nothing was different and actually work was no different. A full day of work, a meeting that lasted until just after 4 o’clock so I completely missed the minute of silence. A day like no other day. Since I went home a bit early on monday and I wanted to finish a couple of tasks that I had left, I stayed a bit longer. That “bit” became quite a bit longer as I ran into a colleague and talked a bit.

I started my way back home in the car. Turned on the radio. Again, the radio felt “odd” yet also comforting because of the special programme. Aside from some tweets and pictures, I had not seen anything of the return of the first victims, I’d not followed it yet. While on the highway, I heard the report of the motorcade of hearses travelling from the airport to the army base where they will try to identify the bodies. Bit by bit, the music, the reports, the tweets, it kicked in.

As I neared the exit of the highway that I need to take to go home, I heard where the motorcade was. A quick calculation later I realized that if I’d stay on the highway, I could reach the route they’d be taking easily. I wasn’t sure. Should I? Isn’t that just sensationalism. I decided it wasn’t. I just wanted to pay my respect, especially since I wasn’t able to join the minute of silence.

I am so glad I did decide to go on. It was a surreal experience. First of all, as I turned onto the highway the motorcade was going to use a bit later, there were thousands and thousands of people standing on the side of the road. Even in the opposite direction, cars were stopping on the side of the road. So many people. Police was trying to ensure safety of people, but they weren’t enforcing the law. Obviously it’s usually not allowed to stop by the side of the road like this. Much respect to the police for the way they handled everything, giving only focus to safety and nothing else.

The motorcade came. That was odd. Strange. Impressive. Fourty hearses, one after the other, several of the drivers with tears in their eyes. I could do nothing but stand there and watch. Silent. Tears in my eyes.

I usually have very little faith in humanity. We’re destroying our world, we’re destroying eachother. What happened is proof of that. But what I felt today, while standing there, the enormous amount of people all there to pay respect, to welcome the dead bodies home, the love, respect and sadness mixed together, shared with everyone there. What a crazy experience. It restored a bit of my faith in humanity. It is possible to have this, unfortunately it will never last long.

I had tears in my eyes for the whole trip home. And as I write this, the tears are again forming. Never, ever in my life will I forget this. But never ever in my life do I ever want to see this many hearses drive by. Ever. Can we please, please all stop fighting eachother?

Link
Zeev SuraskiPHPNG binaries for Debian/Ubuntu (23.7.2014, 19:51 UTC)
Want to take PHPNG for a spin but don't have the time or inclination to build it?

You're in luck!  That is, at least if you're running Ubuntu 14.04 or Debian testing/unstable for now.

We published builds of the latest PHPNG-enabled codebase (as of July 18th) in packages that are compatible and can replace the Debian/Ubuntu versions of PHP.

To install:

# wget http://repos.zend.com/zend.key -O- 2> /dev/null | apt-key add -
# echo "deb http://repos.zend.com/zend-server/early-access/phpng/trusty zend" > /etc/apt/sources.list.d/phpng.list
# apt-get update
# apt-get install php5

All the package names are the same ones as Debian's / Ubuntu's (e.g. php5-cli, libapache2-mod-php5, php5-fpm).

We'll be updating these packages periodically - e.g. when new extensions are ported or other major changes happen.

Note:  This version presently identifies itself as PHP 5.7.0.  Don't get too attached to this version number - as PHPNG will definitely not come out under this version if we ever it.  If accepted, PHPNG will become the basis of the the next major version of PHP.


We're going to look into providing .rpm versions as well as Windows & Mac binaries in the next few weeks. 
Thanks to Lior Kaplan (@KaplanZend) for making this happen.

Enjoy!

Zeev

Link
Christian WeiskeEnable .phar handling in your web server (23.7.2014, 19:10 UTC)

PHP allows us to pack up whole applications in a single .phar file, but no web server software today lets PHP handle .phar files, giving you a download dialog or displaying the text contents of the file.

mod_php on Apache

Debian

Open /etc/apache2/mods-enabled/php5.conf and change the line

into

Corresponding bug report and patch: #639268

Fedora

Edit /etc/httpd/conf.d/php.conf and add the line

AddHandler php5-script .phar

Corresponding bug report: #1117140

Mac OS X

Open /etc/apache2/others/php5.conf and add the line

AddType application/x-httpd-php .phar

below the similar line ending with .php.

PHP-FPM

nginx

Use the following configuration to make PHP-FPM handle .php and .phar files:

location ~ \.(php|phar)(/.*)?$ {
    fastcgi_split_path_info ^(.+\.(?:php|phar))(/.+)$;
    set $path_info $fastcgi_path_info;
    fastcgi_param PATH_INFO $path_info;
    ...
}

Be aware of PHP bug #67587. You will get an endless redirection loop for all requests with a non-empty PATH_INFO (file.phar/foo). The fix is already committed and will released with PHP 5.6.0, 5.5.15 and 5.4.31.

Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP