#!/bin/bash hvconfig_pre() { # Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql # directive (make sure you specified path to where MySQL is installed on # your system). # Build directory doesn't work: # gcc: Zend/zend_language_scanner.c: No such file or directory # --mandir: # If not specified, php installs some man pages under /usr/php # (phpize.1, php.1 and php-config.1) CONFIGURE_OPTS+=" \ --localstatedir=/var \ --datadir=/usr/share/php \ --mandir=/usr/share/man \ --with-config-file-path=/etc \ --enable-fpm \ --with-fpm-user=${HTTPD_USER} \ --with-fpm-group=${HTTPD_USER} \ --with-zlib \ --enable-bcmath \ --with-bz2 \ --enable-calendar \ --enable-dba=shared \ --with-gdbm \ --with-gmp \ --enable-ftp \ --with-gettext \ --enable-mbstring \ --with-readline \ --with-apxs2 \ --with-mysql=/usr \ --with-openssl=/usr \ --with-gd \ --with-freetype-dir=/usr \ --with-t1lib \ --enable-gd-native-ttf \ --enable-exif" # IMAP # --with-imap=/usr/lib/uw-imap \ # --with-imap-ssl=/usr/include/openssl" } hvbuild_post() { if [ -f /etc/php.ini ]; then cp /etc/php.ini /etc/php.ini.old fi cp ${SRC_DIR}/php.ini-production /etc/php.ini if [ "x${USE_HTTPD}" = "xyes" ]; then # To enable PHP support in the Apache web server, a new AddType # directive must be added to the httpd.conf file. if ! grep -q "application/x-httpd-php" /etc/httpd/httpd.conf; then echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf fi # Est-ce nécessaire? #cgi.discard_path = 1 if ! grep -q "DirectoryIndex" /etc/httpd/httpd.conf | grep "index.php"; then sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \ /etc/httpd/httpd.conf fi fi }