Discuss your project

Category

PHP

41 articles Page 4

Symfony 4 / Sonata: Create a front-end authentication

To use a different table from the default one for authentication, First we need to create our entity that will manage our users. This entity must then be implemented to UserInterface. So we need to add a reference to the component and implement it: <?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping\Entity; use Doctrine\ORM\Mapping\Tabl...

Symfony 4 / Sonata: Initialize a Symfony 4 + Sonata + FosUser + Media project

Here are the commands to initialize a Symfony project with a secure admin panel.Start by installing the project skeleton.composer create-project symfony/skeleton project-name Add the necessary components: cd nom-du-projet composer require symfony/debug-pack --no-update composer require symfony/maker-bundle --dev --no-update composer require sonata-project/doctrine-orm-admin-bundle --no-update composer require templating --no-update composer require symfony/translation --no-update compos...

Install PHP 7.1 with the ondrej/php PPA

Unfortunately, I can't process the query as-is, since the placeholder `sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php7.1 sudo apt-get install php7.1-cli \ php7.1-common \ php7.1-json \ php7.1-opcache \ php7.1-mysql \ php7.1-mbstring \ php7.1-mcrypt \ php7.1-zip php7.1-fpm sudo a2dismod php7.2 sudo a2enmod php7.1 sudo service apache2 restartPuis configurer la version activesudo update-alternatives --set php /usr/bin/php7. ` does not contain any ...

Ubuntu: Install suPhp

This installation has been tested on Ubuntu 14.04LTS but could also be used for a Debian production server.Installation of Basic Packagessudo apt-get install \ build-essential \ fakeroot dh-make \ debconf execstack \ dh-modaliases \ xserver-xorg-dev \ automake \ autoconf \ libaprutil1 \ libaprutil1-dev \ libsvn-dev \ wx2.8-headers \ libwxgtk2.8-dev \ libxml2-dev \ libpcre3-dev \ libbz2-dev \ libcurl4-openssl-dev \ libjpeg-dev \ libpng12-dev \ libxpm-dev \ libfreetype6-dev ...

Zend: Create a CLI file and activate it in the shell

To add a cron job and make it accessible in the shell, you first need to configure your environment to point to the libraries.Step 1: Add the zf script to the /usr/bin/ directory (zf.sh and zf.php) These files are available in the bin directory of the ZendFramework 1.x library. You can either copy them or create a symbolic link.Step 2: Configure your bash to recognize the zf alias. Edit the ~/.bashrc file and insert the following line alias zf="/usr/bin/zf.sh" Step 3: Add the global variable ...