Stații de lucru

OS - Windows 8802 Solutii

Reguli si plangeri 9 Solutii

OS - OS X 409 Solutii

Reguli de configurare 12 Solutii

Licentiere 18 Solutii

Securitate 180 Solutii

Copie de rezerva (Backup) 68 Solutii

Antivirus 71 Solutii

Aplicatii specifice 5003 Solutii

Hardware 290 Solutii

Arduino Distance Sensor with OLED Display

This project uses an HC-SR04 Ultrasonic Distance Sensor and a 0.96” I2C OLED display to measure and display the distance to an object in real-time.
It’s an excellent beginner-to-intermediate Arduino project that teaches sensor interfacing, I2C communication, and real-time data display.

In this guide, you’ll learn how to:

  • Connect and use the HC-SR04 Ultrasonic Sensor
  • Display the measured distance on an OLED screen
  • Format readings for easy readability

Components Required

Component Quantity Description
Arduino Uno / Nano / Mega 1 Main controller
HC-SR04 Ultrasonic Sensor 1 Measures distance via sound waves
0.96” OLED Display (SSD1306) 1 I2C display for output
Breadboard 1 For wiring
Jumper wires 6–8 Male-to-male connections
USB cable 1 For programming and power

The HC-SR04 measures distance by sending out an ultrasonic pulse and timing how long it takes to bounce back.
The Arduino calculates the distance based on the time delay and the known speed of sound.

Distance Formula:

Distance (cm) = (Time in microseconds × 0.034) / 2

The division by 2 accounts for the round trip of the sound wave (out and back).

Pin Connections

Component Arduino Pin Notes
HC-SR04 VCC 5V Power supply
HC-SR04 GND GND Common ground
HC-SR04 TRIG D9 Trigger pin
HC-SR04 ECHO D10 Echo pin
OLED VCC 5V Power
OLED GND GND Ground
OLED SDA A4 I2C Data
OLED SCL A5 I2C Clock

Note: On Arduino Mega, use SDA = 20 and SCL = 21 instead.

Arduino Code Example


#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define TRIG_PIN 9
#define ECHO_PIN 10
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
Serial.begin(9600);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);

// Initialize OLED
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("OLED not found!");
while (true);
}

display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.println("Distance Sensor");
display.display();
delay(1500);
}

void loop() {
long duration;
float distance;

// Send trigger pulse
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);

// Measure echo time
duration = pulseIn(ECHO_PIN, HIGH);
distance = (duration * 0.034) / 2;

// Print to Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");

// Display on OLED
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.println("Distance Sensor");

display.setTextSize(2);
display.setCursor(0, 30);
display.print(distance, 1);
display.println(" cm");
display.display();

delay(500);
}

Explanation: The Arduino sends a pulse from the HC-SR04 and measures the time it takes to return.
It then converts this time into distance and displays it on the OLED screen.

Code Breakdown

  • pulseIn() measures the length of time the echo pin is HIGH.
  • Distance is calculated using the speed of sound (0.034 cm/μs).
  • Adafruit_SSD1306 and Adafruit_GFX libraries drive the OLED.
  • Display refreshes every 0.5 seconds for updated readings.

Install these via Arduino IDE → Sketch → Include Library → Manage Libraries:

  • Adafruit SSD1306
  • Adafruit GFX

Search for “Adafruit SSD1306” and “Adafruit GFX” and click Install.

Troubleshooting

Issue Cause Solution
OLED blank Wrong I2C address Try changing 0x3C to 0x3D
Distance always 0 Echo pin not connected Check TRIG and ECHO wiring
Unstable readings Object too close or far HC-SR04 range: 2–400 cm
Serial Monitor empty Wrong baud rate Ensure 9600 baud in Serial Monitor

Optional Upgrades

  • Add a buzzer that activates when an object is too close.
  • Display a bar graph or animation on the OLED.
  • Send readings to the cloud using ESP8266 / ESP32.
  • Log readings to an SD card.

Applications

  • Parking assist system
  • Object detection robot
  • Smart trash bin (auto open lid)
  • Liquid level detector.
[mai mult...]

Remediere: Apple CarPlay not working

CarPlay poate să nu funcționeze din mai multe motive: conexiune defectuoasă, restricții iOS, probleme cu mașina sau bug software. Mai jos ai toți pașii de depanare, în ordine logică:

1. Verifică cerințele de bază

  1. iPhone compatibil: CarPlay funcționează pe iPhone 5 sau mai nou, cu iOS 7.1+.

  2. Mașina compatibilă: nu toate modelele au CarPlay (verifică manualul sau site-ul producătorului).

  3. Cablu Lightning original Apple — cablurile necertificate pot cauza deconectări.
    Dacă folosești wireless CarPlay, treci la pasul 4.

2. Verifică dacă CarPlay este activat pe iPhone

  1. Mergi la Settings → General → CarPlay.

  2. Dacă mașina ta apare în listă:

    • Apasă pe ea → „Forget This Car”.

    • Repornește iPhone-ul și reconectează-l.

  3. Dacă nu apare deloc, conectează iPhone-ul cu cablul și vezi dacă apare în listă.

3. Depanare pentru CarPlay cu cablu (USB)

Verifică:

  • Portul USB — curăță-l ușor; încearcă alt port (unele mașini au un singur port dedicat CarPlay).

  • Încearcă alt cablu original.

  • Asigură-te că iPhone-ul este deblocat la prima conectare.

Dacă nu se conectează:

  • Mergi la Settings → General → CarPlay → Available Cars și reconectează manual.

4. Depanare pentru CarPlay Wireless

  1. Activează Wi-Fi și Bluetooth pe iPhone

  2. Mergi la Settings → Wi-Fi → Activează Wi-Fi (chiar dacă e conectat deja la mașină)

  3. Mergi la Settings → Bluetooth și uită conexiunea mașinii („Forget This Device”)

  4. Repornește iPhone-ul și sistemul multimedia al mașinii

  5. Reasociază din meniul mașinii → „Add Apple CarPlay Device”

5. Verifică restricțiile

Uneori CarPlay e blocat de setările de ecran.

  1. Mergi la Settings → Screen Time → Content & Privacy Restrictions.

  2. Activează „Content & Privacy Restrictions”.

  3. Apoi mergi la:

    • Allowed Apps → CarPlay → ON

    • Allowed Content → Privacy → Allow CarPlay

6. Repornește tot

  1. Repornește iPhone-ul

  2. Repornește sistemul multimedia al mașinii (uneori ținând apăsat butonul Power 10 secunde)

  3. Reconectează cablul sau reinițiază conexiunea wireless.

7. Actualizează software-ul

  • iPhone: Settings → General → Software Update

  • Mașina: verifică la dealer dacă există update pentru sistemul de infotainment

Bug-urile CarPlay se remediază adesea prin actualizări.

8. Resetează setările de rețea (dacă nimic nu funcționează)

  1. Settings → General → Transfer or Reset iPhone → Reset → Reset Network Settings.
  2. iPhone-ul va uita toate conexiunile Wi-Fi / Bluetooth.

  3. Repornește și reconectează CarPlay.

9. Dacă apare mesajul „CarPlay not available” sau „Connection failed”

 Posibile cauze:

  • Sistemul mașinii e ocupat cu alt dispozitiv Bluetooth.

  • Portul USB nu e dedicat CarPlay.

  • Senzorul MFi (Made for iPhone) e defect → necesită service.

[mai mult...]

Rezolvare: Face ID not working on iPhone

1. Verifică lucrurile de bază

 1.1. Asigură-te că nimic nu acoperă fața sau senzorul

  • Curăță partea de sus a iPhone-ului (lângă cameră) — acolo e senzorul TrueDepth.

  • Scoate ochelarii de soare sau masca (uneori, Face ID nu recunoaște complet fața).

  • Ține telefonul la 25–50 cm de față (aprox. la nivelul ochilor).

2. Verifică setările Face ID

  1. Mergi la Settings → Face ID & Passcode.

  2. Introdu codul telefonului.

  3. Asigură-te că:

    • Face ID este activat.

    • Opțiunile (iPhone Unlock, iTunes & App Store, Wallet, Password AutoFill) sunt bifate.

  4. Dacă scrie „Face ID has been disabled” – uneori apare după mai multe încercări eșuate → repornește iPhone-ul.

3. Repornește iPhone-ul

  • Ține apăsat butonul lateral + volum sus (sau jos) → „slide to power off”.

  • Pornește din nou.

Aceasta rezolvă multe probleme temporare de sistem.

4. Resetează Face ID

  1. Settings → Face ID & Passcode → Reset Face ID.

  2. Apoi apasă Set up Face ID și urmează instrucțiunile.

Dacă nu poți configura Face ID (ex. apare mesajul “Face ID is not available”), treci la pasul următor.

5. Verifică actualizarea de sistem

  1. Settings → General → Software Update.

  2. Instalează cea mai nouă versiune de iOS.

Uneori, Face ID nu funcționează din cauza unui bug remediat într-un update.

6. Verifică dacă iPhone-ul a fost reparat recent

Dacă ecranul, camera frontală sau placa de bază au fost schimbate de un service neautorizat, senzorul TrueDepth poate să nu mai funcționeze (din motive de securitate Apple).
În acest caz, numai Apple Service poate recalibra Face ID.

7. Verifică în modul de siguranță hardware

Mergi la:
Settings → General → About → Face ID & Attention
Dacă scrie:

  •  „Face ID is not available”

  • „Unable to activate Face ID on this iPhone”

→ atunci problema e hardware (senzorul TrueDepth, camera IR, sau cablul flex).

Soluție: mergi la un Apple Authorized Service Provider.

8. Opțional – Reset complet (ca ultimă soluție)

Dacă toate celelalte eșuează:

  1. Fă un backup în iCloud sau iTunes.

  2. Settings → General → Transfer or Reset iPhone → Erase All Content and Settings.

  3. Reconfigurează iPhone-ul și testează Face ID fără a restaura backupul imediat (ca să vezi dacă problema revine).

[mai mult...]

Rezolvare: Microsoft Intune not working or opening

1. Dacă folosești Intune pe PC (Windows)

Simptom: aplicația Intune Company Portal nu se deschide, dă erori, sau nu se conectează.

 Pași de depanare:

  1. Verifică conexiunea la internet

    • Intune are nevoie de conexiune stabilă pentru autentificare și sincronizare.

    • Test: deschide un site (ex. bing.com). Dacă nu se încarcă, e problemă de rețea.

  2. Rulează aplicația ca administrator

    • Click dreapta → „Run as administrator”.

  3. Șterge cache-ul Intune

    • Apasă Win + R, tastează:

      %localappdata%\Packages\Microsoft.CompanyPortal_8wekyb3d8bbwe\LocalCache
    • Șterge conținutul acelui folder.

  4. Resetează aplicația Company Portal

    • Mergi la:
      Settings → Apps → Company Portal → Advanced Options → Reset.

  5. Actualizează aplicația

    • Deschide Microsoft Store → Biblioteca → Actualizează aplicațiile.

  6. Verifică contul de lucru (Azure AD)

    • În „Settings → Accounts → Access work or school”, deconectează și reconectează contul tău de serviciu.

  7. Rulează sincronizarea manual

    • Deschide Company PortalSettingsSync.

    • Dacă aplicația nu pornește deloc: deschide Settings → Accounts → Access work or school → Info → Sync.

  8. Verifică serviciile Intune

    • Apasă Win + R, scrie:

      services.msc
    • Asigură-te că serviciile „Device Management Enrollment Service” și „Microsoft Intune Management Extension” sunt în stare Running.

  9. Reinstalează aplicația

    • Dezinstalează Company Portal.

    • Reinstalează din Microsoft Store

2. Dacă folosești Intune pe Android / iPhone

Simptom: aplicația Intune Company Portal nu se deschide, se blochează sau nu se conectează.

Pași de depanare:

  1. Actualizează aplicația

    • Android → Google Play Store

    • iPhone → App Store

  2. Șterge cache-ul aplicației

    • Android:
      Settings → Apps → Company Portal → Storage → Clear Cache / Clear Data

    • iPhone: Dezinstalează și reinstalează aplicația.

  3. Verifică data și ora

    • Asigură-te că dispozitivul are data și ora corect setate automat — altfel autentificarea poate eșua.

  4. Verifică contul Microsoft

    • Deschide Company Portal → Menu → Devices și vezi dacă dispozitivul este înregistrat.

    • Dacă nu, reînrolează-l.

  5. Reînrolează dispozitivul

    • Dezinstalează aplicația.

    • Șterge dispozitivul din portalul Intune

    • Reinstalează aplicația și reautentifică-te.

3. Diagnostic suplimentar

Dacă după toate acestea Intune tot nu pornește, poți:

  • Deschide Event Viewer (eventvwr.msc) → „Applications and Services Logs → Microsoft → Intune” → vezi erorile.

  • Sau rulează comanda PowerShell:

    Get-WinEvent -LogName Microsoft-Intune-Management-Extension/Operational | Select -Last 10
[mai mult...]

Cum se instalează PHP 5.6 și 7.0 – 8.4 cu PHP-FPM și modul FastCGI pentru ISPConfig 3.2 cu apt pe Debian 11 până la 12

1 Notă preliminară

În acest ghid, veți adăuga depozitul suplimentar SURY pentru a instala pachetele PHP cu apt. Deoarece și alte pachete, precum OpenSSL, sunt actualizate, pachetele instalate de pe sury.org nu pot fi pur și simplu eliminate după instalare. Așadar, nu eliminați SURY ca sursă de depozit ulterior.

Vă rugăm să rețineți că PHP-FPM poate fi utilizat pe serverele Apache și Nginx, în timp ce FastCGI este disponibil numai pentru serverele Apache.

2 Add SURY repository

Mai întâi instalați aceste pachete necesare:

apt-get install -y apt-transport-https lsb-release ca-certificates

Acum adăugați cheia depozitului rulând această comandă:

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg >/dev/null 2>&1

și depozitul în sine:

echo "deb https://packages.sury.org/php/ $(lsb_release -c -s) main" > /etc/apt/sources.list.d/php.list

Acum actualizați lista de pachete:

apt-get update

Pentru a actualiza pachetele deja instalate din noul depozit, utilizați această comandă:

apt-get upgrade

3 Install additional PHP versions

Nu trebuie să instalați toate versiunile listate aici, instalați-le pe cele de care aveți nevoie..

3.1 Install PHP 5.6

Pentru a instala PHP, folosiți această comandă:

apt-get install php5.6 php5.6-cli php5.6-cgi php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-zip php5.6-mbstring php5.6-soap php5.6-opcache libicu65 php5.6-common php5.6-json php5.6-readline php5.6-xml

3.2 Install PHP 7.0

Pentru a instala PHP, folosiți această comandă:

apt-get install php7.0 php7.0-cli php7.0-cgi php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-zip php7.0-mbstring php7.0-soap php7.0-opcache php7.0-common php7.0-json php7.0-readline php7.0-xml

3.3 Install PHP 7.1

Pentru a instala PHP, folosiți această comandă:

apt-get install php7.1 php7.1-cli php7.1-cgi php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php7.1-zip php7.1-mbstring php7.1-soap php7.1-opcache php7.1-common php7.1-json php7.1-readline php7.1-xml

3.4 Install PHP 7.2

Pentru a instala PHP, folosiți această comandă:

apt-get install php7.2 php7.2-cli php7.2-cgi php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-zip php7.2-mbstring php7.2-soap php7.2-opcache php7.2-common php7.2-json php7.2-readline php7.2-xml

3.5 Install PHP 7.3

Pentru a instala PHP, folosiți această comandă:

apt-get install php7.3 php7.3-cli php7.3-cgi php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-zip php7.3-mbstring php7.3-soap php7.3-opcache php7.3-common php7.3-json php7.3-readline php7.3-xml

3.6 Install PHP 7.4

Pentru a instala PHP, folosiți această comandă:

apt-get install php7.4 php7.4-cli php7.4-cgi php7.4-fpm php7.4-gd php7.4-mysql php7.4-imap php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl php7.4-zip php7.4-mbstring php7.4-soap php7.4-opcache libonig5 php7.4-common php7.4-json php7.4-readline php7.4-xml

3.7 Install PHP 8.0

Pentru a instala PHP, folosiți această comandă:

apt-get install php8.0 php8.0-cli php8.0-cgi php8.0-fpm php8.0-gd php8.0-mysql php8.0-imap php8.0-curl php8.0-intl php8.0-pspell php8.0-sqlite3 php8.0-tidy php8.0-xsl php8.0-zip php8.0-mbstring php8.0-soap php8.0-opcache libonig5 php8.0-common php8.0-readline php8.0-xml

3.8 Install PHP 8.1

Pentru a instala PHP, folosiți această comandă:

apt-get install php8.1 php8.1-cli php8.1-cgi php8.1-fpm php8.1-gd php8.1-mysql php8.1-imap php8.1-curl php8.1-intl php8.1-pspell php8.1-sqlite3 php8.1-tidy php8.1-xsl php8.1-zip php8.1-mbstring php8.1-soap php8.1-opcache libonig5 php8.1-common php8.1-readline php8.1-xml

3.9 Install PHP 8.2

Pentru a instala PHP, folosiți această comandă:

apt-get install php8.2 php8.2-cli php8.2-cgi php8.2-fpm php8.2-gd php8.2-mysql php8.2-imap php8.2-curl php8.2-intl php8.2-pspell php8.2-sqlite3 php8.2-tidy php8.2-xsl php8.2-zip php8.2-mbstring php8.2-soap php8.2-opcache libonig5 php8.2-common php8.2-readline php8.2-xml

3.10 Install PHP 8.3

Pentru a instala PHP, folosiți această comandă:

apt-get install php8.3 php8.3-cli php8.3-cgi php8.3-fpm php8.3-gd php8.3-mysql php8.3-imap php8.3-curl php8.3-intl php8.3-pspell php8.3-sqlite3 php8.3-tidy php8.3-xsl php8.3-zip php8.3-mbstring php8.3-soap php8.3-opcache libonig5 php8.3-common php8.3-readline php8.3-xml

3.11 Install PHP 8.4

Pentru a instala PHP, folosiți această comandă:

apt-get install php8.4 php8.4-cli php8.4-cgi php8.4-fpm php8.4-gd php8.4-mysql php8.4-imap php8.4-curl php8.4-intl php8.4-pspell php8.4-sqlite3 php8.4-tidy php8.4-xsl php8.4-zip php8.4-mbstring php8.4-soap php8.4-opcache libonig5 php8.4-common php8.4-readline php8.4-xml

4 Resetați PHP-ul implicit al sistemului de operare la versiunea corectă

PHP-ul implicit al sistemului de operare trebuie să rămână la versiunea originală. Pentru a remedia acest lucru, executați aceste comenzi una câte una.:

update-alternatives --config php
update-alternatives --config php-cgi
update-alternatives --config php-fpm.sock

On Debian 12, choose 8.2; on Debian 11, choose 7.4; on Debian 10, choose 7.3.

5 Add PHP versions to ISPConfig

În ISPConfig 3, puteți configura noile versiuni PHP în Sistem > Versiuni PHP suplimentare > Adăugați o nouă versiune PHP.

Add the distribution’s default PHP version

