Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

I'm trying to setup PhpPgAdmin. But the service won't start.

I get the following output when sudo systemctl status httpd.service:

● httpd.service - Apache Web Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2020-04-14 12:05:14 CDT; 1s ago
    Process: 31293 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
   Main PID: 31293 (code=exited, status=1/FAILURE)

Apr 14 12:05:14 ardc-pc systemd[1]: Started Apache Web Server.
Apr 14 12:05:14 ardc-pc httpd[31293]: AH00526: Syntax error on line 10 of /etc/httpd/conf/extra/phppgadmin.conf:
Apr 14 12:05:14 ardc-pc httpd[31293]: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
Apr 14 12:05:14 ardc-pc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 12:05:14 ardc-pc systemd[1]: httpd.service: Failed with result 'exit-code'.

This is my phppgadming.conf file:

Alias /phppgadmin "/usr/share/webapps/phppgadmin"
<Directory "/usr/share/webapps/phppgadmin">
     DirectoryIndex index.php
     AllowOverride All
     Options FollowSymlinks
     Require all granted

     # phppgadmin raises deprecated warnings that lead
     # to parsing errors in JS
     php_flag display_startup_errors off
     php_flag display_errors off
     php_flag html_errors off
</Directory>

Just like the wiki page of PhpPgAdmin says it should be.

I'm running Arch Linux. I installed php, apache HTTP Server and everything worked, I saw my index page in localhost. But when I add the config file to PhpPgAdmin the server stop. What am I doing wrong?.


Solution 1:

I figured out what was wrong.

As it says in the wiki page of apache HTTP Server I needed to install the PHP extension. Following up the instructions everything work!.