0

我在机器上安装了 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 的文档,我需要使用以下命令配置 PHP:

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

我有两个问题:

  1. 当我使用新命令配置 php 时,我是否还需要指定所有以前的命令(或者如果我不这样做它们会丢失)?
  2. 我从哪里运行configure命令?
4

1 回答 1

0
  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 访问权限,则需要联系您的主机。

于 2013-09-17T13:44:49.187 回答