我正在使用以下命令从源代码构建 php 5.5:
sudo ./configure --enable-mbstring --enable-intl --with-gd --with-mysql --with-pdo-mysql --with-curl --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --includedir=/usr/include --prefix=/opt/php5
然后
sudo make install
在编译过程中完全没有问题,我可以在最后执行 php -v 这给了我正确版本的 php 但问题是当我尝试使用 httpd (apache) 并且当我执行 'http://localhost' 时我可以请参阅 php 源代码。
我无法启用 mod_php 并且我的 /etc/httpd/modules/ 目录中没有 mod_php。我需要做什么来创建一个 mod_php 以便我可以在 httpd (apache) 服务器中启用它?