PHP ClassesPHP and JavaScript Innovation Award Report May 2016 Edition - February 2016 nominees (25.5.2016, 04:33 UTC)
By Manuel Lemos
This is the May edition of the Innovation Award podcast hangout recorded by Manuel Lemos and Arturs Sosins to comment on the outstanding features of all the past month nominees and winners PHP and JavaScript packages, the prizes that the authors earned, starting with the nominees from the month of February 2016.

Listen to the podcast, or watch the hangout video to learn why the nominated packages were considered to be innovative, as well the current rankings of the Innovation Award Championship by author and by country.
Link
SitePoint PHPPlease: Automated CMS and Framework Installs in Vagrant (24.5.2016, 22:00 UTC)

If you're a web developer, possibly one of your most boring and repetitive tasks is the configuration of the basic setup for every new project. Configuring your my-project.dev domain, creating the database, installing WordPress (or any other CMS/Framework) for the thousandth time: you already know how to do it. What if you could automate all of that?

Well, actually, you can.

Please is a simple bash script that helps to automate the installations of many CMSs and Frameworks by configuring them automatically into your Vagrant box, adding a development domain name into your host file, and even a database if needed.

Let's take a look.

Important Notice

Since Please is still in beta version (0.3), I suggest that you not use it immediately in your production, but to test it first --- to make sure everything works as you require. There's no risk about losing data and so on --- the worst thing that could happen is that it's not working --- but it's always better to be safe.

Pre-requisites

So, first, you need to setup a Vagrant box.

If you're new to Vagrant, I suggest you read this nice introduction to understand the whole thing and get started the right way.

A small Vagrant box (a fork of box.scotch.io) has been created for this project, and it's named Please Box.

Here are all the steps for installation:

$ git clone  https://github.com/jehanf/please-box.git please-box
$ cd please-box
$ vagrant up

Please also requires the Vagrant HostsUpdater plugin to get everything to work. The installation is quite simple; here's the command to save you some time:

$ vagrant plugin install vagrant-hostsupdater

That's it, you're all set to start using Please!

Install Please

There are very few steps needed to install Please, as written in the official documentation:

$ git clone  https://github.com/jehanf/please.git
$ sudo chmod +x please/please
$ sudo mv please/please /usr/local/bin/please && sudo rm -R please

The && sudo rm -R please part is only to keep your computer clean; since the git clone part clones the full folder of the repo, including the README file, you may not want to keep these on your computer.

Continue reading %Please: Automated CMS and Framework Installs in Vagrant%

Link
Christian WeiskeTYPO3: Oops, an error occurred! (24.5.2016, 17:43 UTC)

On your TYPO3 production machine (TYPO3_CONTEXT=Production) an extbase plugin crashes and only leaves a cryptic message:

Oops, an error occurred! Code: 201605240939366c16aa1f

If you did not modify TYPO3's error handling , the real error message is logged by TYPO3\CMS\Core\Log\Writer\FileWriter into typo3temp/logs/typo3_*.log.

This does of course not help if you don't have SSH access to the live server. The exceptions also do not follow normal error flow - which means a docker logs -f does not show it, and they will also not show up on your log server.

To fix this, overwrite the default configuration in typo3conf/AdditionalConfiguration.php:

<?php
// configure default logger to log to nginx error log
// so that we'll see this in graylog
$GLOBALS['TYPO3_CONF_VARS']['LOG'] = [
     'writerConfiguration' => [
         \TYPO3\CMS\Core\Log\LogLevel::WARNING => [
             \TYPO3\CMS\Core\Log\Writer\PhpErrorLogWriter::class => []
         ]
     ]
];

Do not try to put this into typo3conf/LocalConfiguration.php; TYPO3 will merge it with the default config, leaving you with both FileWriter and PhpErrorLogWriter. TYPO3's default configuration is defined in typo3/sysext/core/Configuration/DefaultConfiguration.php.

Link
Nomad PHPMake Your Code Do Your Job (24.5.2016, 14:56 UTC)

August - EU
Presented By

Larry Garfield
August 18, 2016
20:00 CEST

The post Make Your Code Do Your Job appeared first on Nomad PHP.

Link
Rob AllenView header and body with curl (24.5.2016, 12:13 UTC)

I recently discovered the -i switch to curl! I have no idea why I didn't know about this before…

Curl is one of those tools that every developer should know. It's universal and tends to be available everywhere.

When developing APIs, I prefer to use curl to view the output of a request like this:

$ curl -v -H "Accept: application/json" https://api.joind.in/
*   Trying 178.208.42.30...
* Connected to api.joind.in (178.208.42.30) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: api.joind.in
* Server certificate: Gandi Standard SSL CA 2
* Server certificate: USERTrust RSA Certification Authority
* Server certificate: AddTrust External CA Root
> GET / HTTP/1.1
> Host: api.joind.in
> User-Agent: curl/7.43.0
> Accept: application/json
>
< HTTP/1.1 200 OK
< Date: Sun, 15 May 2016 11:05:27 GMT
< Server: Apache
< X-Powered-By: PHP/5.6.4
< Access-Control-Allow-Origin: *
< Content-Length: 363
< Content-Type: application/json; charset=utf8
<
* Connection #0 to host api.joind.in left intact
{"events":"https:\/\/api.joind.in\/v2.1\/events","hot-events":"https:\/\/api.joind.in\/v2.1\/events?filter=hot","upcoming-events":"https:\/\/api.joind.in\/v2.1\/events?filter=upcoming","past-events":"https:\/\/api.joind.in\/v2.1\/events?filter=past","open-cfps":"https:\/\/api.joind.in\/v2.1\/events?filter=cfp","docs":"http:\/\/joindin.github.io\/joindin-api\/"}

-v is for verbose and so you get told all the information you could possibly want. However, usually, I only want to know the response's headers and body.

Enter the -i switch!

$ curl -i -H "Accept: application/json" https://api.joind.in/
HTTP/1.1 200 OK
Date: Sun, 15 May 2016 11:10:24 GMT
Server: Apache
X-Powered-By: PHP/5.6.4
Access-Control-Allow-Origin: *
Content-Length: 363
Content-Type: application/json; charset=utf8

{"events":"https:\/\/api.joind.in\/v2.1\/events","hot-events":"https:\/\/api.joind.in\/v2.1\/events?filter=hot","upcoming-events":"https:\/\/api.joind.in\/v2.1\/events?filter=upcoming","past-events":"https:\/\/api.joind.in\/v2.1\/events?filter=past","open-cfps":"https:\/\/api.joind.in\/v2.1\/events?filter=cfp","docs":"http:\/\/joindin.github.io\/joindin-api\/"}

Much better!

-i is for include and from the man page:

Include the HTTP-header in the output. The HTTP-header includes things like server-name, date ofthe document, HTTP-version and more…

This is exactly what I want without the information that I don't!

Link
PHP ClassesInstalling a Database Schema from a JSON format (24.5.2016, 04:37 UTC)
By Samuel Adeshina
Installing a database schema is an important setup task that most PHP applications need to do.

The Scripd package can generate the necessary SQL to install all types of database structures that you may need from the database itself, tables, fields, indexes, stored procedures, views, etc., all from a database independent format based on JSON.

Read this article to learn how to use the Scripd package to generate database independent SQL to install your database schema.
Link
Voices of the ElePHPantInterview with Beau Simensen (24.5.2016, 04:01 UTC) Link
PHP ClassesNotable PHP package: PHP PDF to Text (23.5.2016, 19:35 UTC)
By Manuel Lemos
Many Web applications need to deal with PDF documents and their contents for instance to search for particular text.

However, the PDF format is not easy to analyse and it contains complex structures and often compressed binary data.

The PHP PDF to Text package not only is able to parse the PDF format in pure PHP, but it can also decompress any document objects and extract their page position, making it easy to search PDF documents using only with PHP code, thus without resorting to external programs, special extensions or Web service APIs.

Read this article to learn more details about how this notable PHP package works.
Link
PHP ClassesDetecting Malicious Users behind Anonymous Proxies using IP2Proxy (23.5.2016, 05:03 UTC)
By Elma Dilaver Gheith
Proxy servers are used by many users to bypass Web site restrictions. Sometimes malicious users are hiding behind proxies to commit fraud because a third party anonymous server is hiding their real location.

Fortunately it is possible to detect when users are behind proxies by looking up their IP address using IP2Proxy databases of known proxies.

Read this article to learn how to use IP2Proxy database to detect when users are behind proxies, so you can take the necessary measures to avoid that those users may cause some kind of harm.
Link
Ben Ramsey7 Tips for php[tek] (22.5.2016, 00:00 UTC)

This week, I’m attending php[tek]. This is my seventh php[tek], and the first I’ve attended not as a speaker. It’s one of my favorite conferences, and I didn’t want to miss its first year in a new city: St. Louis. As we gear up for the eleventh php[tek] conference, I thought I’d list my seven tips for getting the most out of your php[tek] experience.

  1. Hang out in the evenings, after the conference sessions.

    php[tek] is known for hosting events in the evening, from video games and board games to hackathons. Make sure you you stick around and take part. One of the best features of PHP is its community, and taking part in the events following the day’s conference sessions is a great way to build relationships in this community.

  2. After the conference events, follow folks to the bar.

    Do you have to be a drinker? Nope. There’s much more to a bar than drinking. In Chicago (Rosemont), php[tek] had Shoeless Joe’s, a nearby sports bar, where attendees would congregate each evening following the conference activities. In St. Louis, I don’t know what that place will be, but I’m certain there will be one. This is where relationship-building continues. There’s so much that can come from these relationships—friendships, business opportunities, mentors, and more!

  3. Take advantage of the “hallway track,” and don’t forget the regular sessions.

    There is a high level of value gained by conversing with other conference attendees in the hallways between (and during) sessions at conferences. This “hallway track” has been touted as one of the most important reasons for attending a conference. The hallway allows you to build relationships and gain better understanding and insight into the technologies and tools you use on a daily basis. It’s an invaluable offering of any conference, but don’t forget about the value gained by attending the sessions. A healthy balance of both will help you have an awesome conference experience.

  4. Attend the morning keynote sessions.

    The morning keynote sessions set the tone for the conference, and this year’s keynotes are no different. While it’s tempting to stay up into the wee hours of the morning—building relationships at the St. Lou

Truncated by Planet PHP, read more at the original (another 11791 bytes)

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