How Do You Deploy LAPP with Frontend User Authentication?

Problem scenario
You want a web page that asks for a username and password (e.g., to log in).  The users will not know if the authentication is done via Apache or Postgres.  You happen want the authentication to be challenged against a Postgres database.  This way if you have backend access to the Postgres database, you can use “CREATE ROLE” or “CREATE ROLE jane PASSWORD ‘veryfun’ LOGIN” to create users.  

How Do You Troubleshoot HAProxy when The Service Seems to Work on The Back-end but You Cannot Use It from The Front-end (via a web browser)?

Problem scenario
Your HAProxy server seems to be up, but it is not working (as a load balancer or otherwise).  You use nmap or a PowerShell port testing program (see “Using PowerShell Version 3, How Do You Determine If a Port Is Open for a given IP Address?“).  You find that there is activity on port 80 and/or the traffic is not blocked over port 80. 

A List of Books About Website Performance, High Availability and Scalability

The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise (2nd Edition) by Martin L. Abbott and Michael T. Fisher 
Cloud Computing for Complete Beginners: Building and Scaling High-Performance Web Servers on the Amazon Cloud by Ikram Hawramani
Even Faster Web Sites: Performance Best Practices for Web Developers by Steve Souders
Getting Started with Memcached by Ahmed Soliman
High Performance Drupal: Fast and Scalable Designs by Jeff Sheltren,

A List of RESTful API Books

API Management: An Architect’s Guide to Developing and Managing APIs for Your Organization by Brajesh De
APIs: A Strategy Guide: Creating Channels with Application Programming Interfaces by Daniel Jacobson, Greg Brail and Dan Woods
ASP.NET Web API: Build RESTful web applications and services on the .NET framework by Joydip Kanjilal
Build APIs You Won’t Hate: Everyone and their dog wants an API, so you should probably learn how to build them by Phil Sturgeon
Building a RESTful Web Service with Spring by Ludovic Dewailly
Building RESTful Python Web Services by Gaston C.

How Can Variables Be Carried across Multiple PHP Pages (Not Just Immediate Subsequent Pages)?

Problem scenario
You want to pass variables from user input and have them carry across multiple pages.  You may or may not want the immediate subsequent page to use the variables.  You want pages (.php files) after several clicks of navigation (two pages or more) to employ the variables that were read in or calculated via PHP pages.

You are using session_set() and/or session_start() but they are not working.

A List of Apache Web Server Books

The Accidental Administrator: Linux Server Step-by-Step Configuration Guide by Don R Crawley
Administering Apache by Mark Allan Arnold, Clint Miller, James Sheetz and Jeff D. Almeida
Apache 2 Pocket Reference: For Apache Programmers & Administrators (Pocket Reference (O’Reilly)) by Andrew Ford
Apache Administrator’s Handbook by Rich Bowen, Daniel Lopez Ridruejo and Allan Liska
Apache Cookbook: Solutions and Examples for Apache Administration by Rich Bowen and Ken Coar
Apache Essentials: Install,

How Do You Integrate PHP with Postgresql?

Problem scenario
You want your PHP files (either a frontend web page or a purely backend script) to integrate with Postgres.  You want .php files to log into a Postgres database to run SQL commands.  How do you do this?

Solution
Install php5-pgsql or php7.0-pgsql.  It depends on your version of PHP.  Use this command to find out what version of PHP you have:  php –version

Install this module: