普通网友 2012-01-26 12:53
浏览 58
已采纳

安装php 5.2.17问题后,在ubuntu 11.10上安装apache2

Recently I immigrate to Ubuntu and everything was going good to I configuring and compiling PHP 5.2.17 on Ubuntu before I install apache2.

Now when I try install apache2 it installs successfully but unfortunately during start apache2 I get this error:

[crit] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
Pre-configuration failed
Action 'configtest' failed.

Any ideas for fixing this issue?

  • 写回答

3条回答 默认 最新

  • dqxz96998 2012-01-26 20:53
    关注
    • Try deleting all the apache2 folders from /etc/ and /var/ folders. Then remove apache and its dependencies

      sudo apt-get --purge remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common

    • Then try installing apache again:

      sudo apt-get install apache2

      check the 127.0.0.1 to get "It works!" message ;) or check apache status by

      service apache2 status

    • now go with recompiling php 5.2.17 with fast-cgi enabled using this (edit it as you wish, this is mine) configurations options:

      ./configure --prefix=/usr/local/php-5.1.6 --with-config-file-path=/etc/php-5.1.6 --disable-ipv6 --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-exif --enable-ftp --with-gd --with-ttf --enable-gd-native-ttf --with-imap-ssl --enable-mbstring --with-mhash --with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pdo-sqlite --enable-shmop --enable-soap --enable-sockets --enable-sqlite-utf8 --with-xmlrpc --with-xsl --with-pear --enable-fastcgi

    • and then make & make install it. That should do the work

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分