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

Medium.com:
Laravel 5.6 Preview - Single Server Scheduling
Nov 30, 2017 @ 09:40:46

On the Medium.com site today Laravel project lead and creator Taylor Otwell has posted about a feature coming in the 5.6 release of the Laravel framework: single server scheduling.

Today Laurence Ioannou, founder of the Laravel monitoring application Eyewitness.io, contributed a great new feature to Laravel 5.6 (February 2018 release): single server scheduling.

He illustrates the new feature by first defining a new "inspire" job, making it run hourly with the artisan command and not overlap with a previous execution. While this works with a simple server, it doesn't scale to multiple - that's where the "single server scheduling" comes in. The addition of this support provides a new onOneServer option that prevents the job from running elsewhere. It makes use of Redis or Memcache to store the information about which server it is running on so that will need to be enabled to use this feature.

tagged: laravel preview laravel56 single server scheduling job

Link: https://medium.com/@taylorotwell/laravel-5-6-preview-single-server-scheduling-54df8e0e139b

CloudWays Blog:
Speed Up PHP Application Deployments Via Laravel’s Envoyer
Aug 01, 2017 @ 11:49:42

The Cloudways blog has a new tutorial posted showing you how to speed up your deployment using Envoyer, a service from the Laravel ecosystem that's used to push code to an environment in an automated way.

Envoyer is a deployment tool used to deploy PHP applications. The best thing about the the tool is the zero downtime during deployment. This means that your application and the customers using it are not even aware of the fact that a new version has been pushed.

Envoyer works well with major repository management platforms such as GitLab and Bitbucket. Other benefits include unlimited deployments and team members. The following blog will guide you through the process of deploying applications on Cloudways using Envoyer.

The tutorial then walks you through creating an Envoyer account, connect it to a repository and set up the server to deploy the code to. They then show how to set up the deployment itself, make the push to the server and configure any post-deployment steps that may need to be performed. Screenshots are included in each step of the process so you can be sure you're on the right path.

tagged: laravel envoyer deployment tutorial introduction process configuration server

Link: https://www.cloudways.com/blog/php-laravel-envoyer-deployment/

Sergey Zhuk:
Build A Simple Chat With ReactPHP Socket: Server
Jun 28, 2017 @ 10:46:39

Sergey Zhuk has a new post to his site showing how you can use ReactPHP's socket component to build a simple chat service as a server runing on a remote port.

In this article, we are going to build a simple chat server based on ReactPHP Socket Component. With this component, we can build simple async, streaming plaintext TCP/IP or a secure TLS socket server.

There are client and server sockets. The server is bound to a specific port number and just waits listening on this port. The client knows the host of the server and the port on which the server is listening. When the connection between server and client is established, the data exchange begins.

He then gets into the code required to make the server and add in some additional functionality. He starts by creating the server to listen for incoming connections and has it write back a simple message to prove it's working correctly. He then moves on to the code required for sending and receiving data. This initial version just echoes back what the user submits. He takes this an expands it out to start on the intiial steps of the chat system - creating the connection pool for multiple clients, storing usernames of those connected and using that information when transmitting a message to all clients connected.

tagged: simple reactphp chat server tutorial server client username

Link: http://seregazhuk.github.io/2017/06/22/reactphp-chat-server/

Sergey Zhuk:
Build A Simple Chat With ReactPHP Socket: Server
Jun 28, 2017 @ 10:46:39

Sergey Zhuk has a new post to his site showing how you can use ReactPHP's socket component to build a simple chat service as a server runing on a remote port.

In this article, we are going to build a simple chat server based on ReactPHP Socket Component. With this component, we can build simple async, streaming plaintext TCP/IP or a secure TLS socket server.

There are client and server sockets. The server is bound to a specific port number and just waits listening on this port. The client knows the host of the server and the port on which the server is listening. When the connection between server and client is established, the data exchange begins.

He then gets into the code required to make the server and add in some additional functionality. He starts by creating the server to listen for incoming connections and has it write back a simple message to prove it's working correctly. He then moves on to the code required for sending and receiving data. This initial version just echoes back what the user submits. He takes this an expands it out to start on the intiial steps of the chat system - creating the connection pool for multiple clients, storing usernames of those connected and using that information when transmitting a message to all clients connected.

tagged: simple reactphp chat server tutorial server client username

Link: http://seregazhuk.github.io/2017/06/22/reactphp-chat-server/

Laravel News:
Manage your Laravel Forge Sites and Servers through Alfred
Apr 17, 2017 @ 16:04:38

On the Laravel News site there's a quick post showing you how you can use the Alfred tool to manage your Forge created servers. Alfred is a productivity tool for OSX systems that makes it easier to create shortcuts and interface with external applications in a convenient way.

Since the release of the Forge API developers have started creating a lot of apps and integrations, as well as an unofficial SDK. For those that use Alfred on the Mac, Vince Mitchell, launched a Workflow so you can quickly run many Forge commands right from your desktop.

The post includes the list of commands that the workflow includes allowing you to perform operations like opening the server's page in a browser, rebooting a system and restarting the web server on a specific machine. You can grab the workflow from the Packal site and drop it into your Alfred installation for immediate use.