Mai întâi, trebuie să adăugați o nouă versiune pentru versiunea PHP deja instalată. Versiunea implicită depinde de versiunea pe care o utilizați.:

Debian 10: PHP 7.3
Debian 11: PHP 7.4
Debian 12: PHP 8.2

Vedeți mai jos configurația pentru versiunea dvs..

Configurarea pentru versiunile suplimentare de PHP

PHP 5.6

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi5.6
Path to the php.ini directory: /etc/php/5.6/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php5.6-fpm
Path to the php.ini directory: /etc/php/5.6/fpm/
Path to the PHP-FPM pool directory: /etc/php/5.6/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php5.6

PHP 7.0

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.0
Path to the php.ini directory: /etc/php/7.0/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.0-fpm
Path to the php.ini directory: /etc/php/7.0/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.0/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.0

PHP 7.1

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.1
Path to the php.ini directory: /etc/php/7.1/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.1-fpm
Path to the php.ini directory: /etc/php/7.1/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.1/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.1

PHP 7.2

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.2
Path to the php.ini directory: /etc/php/7.2/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.2-fpm
Path to the php.ini directory: /etc/php/7.2/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.2/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.2

PHP 7.3

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.3
Path to the php.ini directory: /etc/php/7.3/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.3-fpm
Path to the php.ini directory: /etc/php/7.3/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.3/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.3

PHP 7.4

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.4
Path to the php.ini directory: /etc/php/7.4/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.4-fpm
Path to the php.ini directory: /etc/php/7.4/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.4/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.4

PHP 8.0

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.0
Path to the php.ini directory: /etc/php/8.0/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.0-fpm
Path to the php.ini directory: /etc/php/8.0/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.0/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.0

PHP 8.1

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.1
Path to the php.ini directory: /etc/php/8.1/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.1-fpm
Path to the php.ini directory: /etc/php/8.1/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.1/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.1

PHP 8.2

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.2
Path to the php.ini directory: /etc/php/8.2/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.2-fpm
Path to the php.ini directory: /etc/php/8.2/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.2/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.2

PHP 8.3

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.3
Path to the php.ini directory: /etc/php/8.3/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.3-fpm
Path to the php.ini directory: /etc/php/8.3/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.3/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.3

PHP 8.4

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.4
Path to the php.ini directory: /etc/php/8.4/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.4-fpm
Path to the php.ini directory: /etc/php/8.4/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.4/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.4.

[mai mult...]

Cum se instalează PHP 5.6 și 7.0 – 8.4 cu PHP-FPM și modul FastCGI pentru ISPConfig 3.2 cu apt pe Ubuntu 22.04 – 24.04

În acest ghid, veți adăuga repozitoriul SURY suplimentar pentru a instala pachetele PHP cu apt. Deoarece și alte pachete, precum OpenSSL, sunt actualizate, pachetele instalate de pe sury.org nu pot fi eliminate pur și simplu după instalare. Așadar, nu eliminați SURY ca sursă de repozitoriu ulterior. Rețineți că PHP-FPM poate fi utilizat pe serverele Apache și Nginx, în timp ce FastCGI este disponibil doar pentru serverele Apache.

Add the repository:

add-apt-repository -y ppa:ondrej/php

Now update the package list:

apt-get update

To upgrade already installed packages from the new repository use this command:

apt-get upgrade

3. Instalați versiuni suplimentare de PHP

Nu trebuie să instalați toate versiunile listate aici, instalați-le pe cele de care aveți nevoie.

3.1 Install PHP 5.6

Pentru a instala PHP 5.6, utilizați această comandă:

apt-get install php5.6 php5.6-cli php5.6-cgi php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php5.6-zip php5.6-mbstring php5.6-soap php5.6-opcache libicu65 php5.6-common php5.6-json php5.6-readline php5.6-xml

3.2 Install PHP 7.0

Pentru a instala PHP 7.0, utilizați această comandă:

apt-get install php7.0 php7.0-cli php7.0-cgi php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-zip php7.0-mbstring php7.0-soap php7.0-opcache php7.0-common php7.0-json php7.0-readline php7.0-xml

