LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem with configuring php on Slackware 10.2 (https://www.linuxquestions.org/questions/slackware-14/problem-with-configuring-php-on-slackware-10-2-a-415377/)

JockVSJock 02-14-2006 12:41 PM

Problem with configuring php on Slackware 10.2
 
Running the following:
-Slackware 10.2
-2.4 Kernel
-MySQL 4.1.14
-Apache 1.3.34
-PHP 4.4.2

I've got MySQL (can log in and create databases) and Apache up (can get the test page 127.0.0.1) and running and I've used this thread

http://www.linuxquestions.org/linux/..._MySQL_and_PHP

And I've done the following:

Code:

configure php
==============

edit httpd.conf and make sure this line is at the bottom of the file
=============
pico /etc/apache2/httpd.conf

Include /etc/apache2/mod_php.conf

edit mod_php.conf
==================
make sure the line looks similar to this

LoadModule php5_module lib/apache2/libphp5.so

I've tried to test out php with the test script

Code:

<?php phpinfo(); ?>
And, it isn't working...I'm not getting the output that I'm used to when I used Knoppix.

What am I doing wrong here...?

thanks

tuxrules 02-14-2006 01:04 PM

Quote:

LoadModule php5_module lib/apache2/libphp5.so
You are trying to load php5 module when infact you have php4 installed. Try changing the "5" to "4".

Tux,

ppuru 02-14-2006 01:05 PM

Check

1. DirectoryIndex under httpd.conf (may not have index.php)
2. AddType may be missing

JockVSJock 02-14-2006 01:30 PM

Quote:

Originally Posted by tuxrules
You are trying to load php5 module when infact you have php4 installed. Try changing the "5" to "4".

Tux,

I checked my mod_php.conf file and it does have the following:

Code:


# Load the PHP module:
LoadModule php4_module libexec/apache/libphp4.so

I copied that from the example from this website.

thanks

JockVSJock 02-14-2006 01:34 PM

Quote:

Originally Posted by ppuru
Check

1. DirectoryIndex under httpd.conf (may not have index.php)


httpd.conf shows the following:
Code:

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
#
#
# 2/13/2005 added the following index.php, index.htm, index.xhtml below
<IfModule mod_dir.c>
    DirectoryIndex index.html index.php index.htm index.xhtml
</IfModule>

Quote:

Originally Posted by ppuru
2. AddType may be missing

Not seeing this entry in my httpd.conf, how do I add this?

thanks

ppuru 02-14-2006 01:36 PM

Code:

# PHPModule
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps


JockVSJock 02-14-2006 01:52 PM

Quote:

Originally Posted by ppuru
Code:

# PHPModule
    AddType application/x-httpd-php .php .phtml
    AddType application/x-httpd-php-source .phps



Hmmm...

I've added this to the AddTypes in httpd.conf and restart Apache and still no luck...

willysr 02-14-2006 07:09 PM

Does the code should be

Code:

<?php
phpinfo()
?>


JockVSJock 02-15-2006 12:51 PM

Quote:

Originally Posted by willysr
Does the code should be

Code:

<?php
phpinfo()
?>


Yes, I modified the code like the example above and still no go.

bhussung 02-15-2006 02:17 PM

try running the test script from the command line to see if PHP gives back an error

Code:

linux$ php test.php
I've run into a problem earlier today where PHP choked when I updated it with swaret because it was compiled against a different version of MySQL (Patrick updated current to 5.0.18 and compiled PHP against it, and I was still running 4.x).

JockVSJock 02-15-2006 03:09 PM

Quote:

Originally Posted by bhussung
try running the test script from the command line to see if PHP gives back an error

Code:

linux$ php test.php
I've run into a problem earlier today where PHP choked when I updated it with swaret because it was compiled against a different version of MySQL (Patrick updated current to 5.0.18 and compiled PHP against it, and I was still running 4.x).

Good idea.

I have the following two files
-test.php
-phpinfo.php

Code:

cmmiller@probot:~/php$ php test.php
<html>
<head>
        <title>PHP Test</title>
</head>
<body>
<p>Hello World</p></body>
</html>

Code:

cmmiller@probot:~/php$ php phpinfo.php
phpinfo()
PHP Version => 4.4.2

System => Linux probot 2.4.31 #6 Sun Jun 5 19:04:47 PDT 2005 i686
Build Date => Feb 10 2006 16:14:09
Configure Command =>  './configure' '--prefix=/usr' '--enable-force-cgi-redirect' '--enable-fastcgi' '--enable-pcntl' '--enable-sigchild' '--sysconfdir=/etc' '--enable-discard-path' '--with-config-file-path=/etc/apache' '--enable-safe-mode' '--with-openssl' '--with-mhash' '--enable-bcmath' '--with-bz2' '--with-pic' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--with-db3' '--with-imap-ssl=/usr/local/lib/c-client' '--with-imap=/usr/local/lib/c-client' '--enable-dbase' '--enable-ftp' '--with-iconv' '--with-dom' '--with-exif' '--enable-exif' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png' '--with-gmp' '--enable-mbstring' '--with-curl=/usr' '--with-pcre-regex=/usr' '--with-mysql=shared,/usr' '--with-gettext=shared,/usr' '--with-expat-dir=/usr' '--with-xml' '--enable-wddx' '--with-mm=/usr' '--enable-trans-sid' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--enable-memory-limit' '--with-tsrm-pthreads' '--enable-shared' '--disable-debug' '--with-zlib=/usr'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/apache/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20050606
Debug Build => no
Zend Memory Manager => enabled
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, https, ftps, compress.bzip2, compress.zlib


This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


 _______________________________________________________________________


Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => Off => Off
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 value
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 2047 => 2047
expose_php => On => On
extension_dir => /usr/lib/php/extensions/ => /usr/lib/php/extensions/
file_uploads => On => On
gpc_order => GPC => GPC
highlight.bg => #FFFFFF => #FFFFFF
highlight.comment => #FF8000 => #FF8000
highlight.default => #0000BB => #0000BB
highlight.html => #000000 => #000000
highlight.keyword => #007700 => #007700
highlight.string => #DD0000 => #DD0000
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/lib/php => .:/usr/lib/php
log_errors => On => On
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
max_execution_time => 0 => 30
max_input_time => 60 => 60
memory_limit => 8M => 8M
open_basedir => no value => no value
output_buffering => 0 => 4096
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
register_argc_argv => On => Off
register_globals => Off => Off
report_memleaks => On => On
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 => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On

bcmath

BCMath support => enabled

bz2

BZip2 Support => Enabled
BZip2 Version => 1.0.3, 15-Feb-2005

calendar

Calendar support => enabled

ctype

ctype functions => enabled

curl

CURL support => enabled
CURL Information => libcurl/7.12.2 OpenSSL/0.9.7g zlib/1.2.3 libidn/0.5.17

dba

DBA support => enabled
Supported handlers => gdbm cdb cdb_make db3 inifile flatfile

domxml

DOM/XML => enabled
DOM/XML API Version => 20020815
libxml Version => 20622
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled

exif

EXIF Support => enabled
EXIF Version => 1.4 $Id: exif.c,v 1.118.2.37.2.4 2006/01/01 13:46:52 sniper Exp $
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF

ftp

FTP support => enabled

gd

GD Support => enabled
GD Version => bundled (2.0.28 compatible)
GIF Read Support => enabled
GIF Create Support => enabled
JPG Support => enabled
PNG Support => enabled
WBMP Support => enabled
XBM Support => enabled

gettext

GetText Support => enabled

gmp

gmp support => enabled

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.3.5

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

imap

IMAP c-Client Version => 2004
SSL Support => enabled

mbstring

Multibyte Support => enabled
Japanese support => enabled
Simplified chinese support => enabled
Traditional chinese support => enabled
Korean support => enabled
Russian support => enabled
Multibyte (japanese) regex support => enabled

                                        mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.internal_encoding => ISO-8859-1 => no value
mbstring.language => neutral => neutral
mbstring.substitute_character => no value => no value

mhash

MHASH support => Enabled
MHASH API Version => 20020524

mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 4.1.14
MYSQL_MODULE_TYPE => external
MYSQL_SOCKET => /var/run/mysql/mysql.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib -lmysqlclient

Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => no value => no value
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

openssl

OpenSSL support => enabled
OpenSSL Version => OpenSSL 0.9.7g 11 Apr 2005

overload

User-Space Object Overloading Support => enabled

pcntl

pcntl support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 6.4 05-Sep-2005

posix

Revision => $Revision: 1.51.2.4.2.1 $

session

Session Support => enabled
Registered save handlers => files user mm

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.bug_compat_42 => Off => Off
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 => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
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_trans_sid => Off => Off

shmop

shmop support => enabled

sockets

Sockets Support => enabled

standard

Regex Library => Bundled library enabled
Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

wddx

WDDX Support => enabled
WDDX Session Serializer => enabled

xml

XML Support => active
XML Namespace Support => active
EXPAT Version => expat_1.95.8

yp

YP Support => enabled

zlib

ZLib Support => enabled
Compiled Version => 1.2.3
Linked Version => 1.2.3

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name
dbase
sysvsem
sysvshm

Environment

Variable => Value
CPLUS_INCLUDE_PATH => /usr/lib/qt/include:/usr/lib/qt/include
MANPATH => /usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/opt/kde/man:/usr/lib/qt/doc/man:/usr/share/texmf/man
KDE_MULTIHEAD => false
HZ => 100
HOSTNAME => probot.miller.org
SHELL => /bin/bash
TERM => xterm
GTK2_RC_FILES => /etc/gtk-2.0/gtkrc:/home/cmmiller/.gtkrc-2.0:/home/cmmiller/.kde/share/config/gtkrc-2.0
GTK_RC_FILES => /etc/gtk/gtkrc:/home/cmmiller/.gtkrc:/home/cmmiller/.kde/share/config/gtkrc
GS_LIB => /home/cmmiller/.fonts
WINDOWID => 31457285
HUSHLOGIN => FALSE
OLDPWD => /home/cmmiller
QTDIR => /usr/lib/qt
KDE_FULL_SESSION => true
USER => cmmiller
LS_COLORS => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.bat=01;32:*.BAT=01;32:*.btm=01;32:*.BTM=01;32:*.cmd=01;32:*.CMD=01;32:*.com=01;32:*.COM=01;32:*.dll=01;32:*.DLL=01;32:*.exe=01;32:*.EXE=01;32:*.arj=01;31:*.bz2=01;31:*.deb=01;31:*.gz=01;31:*.lzh=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tb2=01;31:*.tbz2=01;31:*.tbz=01;31:*.tgz=01;31:*.tz2=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.ZIP=01;31:*.zoo=01;31:*.asf=01;35:*.ASF=01;35:*.avi=01;35:*.AVI=01;35:*.bmp=01;35:*.BMP=01;35:*.flac=01;35:*.FLAC=01;35:*.gif=01;35:*.GIF=01;35:*.jpg=01;35:*.JPG=01;35:*.jpeg=01;35:*.JPEG=01;35:*.m2a=01;35:*.M2a=01;35:*.m2v=01;35:*.M2V=01;35:*.mov=01;35:*.MOV=01;35:*.mp3=01;35:*.MP3=01;35:*.mpeg=01;35:*.MPEG=01;35:*.mpg=01;35:*.MPG=01;35:*.ogg=01;35:*.OGG=01;35:*.ppm=01;35:*.rm=01;35:*.RM=01;35:*.tga=01;35:*.TGA=01;35:*.tif=01;35:*.TIF=01;35:*.wav=01;35:*.WAV=01;35:*.wmv=01;35:*.WMV=01;35:*.xbm=01;35:*.xpm=01;35:
GDK_USE_XFT => 1
KDEDIR => /opt/kde
SESSION_MANAGER => local/probot:/tmp/.ICE-unix/2850
T1LIB_CONFIG => /usr/share/t1lib/t1lib.config
XDG_CONFIG_DIRS => /opt/kde/etc/xdg
KONSOLE_DCOP => DCOPRef(konsole-2885,konsole)
MINICOM => -c on
MAIL => /var/spool/mail/cmmiller
PATH => /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
LC_COLLATE => C
KONSOLE_DCOP_SESSION => DCOPRef(konsole-2885,session-4)
INPUTRC => /etc/inputrc
PWD => /home/cmmiller/php
JAVA_HOME => /usr/lib/java
LANG => en_US
PS1 => \u@\h:\w\$
PS2 => >
SHLVL => 5
HOME => /home/cmmiller
XCURSOR_THEME => default
LS_OPTIONS =>  --color=auto -F -b -T 0
LESS => -M
LOGNAME => cmmiller
LESSOPEN => |lesspipe.sh %s
DISPLAY => :0.0
COLORTERM =>
XAUTHORITY => /home/cmmiller/.Xauthority
_ => /usr/bin/php

PHP Variables

Variable => Value
_SERVER["CPLUS_INCLUDE_PATH"] => /usr/lib/qt/include:/usr/lib/qt/include
_SERVER["MANPATH"] => /usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/java/man:/opt/kde/man:/usr/lib/qt/doc/man:/usr/share/texmf/man
_SERVER["KDE_MULTIHEAD"] => false
_SERVER["HZ"] => 100
_SERVER["HOSTNAME"] => probot.miller.org
_SERVER["SHELL"] => /bin/bash
_SERVER["TERM"] => xterm
_SERVER["GTK2_RC_FILES"] => /etc/gtk-2.0/gtkrc:/home/cmmiller/.gtkrc-2.0:/home/cmmiller/.kde/share/config/gtkrc-2.0
_SERVER["GTK_RC_FILES"] => /etc/gtk/gtkrc:/home/cmmiller/.gtkrc:/home/cmmiller/.kde/share/config/gtkrc
_SERVER["GS_LIB"] => /home/cmmiller/.fonts
_SERVER["WINDOWID"] => 31457285
_SERVER["HUSHLOGIN"] => FALSE
_SERVER["OLDPWD"] => /home/cmmiller
_SERVER["QTDIR"] => /usr/lib/qt
_SERVER["KDE_FULL_SESSION"] => true
_SERVER["USER"] => cmmiller
_SERVER["LS_COLORS"] => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.bat=01;32:*.BAT=01;32:*.btm=01;32:*.BTM=01;32:*.cmd=01;32:*.CMD=01;32:*.com=01;32:*.COM=01;32:*.dll=01;32:*.DLL=01;32:*.exe=01;32:*.EXE=01;32:*.arj=01;31:*.bz2=01;31:*.deb=01;31:*.gz=01;31:*.lzh=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tb2=01;31:*.tbz2=01;31:*.tbz=01;31:*.tgz=01;31:*.tz2=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.ZIP=01;31:*.zoo=01;31:*.asf=01;35:*.ASF=01;35:*.avi=01;35:*.AVI=01;35:*.bmp=01;35:*.BMP=01;35:*.flac=01;35:*.FLAC=01;35:*.gif=01;35:*.GIF=01;35:*.jpg=01;35:*.JPG=01;35:*.jpeg=01;35:*.JPEG=01;35:*.m2a=01;35:*.M2a=01;35:*.m2v=01;35:*.M2V=01;35:*.mov=01;35:*.MOV=01;35:*.mp3=01;35:*.MP3=01;35:*.mpeg=01;35:*.MPEG=01;35:*.mpg=01;35:*.MPG=01;35:*.ogg=01;35:*.OGG=01;35:*.ppm=01;35:*.rm=01;35:*.RM=01;35:*.tga=01;35:*.TGA=01;35:*.tif=01;35:*.TIF=01;35:*.wav=01;35:*.WAV=01;35:*.wmv=01;35:*.WMV=01;35:*.xbm=01;35:*.xpm=01;35:
_SERVER["GDK_USE_XFT"] => 1
_SERVER["KDEDIR"] => /opt/kde
_SERVER["SESSION_MANAGER"] => local/probot:/tmp/.ICE-unix/2850
_SERVER["T1LIB_CONFIG"] => /usr/share/t1lib/t1lib.config
_SERVER["XDG_CONFIG_DIRS"] => /opt/kde/etc/xdg
_SERVER["KONSOLE_DCOP"] => DCOPRef(konsole-2885,konsole)
_SERVER["MINICOM"] => -c on
_SERVER["MAIL"] => /var/spool/mail/cmmiller
_SERVER["PATH"] => /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.
_SERVER["LC_COLLATE"] => C
_SERVER["KONSOLE_DCOP_SESSION"] => DCOPRef(konsole-2885,session-4)
_SERVER["INPUTRC"] => /etc/inputrc
_SERVER["PWD"] => /home/cmmiller/php
_SERVER["JAVA_HOME"] => /usr/lib/java
_SERVER["LANG"] => en_US
_SERVER["PS1"] => \u@\h:\w\$
_SERVER["PS2"] => >
_SERVER["SHLVL"] => 5
_SERVER["HOME"] => /home/cmmiller
_SERVER["XCURSOR_THEME"] => default
_SERVER["LS_OPTIONS"] =>  --color=auto -F -b -T 0
_SERVER["LESS"] => -M
_SERVER["LOGNAME"] => cmmiller
_SERVER["LESSOPEN"] => |lesspipe.sh %s
_SERVER["DISPLAY"] => :0.0
_SERVER["COLORTERM"] =>
_SERVER["XAUTHORITY"] => /home/cmmiller/.Xauthority
_SERVER["_"] => /usr/bin/php
_SERVER["PHP_SELF"] => phpinfo.php
_SERVER["SCRIPT_NAME"] => phpinfo.php
_SERVER["SCRIPT_FILENAME"] => phpinfo.php
_SERVER["PATH_TRANSLATED"] => phpinfo.php
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["argv"] => Array
(
    [0] =&gt; phpinfo.php
)

_SERVER["argc"] => 1

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.


Now, this is the output that I should see from a webbrowser if I click on this file, but I don't...But the test based output worked.

willysr 02-15-2006 06:59 PM

It seems that the PHP is OK, but the Apache's configuration which is NOT OK. Perhaps the file path that should be reviewed agains, since the local php check is running well

JockVSJock 02-16-2006 09:34 AM

Quote:

Originally Posted by willysr
It seems that the PHP is OK, but the Apache's configuration which is NOT OK. Perhaps the file path that should be reviewed agains, since the local php check is running well

Just upgraded php via slapt-get update and can still get the same ouptut via the command line, but can't from the web browser.

How can I troubleshoot Apache's config for this?

willysr 02-16-2006 06:41 PM

here's what i added in my httpd.conf :

Code:

LoadModule php4_module        libexec/apache/libphp4.so
make sure this line exist on your conf :

Code:

AddModule mod_php4.c
To make Apache parse the .php files, add this also :

Code:

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

That's all
restart your Apache and see if it works

as an addition, i'll give my configuration parameter just in case you will try to compile from the source, instead of using the binary packages

'./configure' '--prefix=/usr/local' '--enable-discard-path' '--disable-force-cgi-redirect' '--enable-shared' '--disable-static' '--disable-debug' '--disable-rpath' '--enable-pic' '--enable-inline-optimization' '--enable-memory-limit' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php' '--with-pear=/usr/share/pear' '--enable-magic-quotes' '--enable-debugger' '--enable-track-vars' '--with-exec-dir=/usr/bin' '--with-versioning' '--with-mod_charset' '--with-regex=php' '--enable-track-vars' '--enable-trans-sid' '--enable-safe-mode' '--enable-ctype' '--enable-ftp' '--with-gettext=/usr' '--enable-posix' '--enable-session' '--enable-sysvsem' '--enable-sysvshm' '--with-openssl=/usr' '--without-kerberos' '--with-ttf' '--with-freetype-dir=/usr' '--with-zlib=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-png-dir' '--with-jpeg-dir' '--with-zlib-dir' '--with-tiff-dir' '--enable-xslt' '--with-xslt-sablot' '--with-iconv-dir=/usr/local/lib' '--with-curl' '--with-mysql-sock=/var/run/mysql/mysql.sock' '--with-mysql=/usr' '--enable-mbstring=all'

JockVSJock 02-17-2006 01:30 PM

Quote:

Originally Posted by willysr
here's what i added in my httpd.conf :

Code:

LoadModule php4_module        libexec/apache/libphp4.so
make sure this line exist on your conf :

Code:

AddModule mod_php4.c
To make Apache parse the .php files, add this also :

Code:

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

That's all
restart your Apache and see if it works

as an addition, i'll give my configuration parameter just in case you will try to compile from the source, instead of using the binary packages

'./configure' '--prefix=/usr/local' '--enable-discard-path' '--disable-force-cgi-redirect' '--enable-shared' '--disable-static' '--disable-debug' '--disable-rpath' '--enable-pic' '--enable-inline-optimization' '--enable-memory-limit' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php' '--with-pear=/usr/share/pear' '--enable-magic-quotes' '--enable-debugger' '--enable-track-vars' '--with-exec-dir=/usr/bin' '--with-versioning' '--with-mod_charset' '--with-regex=php' '--enable-track-vars' '--enable-trans-sid' '--enable-safe-mode' '--enable-ctype' '--enable-ftp' '--with-gettext=/usr' '--enable-posix' '--enable-session' '--enable-sysvsem' '--enable-sysvshm' '--with-openssl=/usr' '--without-kerberos' '--with-ttf' '--with-freetype-dir=/usr' '--with-zlib=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-png-dir' '--with-jpeg-dir' '--with-zlib-dir' '--with-tiff-dir' '--enable-xslt' '--with-xslt-sablot' '--with-iconv-dir=/usr/local/lib' '--with-curl' '--with-mysql-sock=/var/run/mysql/mysql.sock' '--with-mysql=/usr' '--enable-mbstring=all'


I added all of the lines as recommended as above.

When I restart apachectl, I get this output

Code:

root@probot:/usr/sbin# ./apachectl start
[Fri Feb 17 13:25:58 2006] [warn] module php4_module is already loaded, skipping
./apachectl start: httpd started

And my browser still can't see the php files.


All times are GMT -5. The time now is 04:40 AM.