Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

276
Vistas
On CentOS 8, php-cli is the only option?

I have a new server with CentOS 8, and I wanna have LAMP on it. In order to integrate PHP with Apache, I can remember there are two solutions: CLI and Apache module. But all howtos that I found are using php-fpm (which apparently is the CLI config with Apache).

I wanna know is there a way to config PHP as an Apache module on CentOS? If so, which package I should install using dnf?

One more thing, I can remember it was recommended to use PHP as an Apache module rather than using it as CLI. Is that still correct?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

First thing - php-cli is meant for console operation without knowledge of HTTP request, HTTP server env variables and so on. It is used for CLI tasks like scripts run by CRON.

What you need is to have mod_php package installed. Then you have to enable (and configure) it within apache configuration.

According to this article the metapackage php should already include mod_php, so it should suffice to enable it.

The module can be enabled interactively using a2enmod or by adding config directives manually, like:

LoadModule php7_module /usr/lib/apache2/modules/libphp7.3.so

The example is not from Centos, so YMMV.

over 4 years ago · Santiago Trujillo Denunciar

0

By php-cli, you probably meant php-cgi.

php-cli is meant for running scripts from within terminal, not to be invoked from web server.

mod_php is not threadsafe if used in threaded MPM like event.

For best performance you should try FPM, which is separate pool of workers that could be invoked via socket, regardless of actual MPM used by Apache.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda