News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Securing Your Server Login
October 22, 2014 @ 10:43:27

While PHP developers usually pay more attention to the code level of things, it's good to know something about managing the servers their applications live on too. In this most recent tutorial from NetTuts.com they introduce you to some of the basic things you can do to help secure your server against potential attacks, more specifically around the logins.

Thanks to the growing abundance of useful self-hosted apps such as WordPress and the affordable growth of cloud hosting providers, running your own server is becoming increasingly compelling to a broader audience. But securing these servers properly requires a fairly broad knowledge of Linux system administration; this task is not always suitable for newbies.

They provide a list of seven things to look at (not a comprehensive list, but good none the less) to protect your system logins:

  • Update Your System Components
  • Change Your SSH Port From the Default
  • Activate a Firewall
  • Change Your Root Login Name
  • Activate Google Two-Factor Authentication
  • Switch to Using SSH Keys for Login
  • Manage Your Application Security

Each item includes a summary of the "why" and commands or links to other resources with more information.

0 comments voice your opinion now!
server login security top7 list tips hosting

Link: http://code.tutsplus.com/tutorials/securing-your-server-login--cms-22001

SitePoint PHP Blog:
Create a Movie Recommendation App with Prediction.io - Implementation
September 16, 2014 @ 10:54:16

The SitePoint PHP blog continues their series about creating a movie prediction engine with Prediction.io in this second part focusing on implementation. In the first part of the series they set up the server and configuration to make the jump into the code. This second part gets more into the application side and features working code linking the prediction engine with the TheMovieDB API.

He jumps right into the code, showing how to:

  • Fetch the data from the TMDB (via Flight and Guzzle)
  • Populate the data back into the Prediction.io database
  • Picking a random movie from the list (and outputting it to a page)
  • Get movies the engine predicts as recommendations

The recommendations are based on ratings on other movies in the database with most of that logic happening behind the scenes instead of in the PHP script. The results are then output to the page along with the other movie data.

0 comments voice your opinion now!
movie recommendation predictionio server tutorial api implementation

Link: http://www.sitepoint.com/create-movie-recommendation-app-prediction-io-implementation/

SitePoint PHP Blog:
Create a Movie Recommendation App with Prediction.io - Setup
September 15, 2014 @ 09:47:24

On the SitePoint PHP blog today Wern Ancheta has posted the first part of a series about creating a recommendation engine with the help of PHP and a system called Prediction IO.

In this tutorial, I'm going to walk you through Prediction IO, an open-source machine learning server. It allows you to create applications that could do the following: recommend items (e.g. movies, products, food), predict user behavior, identify item similarity and rank items. You can pretty much build any machine learning application with ease using Prediction IO. You don't have to deal with numbers and algorithms and you can just concentrate on building the app itself.

He walks you through the download and install of the Prediction IO software, how to start up the server and how to access its web interface. He shows you how to create an "engine" that will be used to make the recommendations and some of the settings allowing you to tailor it to your needs. The script will hook into The Movie DB API for content. He starts in on the PHP packages that will be needed to make the API connection and recommendations, but the actual code will come in a later article.

0 comments voice your opinion now!
movie recommendation predictionio server tutorial api movie

Link: http://www.sitepoint.com/create-movie-recommendation-app-prediction-io-setup/

Oracle Technology Network:
Installing PHP on Oracle HTTP Server 12c
April 25, 2014 @ 09:41:26

On the Oracle Technology Network site today they've posted an updated version of their guide to getting PHP installed on Oracle HTTP Server 12c, complete with all the commands you'll need to get the job done.

This article shows how to install PHP on Oracle HTTP Server 12c (OHS). PHP is a hugely popular, interpreted scripting language commonly used for web applications. OHS is the web server component for Oracle Fusion Middleware. It is based on the Apache HTTP Server. OHS includes a FastCGI module which can easily be configured to use PHP's bundled FastCGI Process Manager ("PHP-FPM"). PHP-FPM has become a standard way of installing PHP. I

The remainder of the post is broken down into the steps you'll need to get it all installed and working:

  • Install Oracle Linux
  • Install Oracle HTTP Server
  • Install Oracle Instant Client 12c
  • Install PHP
  • Configure PHP-FPM
  • Configure OHS
  • Start PHP-FPM & OHS

A simple test script (a phpinfo) is also included to help you ensure everything is running as it should be.

0 comments voice your opinion now!
oracle install http server 12c tutorial guide

Link: http://www.oracle.com/technetwork/articles/dsl/jones-php-ohs-2194096.html

AWS PHP Development:
Testing Webhooks Locally for Amazon SNS
April 08, 2014 @ 11:33:07

In a previous post the AWS for PHP blog showed how to set up webhooks for handling the callbacks from their SNS messaging service. In this next part of the series they continue the process, showing how you can test these hooks locally without needing to actually send the messages. This eliminates the need to deploy to a public-facing server just to test the hooks every time you need an update.

In a recent post, I talked about Receiving Amazon SNS Messages in PHP. I showed you how to use the SNS Message and MessageValidator classes in the AWS SDK for PHP to handle incoming SNS messages. The PHP code for the webhook is easy to write, but can be difficult to test properly, since it must be deployed to a server in order to be accessible to Amazon SNS. I'll show you how you can actually test your code locally with the help of a few simple tools.

Using PHP's own built-in webserver and a tool called ngrok to tunnel from the public internet to a local server. He includes the commands to set up the PHP script directory, the code to intercept the POSTed data from the request, validate it and send the subscription confirmation request. He helps you create an SNS "topic" through the management console and walks you through a sample test request while tailing the logs.

0 comments voice your opinion now!
aws amazon sns webhook testing local server ngrok tutorial

Link: http://blogs.aws.amazon.com/php/post/Tx2CO24DVG9CAK0/Testing-Webhooks-Locally-for-Amazon-SNS

SitePoint PHP Blog:
Piping Emails to a Laravel Application
February 17, 2014 @ 09:13:48

On the SitePoint PHP blog there's a new tutorial posted about piping emails to Laravel (well, a Laravel-based application). He shows how to have your application take data in from the current input, parse it and insert the data into a database.

In project management or support management tools, you will see this a lot: you can reply to an email message and it is automatically visible in a web application. Somehow, these tools were able to get those email messages right into their system. In this article, we are going to have a look at how we can pipe emails to our Laravel 4 application.

He walks you through the creation of an Artisan command, "email.parse", and using the PHP MIME Mail Parser library to extract data. He gets the to, from, title and message contents from the email and shows how to work with attachments too. Finally, he shows how to set up the mail server to pipe the incoming email though the PHP script for parsing.

0 comments voice your opinion now!
email parse message laravel tutorial mail server

Link: http://www.sitepoint.com/piping-emails-laravel-application/

Gonzalo Ayuso:
How to run a Web Server from a PHP application
November 11, 2013 @ 11:53:06

Gonzalo Ayuso has put together a post showing how (by implementing the Reactor design pattern) he created a simple web server inside a PHP application. It combines a few Symfony2 components and the React library to build a simple server in a bit more programatic way.

Normally we deploy our PHP applications in a webserver (such as apache, nginx, ). I used to have one apache webserver in my personal computer to play with my applications, but from time to now I prefer to use PHP's built-in webserver for my experiments. It's really simple. [...] With PHP we cannot do it. Sure? That assertion isn't really true. We can do it. I've just create one small library to do it in two different ways. First running the built-in web server and also running one React web server.

The idea is that all that would be needed is a stand-alone PHP script that could be run anywhere and start up its own web server, no other software required. He includes a simplified version of the example, showing how to make servers with both React and PHP's own server. He also includes an example of a basic Silex application that uses it as well as some benchmarks (with Apache ab) for each of the implementations and their request/response times on average for simple and Silex requests.

0 comments voice your opinion now!
builtin webserver server example react silex

Link: http://gonzalo123.com/2013/11/11/how-to-run-a-web-server-from-a-php-application/

Zend:
Apigility Progress report zf-mvc-auth, packagist, and PHP's built-in web server
November 01, 2013 @ 15:52:11

In a new post to the Apigility forums today Matthew Weier O'Phinney has announced the release of an authentication/authorization component for the recently announced project from Zend. Apigility is a Zend Framework-based tool for easily constructing and managing an API.

We've been working hard on Apigility since ZendCon, and have released some more code into the wild. zf-mvc-auth exists to provide both authentication and authorization for your APIs; in fact, it's a bit of a general-purpose library for ZF2 MVC apps! Right now, we support HTTP basic and digest authentication out of the box, and will be working next on OAuth support. Authorization is done by default via ZendPermissionsAcl, as we discovered a problem with using RBAC: RBAC is deny-by-default, which does not work when you want an open-by-default schema. You may opt-in to deny-by-default, as well as mark individual services as requiring permission by default. Finally, you have the option of denying/allowing per HTTP method of a service as well.

You can find out more details about this functionality in this quick screencast. The zf-apgility module depends on this new zf-mvc-auth module, so it will be included and available by default in your APIs. In that same post Matthew also talks about the listing of the Apigility packages on Packagist service and a note for those wanting to use the built-in HTTP server to run the tool (a PHP version dependency).

0 comments voice your opinion now!
apigility progress zendframework mvc authentication authorization packagist http server

Link: https://groups.google.com/a/zend.com/forum/#!topic/apigility-users/_mOPkxxmGYI

Gonzalo Ayuso:
Playing with event dispatcher and Silex. Sending logs to a remote server.
October 22, 2013 @ 09:44:57

Gonzalo Ayuso as a new post today showing the results of some of his testing with the event dispatcher and Silex to send logs to a remote server.

Today I continue playing with event dispatcher and Silex. Now I want to send a detailed log of our Kernel events to a remote server. We can do it something similar with Monolog, but I want to implement one working example hacking a little bit the event dispatcher. Basically we're going to create one Logger class (implementing PSR-3 of course).

He includes the sample code defining a "Logger" class that takes whatever message sent to it and pushes it into a given socket resource. He also creates a provider for the logger to implement it in the example and registers it with the event dispatcher. He hooks it into the request, get controller, terminate and exception events. On the other side he uses React to make a basic server to listen on port 4000 for the incoming log data.

0 comments voice your opinion now!
silex event dispatcher remote server log logger psr3

Link: http://gonzalo123.com/2013/10/21/playing-with-event-dispatcher-and-silex-sending-logs-to-a-remote-server/

Kevin Schroder:
What SSL $_SERVER variables are available in PHP
September 02, 2013 @ 09:24:04

Kevin Schroeder has shared the results of a question he wanted answered when it came to PHP with a HTTPS (SSL) connection - which of the $_SERVER variables are available.

I found myself wondering what HTTPS variables were available in the $_SERVER variable today and didn't find a specific list (and didn't have mod_ssl installed). So as a public service, here is what my server says.

Thanks to some of the additional handling and information the SSL connection provides to PHP, there's several additional variables including things like:

  • SSL_PROTOCOL
  • HTTPS (set to "on")
  • SSL_COMPRESS_METHOD
  • SSL_CLIENT_VERIFY
0 comments voice your opinion now!
ssl server superglobal variable

Link: http://www.eschrade.com/page/what-ssl-_server-variables-are-available-in-php/


Community Events





Don't see your event here?
Let us know!


api laravel zendserver package deployment series list symfony library framework install interview introduction language tips community release update podcast opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework