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

Gonzalo Ayuso:
PHP application in SAP Cloud Platform. With PostgreSQL, Redis and Cloud Foundry
Sep 25, 2017 @ 14:25:01

Gonzalo Ayuso has a tutorial posted to his site showing you how to create a PHP application on a SAP platform that includes PostgreSQL and Redis via Cloud Foundry.

Keeping on with my study of SAP’s cloud platform (SCP) and Cloud Foundry today I’m going to build a simple PHP application. This application serves a simple Bootstrap landing page. The application uses a HTTP basic authentication. The credentials are validated against a PostgreSQL database. It also has a API to retrieve the localtimestamp from database server (just for play with a database server). I also want to play with Redis in the cloud too, so the API request will have a Time To Live (ttl) of 5 seconds. I will use a Redis service to do it.

He then walks you through the process of setting up both the platform and the application:

  • creating the services in cloud foundry
  • create our application (with either Silex or Lumen)
  • built out the features
  • running the application locally for testing
  • connecting to the cloud servers for PostgreSQL and Redis
  • set up logging
  • set up basic authorization

Full code and configuration is included for each step of the way (with Lumen examples included because Silex is "dead").

tagged: application tutorial development sap cloud platform postgresql redis

Link: https://gonzalo123.com/2017/09/25/php-application-in-sap-cloud-platform-with-postgresql-redis-and-cloud-foundry/


Trending Topics: