Tutorial: Configurarea Directivelor PHP în cPanel prin MultiPHP INI Editor
Introducere
cPanel oferă posibilitatea configurării directivelor PHP la nivel de domeniu (domeniu principal, subdomeniu, domeniu de completare etc.) prin MultiPHP INI Editor. Acesta este util pentru ajustarea setărilor PHP în funcție de cerințele aplicațiilor instalate sau ale site-urilor create. Printre directivele care pot fi modificate se numără display_errors
, error_reporting
, max_input_vars
, max_input_time
, memory_limit
, post_max_size
, log_errors
, upload_max_filesize
, etc.
Cerințe
Pentru a putea configura directivele PHP pentru un domeniu, subdomeniu sau domeniu de completare, trebuie să aveți acces la panoul de control cPanel. Accesul se poate realiza fie prin:
domeniu.xx/cpanel
cpanel.domeniu.xx
De asemenea, datele de autentificare pentru WHM se pot găsi în emailul cu informațiile de administrare ale VPS-ului.
Pași pentru Configurarea Directivelor PHP
1. Accesați cPanel
- Deschideți un browser web.
- Introduceți adresa URL a cPanel-ului (de exemplu,
http://domeniultau.com/cpanel
). - Conectați-vă folosind numele de utilizator și parola corespunzătoare.
2. Accesați MultiPHP INI Editor
- Odată conectat, navigați la secțiunea Software din panoul de control.
- Faceți clic pe MultiPHP INI Editor.
3. Selectați Domeniul
- În fereastra MultiPHP INI Editor, selectați domeniul pentru care doriți să modificați directivele PHP din meniul derulant.
4. Alegeți Mod de Editare
Există două moduri de configurare a directivelor PHP:
- Basic Mode: Configurarea directivelor folosind butoane interactive și câmpuri de input.
- Editor Mode: Editarea directă a fișierului
php.ini
, aflat în calea/home/UTILIZATOR/public_html/php.ini
.
4.1 Basic Mode
- În fila Basic Mode, sub Configure PHP INI basic settings, selectați domeniul dorit.
- Odată ce a fost selectat, se va încărca o listă cu directivele PHP de bază.
- Utilizați butoanele interactive și câmpurile de input pentru a modifica valorile dorite.
- După ce ați realizat modificările, faceți clic pe butonul Apply (Aplică) pentru a salva noile valori.
Mesaj de confirmare: Veți primi un mesaj care confirmă că setările au fost aplicate cu succes: Successfully applied the settings.
4.2 Editor Mode
- Dacă o directivă PHP nu este prezentă în lista din Basic Mode, treceți la fila Editor Mode.
- Selectați din nou domeniul dorit din listă.
- Aici, veți putea edita manual fișierul
php.ini
folosind un editor de text integrat. - Adăugați sau modificați directivele PHP conform cerințelor.
- După ce ați terminat de editat, faceți clic pe butonul Save (Salvează) din dreapta paginii.
Concluzie
Acum ați configurat cu succes directivele PHP utilizând MultiPHP INI Editor în cPanel. Este important să verificați funcționarea aplicațiilor dvs. web după modificarea acestor setări, pentru a vă asigura că totul funcționează conform așteptărilor. Dacă aveți întrebări sau întâmpinați probleme, consultați documentația oficială cPanel sau contactați suportul tehnic al providerului dvs. de găzduire.