我對這樣做有點陌生,但我的目標是獲得Apache 2.4和PHP 5.5,運行在運行Ubuntu 12.10的非託管VPS上。我成功地讓他們都能夠操作並提供html和PHP內容,但是我在設置中遇到了一些問題。首先用opcache.so這是我想使用PHP 5.5的主要原因。我有模塊opcache.so在conf文件,但我收到此錯誤Apache的:錯誤加載opcache.so失敗:opcache.so:undefined symbol:compiler_globals - Apache 2.4/PHP 5.5/Ubuntu 12.10 VPS
Apache的錯誤日誌: 週二15年3月4日:19:00.624085 2014] [mpm_event:聲明] [PID 1853:TID 140683657721600 ] AH00489:配置Apache/2.4.8-dev(Unix)PHP/5.5.11-dev - 恢復正常操作 加載失敗/usr/lib/php5/20100525/opcache.so:/ usr/lib/php5/20100525 /opcache.so:undefined symbol:compiler_globals
研究我還沒有找到任何人解決了這個問題。我發現的一些以前的帖子建議PHP可能需要以不同的方式編譯。我不知道它是否與我的具體配置有關,但這是我第一次從github源碼編譯。我的PHP信息顯示「PHP版本5.5.11-dev」...是我可以編譯的最新版本嗎?
我在下面使用的配置是否正確?
任何建議,以解決這個錯誤將不勝感激。
cd /usr/local/src/
git clone --branch PHP-5.5 https://github.com/php/php-src.git php55
cd /usr/local/src/php55
rm -rf configure
./buildconf --force
./configure \
--enable-opcache \
--enable-bcmath \
--enable-calendar \
--enable-dba \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-shmop \
--enable-sigchild \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-wddx \
--enable-zip \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-bz2 \
--with-config-file-path=/usr/local/apache2/conf \
--with-curl \
--with-gd \
-–with-jpeg-dir=/usr/lib \
--with-gettext \
--with-mcrypt \
--with-mysql-sock=/run/mysqld/mysqld.sock \
--with-mysqli \
--with-openssl \
--with-pdo-mysql \
--with-pdo-pgsql \
--with-xmlrpc \
--with-zlib
make && \
make test && \
make install