3.3 Install PHP 7.1

Pentru a instala PHP 7.1, utilizați această comandă:

apt-get install php7.1 php7.1-cli php7.1-cgi php7.1-fpm php7.1-gd php7.1-mysql php7.1-imap php7.1-curl php7.1-intl php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php7.1-zip php7.1-mbstring php7.1-soap php7.1-opcache php7.1-common php7.1-json php7.1-readline php7.1-xml

3.4 Install PHP 7.2

Pentru a instala PHP 7.2, utilizați această comandă:

apt-get install php7.2 php7.2-cli php7.2-cgi php7.2-fpm php7.2-gd php7.2-mysql php7.2-imap php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl php7.2-zip php7.2-mbstring php7.2-soap php7.2-opcache php7.2-common php7.2-json php7.2-readline php7.2-xml

3.5 Install PHP 7.3

Pentru a instala PHP 7.3, utilizați această comandă:

apt-get install php7.3 php7.3-cli php7.3-cgi php7.3-fpm php7.3-gd php7.3-mysql php7.3-imap php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-zip php7.3-mbstring php7.3-soap php7.3-opcache php7.3-common php7.3-json php7.3-readline php7.3-xml

3.6 Install PHP 7.4

Pentru a instala PHP 87.4, utilizați această comandă:

apt-get install php7.4 php7.4-cli php7.4-cgi php7.4-fpm php7.4-gd php7.4-mysql php7.4-imap php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl php7.4-zip php7.4-mbstring php7.4-soap php7.4-opcache libonig5 php7.4-common php7.4-json php7.4-readline php7.4-xml

3.7 Install PHP 8.0

Pentru a instala PHP 8.0, utilizați această comandă:

apt-get install php8.0 php8.0-cli php8.0-cgi php8.0-fpm php8.0-gd php8.0-mysql php8.0-imap php8.0-curl php8.0-intl php8.0-pspell php8.0-sqlite3 php8.0-tidy php8.0-xsl php8.0-zip php8.0-mbstring php8.0-soap php8.0-opcache libonig5 php8.0-common php8.0-readline php8.0-xml

3.8 Install PHP 8.1

Pentru a instala PHP 8.1, utilizați această comandă:

apt-get install php8.1 php8.1-cli php8.1-cgi php8.1-fpm php8.1-gd php8.1-mysql php8.1-imap php8.1-curl php8.1-intl php8.1-pspell php8.1-sqlite3 php8.1-tidy php8.1-xsl php8.1-zip php8.1-mbstring php8.1-soap php8.1-opcache libonig5 php8.1-common php8.1-readline php8.1-xml

3.9 Install PHP 8.2

Pentru a instala PHP 8.2, utilizați această comandă:

apt-get install php8.2 php8.2-cli php8.2-cgi php8.2-fpm php8.2-gd php8.2-mysql php8.2-imap php8.2-curl php8.2-intl php8.2-pspell php8.2-sqlite3 php8.2-tidy php8.2-xsl php8.2-zip php8.2-mbstring php8.2-soap php8.2-opcache libonig5 php8.2-common php8.2-readline php8.2-xml

3.10 Install PHP 8.3

Pentru a instala PHP 8.3, utilizați această comandă:

apt-get install php8.3 php8.3-cli php8.3-cgi php8.3-fpm php8.3-gd php8.3-mysql php8.3-imap php8.3-curl php8.3-intl php8.3-pspell php8.3-sqlite3 php8.3-tidy php8.3-xsl php8.3-zip php8.3-mbstring php8.3-soap php8.3-opcache php8.3-common php8.3-readline php8.3-xml

3.11 Install PHP 8.4

Pentru a instala PHP 8.4, utilizați această comandă:

apt-get install php8.4 php8.4-cli php8.4-cgi php8.4-fpm php8.4-gd php8.4-mysql php8.4-imap php8.4-curl php8.4-intl php8.4-pspell php8.4-sqlite3 php8.4-tidy php8.4-xsl php8.4-zip php8.4-mbstring php8.4-soap php8.4-opcache php8.4-common php8.4-readline php8.4-xml

4.    Resetați PHP-ul implicit al sistemului de operare la versiunea corectă

PHP-ul implicit al sistemului de operare trebuie să rămână la versiunea originală. Pentru a remedia acest lucru, executați aceste comenzi una câte una:

update-alternatives --config php
update-alternatives --config php-cgi
update-alternatives --config php-fpm.sock

Pe Ubuntu 20.04, alegeți 7.4; pe Ubuntu 22.04, alegeți 8.1 și pe Ubuntu 24.04, alegeți 8.3.

 5. Adăugați versiuni PHP în ISPConfig

În ISPConfig 3, puteți configura noile versiuni PHP în Sistem > Versiuni PHP suplimentare > Adăugați o nouă versiune PHP.

Adăugați versiunea PHP implicită a distribuției

Mai întâi, trebuie să adăugați o nouă versiune pentru versiunea PHP deja instalată. Versiunea implicită depinde de versiunea pe care o utilizați:

Ubuntu 20.04: PHP 7.4
Ubuntu 22.04: PHP 8.1
Ubuntu 24.04: PHP 8.3

Consultați mai jos configurația pentru versiunea dvs.

Configurarea pentru versiunile suplimentare de PHP

PHP 5.6

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi5.6
Path to the php.ini directory: /etc/php/5.6/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php5.6-fpm
Path to the php.ini directory: /etc/php/5.6/fpm/
Path to the PHP-FPM pool directory: /etc/php/5.6/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php5.6

PHP 7.0

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.0
Path to the php.ini directory: /etc/php/7.0/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.0-fpm
Path to the php.ini directory: /etc/php/7.0/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.0/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.0

PHP 7.1

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.1
Path to the php.ini directory: /etc/php/7.1/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.1-fpm
Path to the php.ini directory: /etc/php/7.1/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.1/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.1

PHP 7.2

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.2
Path to the php.ini directory: /etc/php/7.2/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.2-fpm
Path to the php.ini directory: /etc/php/7.2/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.2/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.2

PHP 7.3

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.3
Path to the php.ini directory: /etc/php/7.3/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.3-fpm
Path to the php.ini directory: /etc/php/7.3/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.3/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.3

PHP 7.4

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi7.4
Path to the php.ini directory: /etc/php/7.4/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php7.4-fpm
Path to the php.ini directory: /etc/php/7.4/fpm/
Path to the PHP-FPM pool directory: /etc/php/7.4/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php7.4

PHP 8.0

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.0
Path to the php.ini directory: /etc/php/8.0/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.0-fpm
Path to the php.ini directory: /etc/php/8.0/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.0/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.0

PHP 8.1

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.1
Path to the php.ini directory: /etc/php/8.1/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.1-fpm
Path to the php.ini directory: /etc/php/8.1/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.1/fpm/pool.d/

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.1

PHP 8.2

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.2
Path to the php.ini directory: /etc/php/8.2/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.2-fpm
Path to the php.ini directory: /etc/php/8.2/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.2/fpm/pool.d

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.2

PHP 8.3

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.3
Path to the php.ini directory: /etc/php/8.3/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.3-fpm
Path to the php.ini directory: /etc/php/8.3/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.3/fpm/pool.d

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.3

PHP 8.4

Fast-CGI settings:

Path to the PHP FastCGI binary: /usr/bin/php-cgi8.4
Path to the php.ini directory: /etc/php/8.4/cgi/

PHP-FPM settings:

Path to the PHP-FPM init script: php8.4-fpm
Path to the php.ini directory: /etc/php/8.4/fpm/
Path to the PHP-FPM pool directory: /etc/php/8.4/fpm/pool.d

Versiunea CLI, de exemplu, pentru cron jobs, are numele php8.4.

[mai mult...]