Check php configuration

I am running Apache2 on a Mac OS X (10.5). I just compiled PHPhường 5.2.8 and finally got pdo-mysql working (or so I think).

Bạn đang xem: Check php configuration

This terminal command:

php --versionis showing 5.2.8 and I have the right modules installed.

But, when I vì chưng a phpinfo(), Apache dumps out PHPhường 5.2.6 (my earlier version, without pdo_mysql).

How bởi vì I tell Apađậy which PHP lớn load? The httpd.conf has the line:

LoadModule php5_module libexec/apache2/libphp5.soBut, I don"t know what or where that is.

Xem thêm: " Qfe Là Gì ? Nghĩa Của Từ Qfe Trong Tiếng Việt Qfe Nghĩa Là Gì

Is that what I have to change?



I think all these answers aren"t really answering the question. The root level can be determined by running the commvà httpd -V. This will show you what options the Apabít daetháng was built with at compile time. This is what controls where httpd determines where lớn look for it"s config. files và .so modules by mặc định.

For example:

% httpd -VServer version: Apache/2.2.17 (Unix)Server built: Dec 17 2010 11:58:24Server"s Module Magic Number: 20051115:25Server loaded: Aquảng bá 1.3.12, APR-Util 1.3.9Compiled using: Aquảng bá 1.3.12, APR-Util 1.3.9Architecture: 32-bitServer MPM: Prefork threaded: no forked: yes (variable process count)Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP. -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="logs/" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf"The key line in that output is the HTTPD_ROOT. That defines where Apache"s ROOT directory is lớn start, /etc/httpd in my case, when looking for config. files & modules.

NOTE: This ROOT is not the same thing as DocumentRoot. This ROOT is specific lớn how the httpd daemon was compiled, the DocumentRoot is for specifying where the httpd daetháng should start looking for actual website nội dung (.html files & such).

For my httpd.conf file I have the following Load lines:

LoadModule auth_basic_module modules/mod_auth_basic.soLoadModule auth_digest_module modules/mod_auth_digest.soLoadModule authn_file_module modules/mod_authn_file.soGiven this the full path to your modules would be, for example:

/etc/httpd/modules/mod_auth_basic.soThis is from a CentOS 5.x system but the technique is still apt.

Xem thêm: alpha skincare

BTW, it can get a little confusing because in CentOS" case the files are organized physically here:

% ls /usr/lib/httpd/modules/à then accessible to lớn the Apađậy daemon, httpd, through this path:

% ls -l /etc/httpd/total 12drwxr-xr-x 2 root root 4096 Aquảng cáo 26 2011 confdrwxr-xr-x 3 root root 4096 Aquảng cáo 26 2011 conf.d-rw-r--r-- 1 root root 18 Feb 24 2009 htpasswdlrwxrwxrwx 1 root root 19 Aquảng cáo 26 2011 logs -> ../../var/log/httpdlrwxrwxrwx 1 root root 27 Atruyền thông quảng cáo 26 2011 modules -> ../../usr/lib/httpd/moduleslrwxrwxrwx 1 root root 13 Apr 26 2011 run -> ../../var/runThe modules liên kết connects /etc/httpd --> /usr/lib/httpd/modules.

Chuyên mục: