How To: PHP make install under Debian (etch) with Apache 2
Last Update: 26. Nov. 2008
Since Apache 2.x, the config files are separated in different files and folders. Goodbye good old httpd.conf where every little config was written in. But it is not bad, once you know where which config is now written.
But to the problem now! If you want to compile PHP on your Debian Etch machine, the 'make install' command will
partly fail because the PHP make install command can't find a LoadModule in the httpd.conf. Why's that? Because Debian uses apache2.conf and the httpd.conf is now empty. Of course there are no LoadModule lines in it.
This is the error message appearing after the make install command:
chmod 644 /usr/lib/apache2/modules/libphp5.so apxs:Error: Activation failed for custom /etc/apache2/httpd.conf file.. apxs:Error: At least one `LoadModule' directive already has to exist.. make: *** [install-sapi] Error 1
To still be able to use the make install command (which installs the shared libraries which are needed by PHP scripts) do the following steps, found on http://bugs.php.net/bug.php?id=29157:
Furthermore, at least one other LoadModule directive must be present in /etc/apache2/httpd.conf before running 'make install', or apxs2 will fail to insert the line (it doesn't know where to put it), and the 'make install' fails. For this purpose I use:
# Commented-out dummy LoadModule directive for PHP's make install
# LoadModule dummy_module /usr/lib/apache2/modules/mod_dummy.so
That way, the PHP 5 LoadModule directive gets inserted right after the (commented-out) dummy line. After you made 'make install' be sure to delete the inserted line afterwards.
AWS Android Ansible Apache Apple Atlassian Automation BSD Backup Bash Bluecoat CMS Chef Cloud Consul Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder