Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

installing a php development-environment & IDE

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
User avatar
say_hello
Posts: 36
Joined: 2019-10-13 09:58

installing a php development-environment & IDE

#1 Post by say_hello »

hello dear Experts

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

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:

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

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



- a. sury the third party-respository:
cf: https://www.itzgeek.com/how-tos/linux/d ... ian-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.

Code: Select all

sudo apt update
Install the below packages.

Code: Select all

sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https
Import the public using the below commands.

Code: Select all

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

Code: Select all

sudo apt-key add apt.gpg
Add the SURY repository to your system.

Code: Select all

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

Code: Select all

sudo apt update
Install PHP

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

Code: Select all

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

server {

# other codes

Code: Select all

  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/d ... ian-8.html


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:

Code: Select all

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:

Code: Select all

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

Code: Select all

service apache2 start
If we ever want to restart the Apache server:

Code: Select all

service apache2 restart
To stop the apache2 service:

Code: Select all

service apache2 stop
To automatically start the apache service after reboot

Code: Select all

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.


question - wich ide do you suggest!?
Last edited by say_hello on 2020-05-18 00:46, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: installing a php development-environment & IDE

#2 Post by Head_on_a_Stick »

say_hello wrote:wich ide do you suggest!?
https://sanctum.geek.nz/arabesque/series/unix-as-ide/

And for your server stack try BCHS :mrgreen:
deadbang

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: installing a php development-environment & IDE

#3 Post by cuckooflew »

Good suggestion Head_on_a_Stick , all though I have tried a few of the so called "best" bloatwares EG :Eclipse or Microsoft Visual Studio, and others, nothing beats the Unix shell, and it's tools as a IDE. OpenBsd is perhaps the most "Unix like", in the "Unix Like" derrivatives category,...
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: installing a php development-environment & IDE

#4 Post by neuraleskimo »

I am going to second (or I guess...uhm...third) HOAS and cukooflew. However, I kinda like Atom for a GUI editor. I have also used kdevelop. It’s not bad.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: installing a php development-environment & IDE

#5 Post by cuckooflew »

I like "joe", find it easier to use the "vi" or "vim",
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
say_hello
Posts: 36
Joined: 2019-10-13 09:58

Re: installing a php development-environment & IDE

#6 Post by say_hello »

hello you - good day cuckooflew, neuraleskimo, Head_on_a_Stick

many thanks for your quick reply - i am glad to hear from you
Good suggestion Head_on_a_Stick , all though I have tried a few of the so called "best" bloatwares EG :Eclipse or Microsoft Visual Studio, and others, nothing beats the Unix shell, and it's tools as a IDE. OpenBsd is perhaps the most "Unix like", in the "Unix Like" derrivatives category,...
i will take a closer look at alll your ideas / tipps and considerations.

again - many thanks!! :D

Post Reply