4

通过 phpinfo,我得到了 include_path Master Value的以下信息。

.:/usr/share/pear:/usr/share/php

它似乎没有在任何地方设置... php ini 已将所有 include_path(s) 注释掉,我的应用程序没有手动设置它,apache conf/php conf/other assorted conf's/ini's 没有设置它,搜索时没有结果对于 set_include_path 或 phpvalue 或 ini_set 等。

有什么想法可以设置其他“include_path”吗?我是在专门询问主值。

(我在 CentOS 5.4 上)

4

2 回答 2

2

来自 php.ini 文件

; PHP 对 include_path 的默认设置是 ".;/path/to/php/pear"
http://php.net/include-path

而你上面的似乎是在添加 PHP 的目录,所以是当前目录;梨; PHP(PHP 的主目录)目录

您还可以检查 Apache confs 或您的 .htaccess 文件以查看您是否将其设置在那里。

于 2010-08-25T19:09:01.843 回答
1

它是在构建时配置的。您可以通过查看输出中的配置命令来了解您的 PHP 安装是如何配置的phpinfo();

有关 PHP 配置选项的更多信息,请参阅PHP 安装和配置。还有php-build — 构建多个 PHP 版本可能会有所帮助或感兴趣。

给 Ubuntu 用户的注意事项

您不会在 phpinfo 输出中找到 configure 命令,请参阅此错误标记为 invalid。以下是错误报告中提到的代码的一些链接。

来自 phpinfo() 的配置命令示例:

Configure Command => './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--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-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-ncurses=shared' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib/mysql/mysql_config' '--enable-dom=shared' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--enable-dbase=shared'

于 2013-01-22T22:53:45.797 回答