15 articles PHP

Everything PHP: from usage to special security constraints.

Working with Laravel config:cache

Laravel provides a static cache utility via Artisan to collapse configuration under config/ into a single file to boost performance. Configuration may be cached using: php artisan config:cache When run from terminal, the paths provided may be incorrectly referenced when the application is accessed from the web resulting in application errors. Solution Overwrite bootstrap/app.php to use a…

Setting timezone and locale

Overview Timezone and locale may be changed for the active user within the control panel via Account > Settings > Localization. Any timezone changes will be inherited by terminal applications and one-click applications created following adjustment. Other PHP applications will need to be adjusted on a case-by-case basis. Changing timezones in PHP applications A timezone may be…

Understanding fortification

Overview Fortification Mode is a new feature introduced in Launchpad as of May 2016. Fortification simplifies permission management for PHP-based applications, which run as a separate user from the account holder to enhance site security. Fortification mode is done within the control panel on a known application via Web > Web Apps. When disabled, fortification…

Switching PHP versions

Overview All platforms run a secondary web server with an older version of PHP other than the default. On newer platforms, v6+, this interpreter is PHP 5.4. These secondary interpreters are deprecated and should only be used temporarily until the offending site can be updated to make use of the latest, more secure release of PHP. Usage An site…

Installing Laravel

Overview Laravel is a PHP framework built around abstraction: do more with less coding. Laravel runs off PHP and MySQL. It is supported on any package, but works best with a package that supports terminal access. For this guide, we will assume terminal access is available. Installation Begin by logging into the terminal. PREREQUISITE: Install…

Using Composer

Overview Composer is a dependency manager for PHP akin to npm for Node and Bundler for Ruby. Composer is provided with hosting accounts on all v5+ platforms. On an older platform? Request a platform migration! This guide covers installing a local copy of Composer on your account. Installing You may download the latest version from its…

Viewing PHP settings

Overview Default PHP settings may be viewed either as a standalone page or within an application using phpinfo() or ini_get(). Default Environment Settings To view your default environment settings, create a file named phpinfo.php inside your document root. Inside this file, include the following line: <?php phpinfo(); ?> Access the URL phpinfo.php from your web…