THis is what I have in my httpd.conf file:
LoadModule php5_module "/etc/httpd/modules/libphp5.so"
AddType application/x-httpd-php .php
DirectoryIndex index.php index.php3
PHPIniDir /etc
When I run command:
[root]# php -r 'phpinfo();'
I get:
phpinfo()
PHP Version => 5.0.1
System => Linux xxx.com 2.4.25-040218 #1 SMP Wed Feb 18 17:59:29 CET 2004 i686
Build Date => Aug 24 2004 08:49:57
Configure Command => './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libxml-dir=/root/libxml2-2.6.12'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php.ini
PHP API => 20031224
PHP Extension => 20040412
Zend Extension => 220040412
Debug Build => no
Thread Safety => disabled
IPv6 Support => enabled
Registered PHP Streams => php, file, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg
Zend Engine v2.0.1, Copyright (c)
Configuration
PHP Core
Directive => Local Value => Master Value
allow_call_time_pass_reference => On => On
allow_url_fopen => On => On
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no
...
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 2039 => 2039
expose_php => On => On
extension_dir => /usr/lib/php5 => /usr/lib/php5
file_uploads => On => On
.....
html_errors => Off => On
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => Off
include_path => .:/usr/local/lib/php => .:/usr/local/lib/php
log_errors => Off => Off
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => On => On
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
mail.force_extra_parameters => no value => no value
max_execution_time => 0 => 30
max_input_time => 60 => 60
open_basedir => no value => no value
output_buffering => 0 => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
register_argc_argv => On => On
register_globals => Off => Off
register_long_arrays => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 100 => 100
short_open_tag => On => On
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
variables_order => EGPCS => EGPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => Off => Off
zend.ze1_compatibility_mode => Off => Off
ctype
ctype functions => enabled
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.6.12
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
iconv
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.3.2
Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1
libxml
libXML support => active
libXML Version => 2.6.12
libXML streams => enabled
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 4.5 01-December-2003
posix
Revision => $Revision: 1.60 $
session
Session Support => enabled
Registered save handlers => files user sqlite
Registered serializer handlers => php php_binary
Directive => Local Value => Master Value
session.auto_start => Off => Off
session.bug_compat_42 => On => On
session.bug_compat_warn => On => On
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => no value => no value
session.entropy_length => 0 => 0
session.gc_divisor => 100 => 100
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 4 => 4
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /tmp => /tmp
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => Off => Off
session.use_only_cookies => Off => Off
session.use_trans_sid => 0 => 0
SimpleXML
Simplexml support => enabled
Revision => $Revision: 1.139.2.3 $
Schema support => enabled
SPL
SPL support => enabled
Interfaces => RecursiveIterator, SeekableIterator
Classes => ArrayObject, ArrayIterator, CachingIterator, CachingRecursiveIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveD
irectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator
SQLite
SQLite support => enabled
PECL Module version => 2.0-dev $Id: sqlite.c,v 1.146.2.2 2004/08/02 22:43:42 iliaa Exp $
SQLite Library => 2.8.14
SQLite Encoding => iso8859
Directive => Local Value => Master Value
sqlite.assoc_case => 0 => 0
standard
Regex Library => Bundled library enabled
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i
.....
.
PHP Variables
Variable => Value
SERVER["MANPATH"] => /usr/lib/courier-imap/man:
SERVER["HOSTNAME"] => u15157708.onlinehome-server.com
SERVER["TERM"] => xterm
SERVER["SHELL"] => /bin/bash
SERVER["CATALINA_HOME"] => /var/tomcat4
SERVER["HISTSIZE"] => 1000
SERVER["SSH_CLIENT"] => 63.150.123.162 3984 22
SERVER["OLDPWD"] => /root
SERVER["CATALINA_BASE"] => /var/tomcat4
SERVER["SSH_TTY"] => /dev/pts/1
SERVER["USER"] => root
SERVER["LS_COLORS"] => no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:.cmd=00;32:.exe=00;32
:.com=00;32:.btm=00;32:.bat=00;32:.sh=00;32:.csh=00;32:.tar=00;31:.tgz=00;31:.arj=00;31:.taz=00;31:.lzh=00;31:.zip=00;31:.z=00;31:.Z=00;31:.gz=0
0;31:.bz2=00;31:.bz=00;31:.tz=00;31:.rpm=00;31:.cpio=00;31:.jpg=00;35:.gif=00;35:.bmp=00;35:.xbm=00;35:.xpm=00;35:.png=00;35:.tif=00;35:
SERVER["USERNAME"] => root
SERVER["MAIL"] => /var/spool/mail/root
SERVER["PATH"] => /usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:
/usr/java/j2sdk1.4.2/bin:/opt/java/apache-ant-1.6.2/bin
SERVER["INPUTRC"] => /etc/inputrc
SERVER["PWD"] => /etc/httpd/conf.d
SERVER["JAVA_HOME"] => /usr/java/j2sdk1.4.2
SERVER["LANG"] => en_US.UTF-8
SERVER["SHLVL"] => 1
SERVER["HOME"] => /root
SERVER["BASH_ENV"] => /root/.bashrc
SERVER["LOGNAME"] => root
SERVER["CLASSPATH"] => :/usr/share/java/xerces.jar:/usr/share/java/xercesSamples.jar:/opt/java/apache-ant-1.6.2/lib
SERVER["SSH_CONNECTION"] => 63.150.123.162 3984 217.160.253.144 22
SERVER["LESSOPEN"] => |/usr/bin/lesspipe.sh %s
SERVER["CATALINA_TMPDIR"] => /var/tomcat4/temp
SERVER["G_BROKEN_FILENAMES"] => 1
SERVER[""] => /usr/local/bin/php
SERVER["PHP_SELF"] => -
SERVER["SCRIPT_NAME"] => -
SERVER["SCRIPT_FILENAME"] =>
SERVER["PATH_TRANSLATED"] =>
SERVER["DOCUMENT_ROOT"] =>
SERVER["argv"] => Array
(
[0] => -
)
SERVER["argc"] => 1
ENV["MANPATH"] => /usr/lib/courier-imap/man:
ENV["HOSTNAME"] => u15157708.onlinehome-server.com
ENV["TERM"] => xterm
ENV["SHELL"] => /bin/bash
ENV["CATALINA_HOME"] => /var/tomcat4
ENV["HISTSIZE"] => 1000
ENV["SSH_CLIENT"] => 63.150.123.162 3984 22
ENV["OLDPWD"] => /root
ENV["CATALINA_BASE"] => /var/tomcat4
ENV["SSH_TTY"] => /dev/pts/1
ENV["USER"] => root
ENV["LS_COLORS"] => no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:.cmd=00;32:.exe=00;32:.
com=00;32:.btm=00;32:.bat=00;32:.sh=00;32:.csh=00;32:.tar=00;31:.tgz=00;31:.arj=00;31:.taz=00;31:.lzh=00;31:.zip=00;31:.z=00;31:.Z=00;31:.gz=00;3
1:.bz2=00;31:.bz=00;31:.tz=00;31:.rpm=00;31:.cpio=00;31:.jpg=00;35:.gif=00;35:.bmp=00;35:.xbm=00;35:.xpm=00;35:.png=00;35:.tif=00;35:
ENV["USERNAME"] => root
ENV["MAIL"] => /var/spool/mail/root
ENV["PATH"] => /usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/us
r/java/j2sdk1.4.2/bin:/opt/java/apache-ant-1.6.2/bin
ENV["INPUTRC"] => /etc/inputrc
ENV["PWD"] => /etc/httpd/conf.d
ENV["JAVA_HOME"] => /usr/java/j2sdk1.4.2
ENV["LANG"] => en_US.UTF-8
ENV["SHLVL"] => 1
ENV["HOME"] => /root
ENV["BASH_ENV"] => /root/.bashrc
ENV["LOGNAME"] => root
ENV["CLASSPATH"] => :/usr/share/java/xerces.jar:/usr/share/java/xercesSamples.jar:/opt/java/apache-ant-1.6.2/lib
ENV["SSH_CONNECTION"] => 63.150.123.162 3984 217.160.253.144 22
ENV["LESSOPEN"] => |/usr/bin/lesspipe.sh %s
ENV["CATALINA_TMPDIR"] => /var/tomcat4/temp
ENV["G_BROKEN_FILENAMES"] => 1
ENV["_"] => /usr/local/bin/php
so far, PHP is working via command line, but when i run via apache, it won't work. Click on this link below:
http://abouttrianglehosting.com/test/phpinfo.php
ideas?