装完GD就应该重新编译PHP以及Apache

解决方案 »

  1.   

    卸载GD老版本后安装GD2,重新编译PHP和Apache,应该没有问题了
      

  2.   

    重新编译php需不需要先卸载原来的版本?
      

  3.   

    对了,重新编译php会不会对apache有影响?这是最重要的,会不会影响我现在网站的使用?
      

  4.   

    你以前要是使用--with-apxs2=/usr/local/apache2/bin/apxs编译的你的php的话,就不用再重新带上apache了。
    如果不是的话,就还跟以前一样,重新configure make install你的php。不会有什么影响的。最好备份一下你的php.ini文件。
      

  5.   

    不好意思,我真的很菜,系统是别人装的,我不知道他是怎么编译的。我只能通过phpinfo()看到编译配置为--with-apxs2=/usr/sbin/apxs',完整的configure command为:'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'我因为不知道该怎么配置,刚才默认安装一遍php4.3.8,就是
    #./configure
    #make
    #make install
    重起apache后,还是老样子,phpinfo()还是显示4.2.2
    不要笑话我,万望赐教!!!
      

  6.   

    编译完PHP后,可能还要编译Apache
      

  7.   

    真是麻烦啊,其他什么都无所谓,就是怕影响到现在网站的使用。因为我对linux不是很熟,怕弄坏了,短时间修复不了就惨了。
      

  8.   

    我安装的时候是不是需要附带--with-apxs2=/usr/sbin/apxs选项?
      

  9.   

    使用--with-apxs2=/usr/sbin/apxs安装的时候提示我apache版本太低?不能安装!
      

  10.   

    慢慢来首先如果你的apache版本是2.0以上的话,并且使用了Dynamic Shared Object (DSO),你就需要指定--with-apxs2=/usr/sbin/apxs,如果你使用的是apache1.xx版本的话,你就需要指定
    --with-apxs=/usr/sbin/apxsgd库最简单的方法是安装rpm包,除了标准库之外,还需要将开发包也装上。不然的话php报无法找到gd库文件。更新gd库以后必须重新编译php,如果apache不是动态模块装载的模式,也需要编译apache
      

  11.   

    用apxs2的话提示(我的系统是apache2.0.40,redhat linux)
    Configuring SAPI modules
    checking for AOLserver support... no
    checking for Apache 1.x module support via DSO through APXS... no
    checking for Apache 1.x module support... no
    checking for member fd in BUFF *... (cached) no
    checking for mod_charset compatibility option... no
    checking for Apache 2.0 filter-module support via DSO through APXS... no
    checking for Apache 2.0 handler-module support via DSO through APXS... apxs:Error: Invalid query string `APU_BINDIR'.
    apxs:Error: Invalid query string `APR_BINDIR'.
    ./configure: line 1: /apu-config: No such file or directory
    ./configure: line 1: /apr-config: No such file or directory
    configure: error: Please note that Apache version >= 2.0.44 is required.我用rpm包安装看看
      

  12.   

    Please note that Apache version >= 2.0.44 is required.
    你需要安装apache 2.0.44以上的版本,你现在的版本是2.0.40估计这个版本有问题,目前的php不支持
      

  13.   

    http://dev.csdn.net/develop/article/23/23669.shtm