cabriofahrer
Well-Known Member
Ich möchte Apache mit php haben, um php-Skripte zu erstellen und im Browser schnell testen zu können. Unter Windows hat man es da ganz einfach, man braucht nur Xampp zu installieren und schon kann man quasi loslegen.
Die Anleitungen hier im WIKI sind total veraltet, ich habe im Internet noch folgende Anleitungen gefunden, jedoch bin ich mir bei einigen Dingen nicht ganz sicher:
https://www.iceflatline.com/2011/11/how-to-install-apache-mysql-php-and-phpmyadmin-on-freebsd/
https://www.tecmint.com/install-apache-mariadb-and-php-famp-stack-on-freebsd/
Also Apache24 habe ich erfolgreich installiert, es funktioniert auch (http://localhost -> "It works!"), ebenso php71, php71-extensions und mod_php71.
Also ich nehme an, ich muss jetzt in /usr/local/etc/apache24/httpd.conf noch "DirectoryIndex index.html index.php" eintragen. Soweit, so gut.
Doch muss ich jetzt
cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini (sagt die eine Anleitung)
oder
/usr/local/etc/apache24/Includes/php.conf erstellen mit dem Inhalt
oder beides?
Andererseits meldet mod_php71 bei der Installation
Demnach soll dieser Inhalt also in die httpd.conf?
Also was nun genau?
Die Anleitungen hier im WIKI sind total veraltet, ich habe im Internet noch folgende Anleitungen gefunden, jedoch bin ich mir bei einigen Dingen nicht ganz sicher:
https://www.iceflatline.com/2011/11/how-to-install-apache-mysql-php-and-phpmyadmin-on-freebsd/
https://www.tecmint.com/install-apache-mariadb-and-php-famp-stack-on-freebsd/
Also Apache24 habe ich erfolgreich installiert, es funktioniert auch (http://localhost -> "It works!"), ebenso php71, php71-extensions und mod_php71.
Also ich nehme an, ich muss jetzt in /usr/local/etc/apache24/httpd.conf noch "DirectoryIndex index.html index.php" eintragen. Soweit, so gut.
Doch muss ich jetzt
cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini (sagt die eine Anleitung)
oder
/usr/local/etc/apache24/Includes/php.conf erstellen mit dem Inhalt
Code:
<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>
oder beides?
Andererseits meldet mod_php71 bei der Installation
Code:
Message from mod_php71-7.1.22:
***************************************************************
Make sure index.php is part of your DirectoryIndex.
You should add the following to your Apache configuration file:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
*********************************************************************
If you are building PHP-based ports in poudriere(8) with ZTS enabled,
add WITH_MPM=event to /etc/make.conf to prevent build failures.
Demnach soll dieser Inhalt also in die httpd.conf?
Also was nun genau?