PHP

PHP is a scripting language designed primarily for web development, but it’s also widely used as a general-purpose programming language.

featured tutorialHow To Install and Set Up Laravel with Docker Compose on Ubuntu 20.04
To containerize an application refers to the process of adapting an application and its components in order to be abl...

Erika Heidi • Published on June 9, 2020 · Updated on April 4, 2022

featured tutorialHow To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04
A “LAMP” stack is a group of open-source software that is typically installed together to enable a server to host dyn...

Erika Heidi • Published on April 23, 2020 · Updated on July 28, 2021

featured tutorialHow To Install Linux, Nginx, MySQL, PHP (LEMP stack) on Ubuntu 20.04
The LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications writt...

Erika Heidi • Published on April 29, 2020 · Updated on February 2, 2021

Subscribe to PHP
Get notified when new articles on PHP are published.
    All
  • 20 Results
    • Question

      How to get environment variables in a PHP serverless function?

      Hi all, You can define environment variables in a couple of ways as described in the serverless Functions documentation here: https://docs.digitalocean.com/products/functions/reference/project-configuration/#environme...
      Accepted Answer: If you were to try and use the environment variable directly, eg. echo $YOUR_VAR you will get a warning stating that the variable is not defined. You will have to use the builtin getenv() PHP function to get the value...
      1 answer0 days agoBy Bobby IlievPHPPHP FrameworksServerless
    • Tutorial

      How To Install Linux, OpenLiteSpeed, MariaDB, PHP (LOMP stack) on Ubuntu 20.04

      Set up a LOMP server running on Ubuntu 20.04 with PHP 8.1, MariaDB 10.7, and OpenLiteSpeed 1.7. The LiteSpeed PHP interpreter functions very quickly to serve dynamic PHP pages.
      1 day agoBy Apoorv PalMariaDBPHPUbuntu 20.04
    • Question

      storage:link command in yaml file remove all storage (PHP)

      Hi Guys, These commands in Yaml file run_command: |-php artisan migrate --forcephp artisan storage:linkheroku-php-apache2 public/ -> I use storage:link to link the images through “storage/images”-> but with every depl...
      1 answer7 days agoBy DriftingGreenBlueShipPHP
    • Question

      PHP Extensions. Which ones?

      I wanted to know which PHP extensions I have installed. How do I query that? how do I install specific extensions, once I find out if the ones I need for an installation are missing?
      2 answers16 days agoBy aecsp2000PHP
    • Question

      Simple file upload feature in my website won't work, (405 Not Allowed)

      I have a droplet and a website in /var/www/html/ index.html: <!DOCTYPE html><html lang=“en”><head><meta charset=“UTF-8”><title>PHP File Upload</title></head><body><form action=“fileUploadScript.php” method=“post” enct...
      1 answer17 days agoBy dufraDigitalOcean DropletsHTMLPHP
    • Tutorial

      How To Install PHP 8.1 and Set Up a Local Development Environment on Ubuntu 22.04

      PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program. This tutorial will guide y...
      22 days agoBy Jamon CamissoDevelopmentPHPUbuntu 22.04
    • Question

      WordPress Install sees PHP 7.0.x but Server says PHP 8.1 installed - how to connect things correctly?

      Hello all, I hope you can help. I’ve updated PHP on my droplet (LAMP 16.04) and when I do php -v, it tells me PHP 8.1. But my WordPress install is still seeing PHP 7.0.x. I added phpinfo.php and that ALSO says PHP 7.0...
      1 answer23 days agoBy Nicolas SteenhoutApachePHP
    • Question

      Why my php first page is only loaded other can't load and it only give me 404 how to configure with nginx

      How do i configure my php and route which using switch statement and depend on route it change another route. Now is it only show me first home page not other pages;
      1 answer25 days agoBy FloatingDarkCyanAnchorNginxPHP
    • Question

      The server requested authentication method unknown to the client [caching_sha2_password]

      When I run PHP’s mysqli_connect() to connect to a newly created MySQL 8 database cluster I get the following error: PHP Warning: mysqli_connect(): The server requested authentication method unknown to the client [cach...
      1 answer27 days agoBy Jim WiggintonDigitalOcean Managed MySQL DatabaseMySQLPHP
    • Tutorial

      How To Create Artisan Commands To Manage Database Records in Laravel

      If you followed along with this series so far, your database tables should be all set by now. However, you still need to implement a way to let users insert new entries in the links table. In this guide, we’ll create ...
      27 days agoBy Erika HeidiLaravelPHPPHP FrameworksDatabases
    • Tutorial

      How To Use Migrations to Create and Manage Database Tables in Laravel

      In this guide, you’ll create a database migration to set up the table where you’ll save the application links. In order to do that, you’ll use the Artisan command-line tool that comes with Laravel by default. At the e...
      27 days agoBy Erika HeidiLaravelPHPDatabasesPHP FrameworksDevelopment
    • Tutorial

      How To Bootstrap a New Laravel Application with Docker Compose

      In this guide, which is part of the series on How To Create a Links Landing Page in PHP with Laravel and Docker Compose, we’ll create a containerized developer environment to run Laravel and start building our applica...
      27 days agoBy Erika HeidiDockerPHPLaravel
    • Tutorial

      How To Create a Database Model in Laravel with Eloquent

      Eloquent is an object relational mapper (ORM) included by default within Laravel applications. It facilitates the task of interacting with database tables, providing an object-oriented approach to inserting, updating,...
      27 days agoBy Erika HeidiLaravelPHPPHP FrameworksDatabasesDevelopment
    • Tutorial

      How To Install and Secure phpMyAdmin on Ubuntu 22.04

      phpMyAdmin is an application that allows users to interact with MySQL databases through a web interface. This tutorial outlines the process of installing and securing phpMyAdmin on an Ubuntu 22.04 server.
      30 days agoBy Mark DrakeApacheApplicationsDatabasesMySQLPHPUbuntuUbuntu 22.04
    • Tutorial

      How To Install Linux, Nginx, MySQL, PHP (LEMP stack) on Ubuntu 22.04

      The LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications written in PHP. This is an acronym that describes a Linux operating system, with an Nginx (pronounced lik...
      30 days agoBy Erika Heidi, Jeanelle HorcasitasLEMPNginxPHPUbuntuUbuntu 22.04
    • Tutorial

      How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 22.04

      A “LAMP” stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating sy...
      30 days agoBy Kong Yang, Erika HeidiApacheLAMP StackMySQLPHPUbuntuUbuntu 22.04
    • Tutorial

      How To Install and Use Composer on Ubuntu 22.04

      Composer is a popular dependency management tool for PHP, created mainly to facilitate installation and updates for project dependencies.It will check which other packages a specific project depends on and install the...
      1 month agoBy Erika Heidi, Jamon CamissoUbuntuInteractivePHPUbuntu 22.04
    • Tutorial

      How To Install and Set Up Laravel with Docker Compose on Ubuntu 22.04

      Containerizing an application refers to the process of adapting an application and its components in order to be able to run it in lightweight environments known as containers. Container environments are isolated and ...
      1 month agoBy Erika Heidi, Jamon CamissoContainerDockerLaravelLEMPPHPPHP FrameworksUbuntuUbuntu 22.04
    • Tutorial

      How To Install and Configure Laravel with Nginx on Ubuntu 22.04 (LEMP)

      Laravel is an open-source PHP framework that provides a set of tools and resources to build modern PHP applications. With a complete ecosystem leveraging its built-in features, Laravel’s popularity has grown rapidly i...
      1 month agoBy Erika Heidi, Jamon CamissoPHPLaravelLEMPNginxPHP FrameworksUbuntuUbuntu 22.04
    • Tutorial

      How To Install Composer on Ubuntu 22.04 [Quickstart]

      In this quickstart guide, you’ll install Composer on an Ubuntu 22.04 server.
      1 month agoBy Erika Heidi, Jamon CamissoUbuntuInteractivePHPQuickstartUbuntu 22.04