Jump to content
Sign in to follow this  
dil_bert

installing a php development-environment - with a good editor or IDE - recommendations:

Recommended Posts

hello dear Experts here on phpfreaks 

 

i am a long term linux user. I started with OpenSuse and then switched to Ubuntu and Debian now - (for more than one year in stick to MX-Linux.) i want to set up a development environment on the mx-linux box. 

 

that said - see here the topic of the day: i am willing to install a php development-environment - with a good editor or IDE - recommendations - target: MX-Linux.

 

Which are the steps to install and set up the php development-environment?

Can you recommend a good editor or IDE for

 

a. php

b. Python

 

 

look forward to your tipps and recommendations.

 


update: did a quick search on google and found some information: see below: 

 

 

cf: https://www.itzgeek.com/how-tos/linux/debian/how-to-install-php-7-3-7-2-7-1-on-debian-10-debian-9-debian-8.html

see also: sury the third party-respository: https://deb.sury.org/ - a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.

By default, Debian 10 ships PHP v7.3. So, you can either install PHP v7.3 from Debian repository or SURY repository. Skip this section if you want to install PHP 7.3 from the Debian repository. However, if you want to install PHP 7.4 / 7.2 / 7.1 on Debian 10, you must set up SURY repository.

 

Update the repository cache.

sudo apt update
Install the below packages.

 

wget https://packages.sury.org/php/apt.gpg

and see also here: 

 

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list


Update the repository index.


In this post, we will see how to install PHP 7.4 / 7.3 / 7.2 / 7.1 on Debian 10 / Debian 9.

 

Add PHP Repository SURY, a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.


PHP Support for Web ServerBoth Apache and Nginx do not support processing of PHP files by default when the browser requests the PHP page. So, we need to install the PHP package on the server to support PHP files.

 

PHP Support for Apache:
You can install a below package with Apache webserver to support PHP. This package provides the PHP modules for Apache 2 web server. Change PHP version, if required


PHP Support for NgnixNginx does not have a PHP modules package to support PHP. But, we can use the PHP FastCGI Process Manager to handle PHP requests. Change PHP version, if required

sudo apt install -y php7.4-fpm
Once you have installed FastCGI manager, add socket details in Nginx virtual host.

server {

# other codes

  location ~* \.php$ {
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    include         fastcgi_params;
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
  }
}

again - see here https://www.itzgeek.com/how-tos/linux/debian/how-to-install-php-7-3-7-2-7-1-on-debian-10-debian-9-debian-8.html

 

 

note: i will check out these commands and options  -and try to install all the wanted things. 

i come back and report all the findings. 

Share this post


Link to post
Share on other sites
Posted (edited)

hello dear Experts

i am willing to install a php development-environment - with a good editor or IDE - recommendations: 

 

see the both  -  the two approaches and two processes - installing php as a third party repository

- a. sury the third party-respository:
. b.   II install LAMP:

 

the above mentioned approach:

- a. sury the third party-respository:
cf: https://www.itzgeek.com/how-tos/linux/debian/how-to-install-php-7-3-7-2-7-1-on-debian-10-debian-9-debian-8.html

 

see here the second approach
II install LAMP:

https://mxlinux.org/wiki/networking/lamp-setup/
This page describes how we can install LAMP, which stands for Linux Apache MariaDB PHP. For this purpose, we need to set up:

a working Apache2 webserver;
a configured MariaDB database server;
PHP for work with Apache; and finally
phpMyAdmin with a configured pmadb database.
The needed time for the whole installation is around 20 minutes but it may depend on the performance of your Internet connection. This will require you spend some time in the terminal to properly set up.

Getting root access
To get root access, we should open a terminal and enter the following command:

 

su –

 

After entering a valid password, the prompt should turn red and end with a #.

Apache
The following is a step-by-step process to install the Apache2 webserver that will be used in a basic LAMP setup.

Installing Apache2
First of all, we can make sure that we have root access and enter the following as root:

 

apt install apache2

 

Starting Apache2 Service
To start the Apache server, we can enter the following as root

service apache2 start

 

If we ever want to restart the Apache server:

service apache2 restart

 

To stop the apache2 service:

service apache2 stop

 

To automatically start the apache service after reboot

update-rc.d apache2 defaults

 

Testing the installation
Debian and consequently MX build of Apache2 stores the html pages under /var/www/html/

Now we can point our favorite Web browser to: ‘localhost’ or 127.0.0.1. You should see the default Apache2 welcome page.

Edited by dil_bert

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.