tagged: alfred manage server laravel forge workflow example api

Link: https://laravel-news.com/forge-alfred-app

Laravel News:
Laravel Forge PHP SDK
Apr 05, 2017 @ 10:56:24

On the Laravel News site there's an announcement about the release of an SDK for the Forge API to make it easier to use the Laravel Forge API to manage your sites and servers.

Laravel Forge announced it’s first official API back in February and we have seen a lot of interesting uses like the F-Bar Mac app. Today, Mohamed Said released a PHP SDK for the API that covers all the features.

The post includes an example of using the SDK to create a new server on your Forge account, providing settings like size, name, region and provider. The post also lists out some of the other methods available in the SDK including:

  • revokeAccess
  • rebootMysql
  • installBlackfire
  • installPapertrail

You can find out more about this SDK on its GitHub repository.

tagged: laravel forge sdk github release functionality server management

Link: https://laravel-news.com/laravel-forge-php-sdk

Laravel News:
Laravel Forge API
Feb 28, 2017 @ 14:36:37

The Laravel News site has posted an official announcement about the Forge API being released for public use. Forge is a service that makes it easier to set up and configuration servers by taking care of a lot of the details for you.

Laravel Forge just announced it’s first official API that allows you to create and interact with your servers and sites.

This was a highly requested feature and the API includes support for all the features Forge provides including Servers, Services, Daemons, Firewall Rules, Sites, SSL, and more.

The post includes how to get started with the API, where to get your API token and how to send it over for authorization handling. You can find more information about the Forge API in the documentation on the Forge site.

tagged: laravel forge api release announcement server setup configure

Link: https://laravel-news.com/laravel-forge-api

Zend Framework Blog:
Implement a SOAP server with zend-soap
Jan 25, 2017 @ 11:22:58

The Zend Framework blog continues on its series of posts showing how to create various types of web services using various components from the framework itself. In this latest post they show you how to implement a SOAP server with zend-soap, a component specifically designed to "create, serve, and access SOAP applications, and parse and generate WSDL".

zend-soap provides a full-featured SOAP implementation. SOAP is an XML-based web protocol designed to allow describing messages, and, optionally, operations to perform. It's similar to XML-RPC, but with a few key differences: arbitrary data structures may be described [and] multiple operations may be described in a message as well.

The post goes on to talk about why they're show how to use these other service types when they primarily use REST in Apigility. It also covers some of the benefits using the module has over PHP's own SOAP handling. From there it's all about the code: first just creating the server and then populating it with the classes and functions it allows. The remainder of the post is split between two other methods for setting up the server: using it in a MVC application and as middleware in something like Zend Expressive.

tagged: zendframework soap server zendsoap tutorial api wsdl mvc middleware

Link: https://framework.zend.com/blog/2017-01-24-zend-soap-server.html

Freek Van der Herten:
Using Varnish on a Laravel Forge provisioned server
Jan 05, 2017 @ 14:19:15

Freek Van der Herten has a post to his site showing you how to set up Varnish with a Laravel Forge server. Forge is a service that makes it simpler to set up and manage servers and the applications installed without having to mess with the details yourself.

For a project we’re working on at Spatie we’re expecting high traffic. That’s why we spent some time researching how to improve the request speed of a Laravel application and the amount of requests a single server can handle. There are many strategies and services you can use to speed up a site. In our specific project one of the things we settled on is Varnish. In this post I’d like to share how to set up Varnish on a Forge provisioned server.

He gives a high level overview of what Varnish is and what benefit it provides to your application (complete with illustrations) and includes a link to a presentation introducing Varnish to PHP developers. Then he moves on to installing Varnish on the server, updating the VCL configuration file and opening a port for you to use when connecting to the Varnish service. He shows the difference in the response headers when Varnish handles the response and the updates you'll need to make to get your Laravel application to play nicely with Varnish with this package.

He ends the post with examples of how to test the performance difference and some final steps to update the config and have it run on port 80 instead of the default 6081.

tagged: laravel forge varnish provision server tutorial setup configure performance

Link: https://murze.be/2017/01/varnish-on-a-laravel-forge-server/

TutsPlus.com:
Building Your Startup: Security Basics
Dec 20, 2016 @ 11:55:58

The TutsPlus.com site has continued their "Building Your Startup" tutorial series with this latest article covering the "security basics" you'll need to adequately protect your application. This tutorial touches on both the server-level and code-level security aspects.

In today's episode, we'll dive into the basics of web server security. I'll cover securing the Linux VPS running Meeting Planner and some basic Yii security. In the next episode, I'll dive more into programmatic Yii application security.

The article starts off with the server side of things, introducing hosting options, keeping the server updated, configuring SSH for logins, setting up a firewall and SSL. With that solid base in place, it then starts on the code side covering the built-in functionality used to secure the backend and frontend functionality.

tagged: tutorial series yii2 startup security basics server code

Link: https://code.tutsplus.com/tutorials/building-your-startup-security-basics--cms-26702