【问题标题】:Will re-configuring PHP erase the previous configure commands?重新配置 PHP 会清除以前的配置命令吗?
【发布时间】:2013-09-21 23:53:29
【问题描述】:

我在一台机器上安装了 PHP,运行 phpinfo() 会显示很多在 PHP 首次配置时发出的命令:

'./configure' '--prefix=/usr/local/zend' '--with-config-file-path=/usr/local/zend/etc' '--with-config-file-scan-dir=/usr/local/zend/etc/conf.d' '--disable-debug' '--enable-inline-optimization' '--disable-all' '--enable-libxml' '--enable-session' '--enable-spl' '--enable-xml' '--enable-hash' '--enable-reflection' '--with-pear' '--with-apxs2=/usr/local/zend/apache2/bin/apxs' '--with-layout=GNU' '--enable-filter' '--with-pcre-regex' '--with-zlib=/usr/local/zlib-1.2.3' '--enable-simplexml' '--enable-dom' '--with-libxml-dir=/usr/local/libxml-2.7.7' '--with-openssl=/usr/local/openssl-0.9.8o' '--enable-pdo' '--with-pdo-sqlite' '--with-readline=/usr/local/readline-5.2' '--with-iconv' '--with-sqlite3' '--disable-phar' 

我的应用程序已经发展,现在我需要从我的 linux 机器连接到 SQL Server。根据php's documentation,我需要使用以下命令配置PHP:

./configure --with-pdo-odbc=generic,/usr/local,libname,ldflags,cflags

我有两个问题:

  1. 当我使用新命令配置 php 时,我是否需要同时指定所有以前的命令(否则它们会丢失)吗?
  2. 从哪里运行configure 命令?

【问题讨论】:

    标签: php


    【解决方案1】:
    1. 是的,您将丢失之前的所有命令。如果您不想丢失它们,只需复制配置字符串并将新选项添加​​到其中即可。

      './configure' '--prefix=/usr/local/zend' '--with-config-file-path=/usr/local/zend/etc' '--with-config-file-scan-dir=/usr/local/zend/etc/conf.d' '--disable-debug' '--enable-inline-optimization' '--disable-all' '--enable-libxml' '--enable-session' '--enable-spl' '--enable-xml' '--enable-hash' '--enable-reflection' '--with-pear' '--with-apxs2=/usr/local/zend/apache2/bin/apxs' '--with-layout=GNU' '--enable-filter' '--with-pcre-regex' '--with-zlib=/usr/local/zlib-1.2.3' '--enable-simplexml' '--enable-dom' '--with-libxml-dir=/usr/local/libxml-2.7.7' '--with-openssl=/usr/local/openssl-0.9.8o' '--enable-pdo' '--with-pdo-sqlite' '--with-readline=/usr/local/readline-5.2' '--with-iconv' '--with-sqlite3' '--disable-phar' '--with-pdo-odbc=generic,/usr/local,libname,ldflags,cflags'

    2. 它需要在命令行的 shell 提示符下运行。如果您没有 shell 访问权限,则需要联系您的主机。

    【讨论】:

      猜你喜欢
      • 2011-08-22
      • 1970-01-01
      • 1970-01-01
      • 2012-02-15
      • 2019-07-25
      • 1970-01-01
      • 1970-01-01
      • 2011-07-13
      • 2021-04-15
      相关资源
      最近更新 更多