search

Home  >  Q&A  >  body text

Syntax error when adding support for PHP when configuring Apache

QQ图片20191117185842.pngQQ图片20191117185909.pngThe service is loaded, but cannot be started. When starting httpd from the command line, an error of line 538 is displayed, Apache2.4.41 php7.3.11

呵呵哒呵呵哒1834 days ago1166

reply all(1)I'll reply

  • 古城老巷丶

    古城老巷丶2019-11-19 17:40:05

    Note: This step requires installing PHP before adding the configuration file to parse PHP. Modify the Apache configuration file: httpd.conf. By adding the parameter module, let Apache parse the extension .php into PHP. To avoid potential dangers, such as uploading or creating files like exploit.php.jpg and being executed as PHP, we no longer use Apache's AddType directive to set it.
    <FilesMatch \.php$> SetHandler application/x-httpd-php</FilesMatch>

    This is my solution, I don’t know if you can use it, the system is centos7

    reply
    0
  • Cancelreply