|
Posted by Overbored on 03/02/05 07:44
phplist@meidomus.com (Burhan Khalid) wrote in news:422474F6.4020708
@meidomus.com:
> overbored wrote:
>
>>>
>>>>Hi all, I'm learning PHP and I'd need to create a simple Web-based
>>>>ifconfig tool for a Soekris box (running Pebble). However, I've been
>>>>unsuccessful at getting PHP working with mini_httpd. In particular,
>>>>the POST data is not being received. Here's what I did...
>>>
>>>What version of PHP are you running? $_POST and other $_* variable
are
>>>only available in PHP versions 4.2.+ iirc.
> > $ php --version
> > PHP 4.3.10-2 (cli) (built: Dec 19 2004 03:41:45)
> > Copyright (c) 1997-2004 The PHP Group
> > Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
>
> This is the client build, which might not be the same as your server
> build. Run phpinfo() and check your version there.
>
It seems to be the same thing....
$ echo '<?php print phpinfo(); ?>' | php
PHP Version => 4.3.10-2
System => Linux dell400 2.4.26-1-386 #1 Thu Jul 22 12:46:23 JST 2004
i686
Build Date => Dec 19 2004 03:39:39
Configure Command => '../configure' '--prefix=/usr' '--with-regex=php'
'--disab
le-cgi' '--with-config-file-path=/etc/php4/cli' '--disable-rpath' '--
enable-memo
ry-limit' '--disable-debug' '--with-layout=GNU' '--with-
pear=/usr/share/php' '--
enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-
sysvmsg' '--ena
ble-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--
enable-ct
ype' '--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro' '--
enable-ft
p' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--
enable-shmop
' '--enable-sockets' '--enable-wddx' '--disable-xml' '--with-expat-
dir=/usr' '--
with-xmlrpc' '--enable-yp' '--with-zlib' '--without-pgsql' '--with-
kerberos=/usr
' '--with-openssl=/usr' '--enable-dbx' '--with-mime-
magic=/usr/share/misc/file/m
agic.mime' '--with-exec-dir=/usr/lib/php4/libexec' '--disable-static'
'--without
-mm' '--without-mysql' '--without-sybase-ct' '--enable-pcntl' '--with-
ncurses=/u
sr' '--with-libedit=/usr'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php4/cli/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
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 => 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 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 => On => On
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 => 2039 => 2039
expose_php => On => On
extension_dir => /usr/lib/php4/20020429 => /usr/lib/php4/20020429
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/share/php:/usr/share/pear =>
..:/usr/share/php:/usr/share/
pear
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
max_execution_time => 0 => 30
max_input_time => 60 => 60
memory_limit => 8M => 8M
open_basedir => no value => no value
output_buffering => 0 => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 12 => 12
register_argc_argv => On => On
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 => EGPCS => EGPCS
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.2, 30-Dec-2001
calendar
Calendar support => enabled
ctype
ctype functions => enabled
dba
DBA support => enabled
Supported handlers => cdb cdb_make db4 inifile flatfile
dbx
dbx support => enabled
dbx version => 1.0.0
supported databases => MySQL
ODBC
PostgreSQL
Microsoft SQL Server
FrontBase
Oracle 8 (oci8)
Sybase-CT
Directive => Local Value => Master Value
dbx.colnames_case => unchanged => unchanged
exif
EXIF Support => enabled
EXIF Version => 1.4 $Id: exif.c,v 1.118.2.29 2004/11/10 01:44:58 iliaa
Exp $
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF
ftp
FTP support => enabled
gettext
GetText 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
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
"streama
ble 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
mime_magic
mime_magic support => enabled
Directive => Local Value => Master Value
mime_magic.magicfile => /usr/share/misc/file/magic.mime =>
/usr/share/misc/file/
magic.mime
ncurses
ncurses support => enabled
ncurses library version => 5.4
color support => yes
openssl
OpenSSL support => enabled
OpenSSL Version => OpenSSL 0.9.7e 25 Oct 2004
overload
User-Space Object Overloading Support => enabled
pcntl
pcntl support => enabled
pcre
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 4.5 01-December-2003
posix
Revision => $Revision: 1.51.2.2 $
session
Session Support => enabled
Registered save handlers => files user
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 => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php4 => /var/lib/php4
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=,fieldset= => a=h
ref,area=href,frame=src,input=src,form=,fieldset=
user_agent => no value => no value
sysvmsg
sysvmsg support => enabled
Revision => $Revision: 1.4.2.3 $
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
xmlrpc
core library version => xmlrpc-epi v. 0.51
php extension version => 0.51
author => Dan Libby
homepage => http://xmlrpc-epi.sourceforge.net
open sourced by => Epinions.com
yp
YP Support => enabled
zlib
ZLib Support => enabled
Compiled Version => 1.2.2
Linked Version => 1.2.1.1
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
filepro
readline
sysvsem
sysvshm
Environment
Variable => Value
MANPATH => /home/a/local/man:
TERM => xterm
SHELL => /bin/bash
ORIG_LD_LIBRARY_PATH =>
SSH_CLIENT => 192.168.1.101 1417 22
CVSROOT => :ext:f:/projects/ICT/repository
ORIGMANPATH =>
SSH_TTY => /dev/pts/1
USER => a
UNISON => /home/a/.unison
MAIL => /var/mail/a
PATH => /home/a/local/bin:/home/a/local/sbin:/home/a/local/scripts:/usr
/X11R6/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
ORIGPATH => /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
CAMLLIB => /home/a/local/lib/ocaml
PWD => /home/a
EDITOR => vim
USERPROFILE => /home/a
PYTHONSTARTUP => /home/a/.pythonrc.py
SHLVL => 1
HOME => /home/a
PYTHONPATH => /home/a/local/lib/python2.3/site-packages
LOGNAME => a
SSH_CONNECTION => 192.168.1.101 1417 192.168.1.102 22
settitle => () { echo -n "^[]2;$@^G^[]1;$@^G"
}
... => () { if [[ $# == 0 ]]; then
count=1;
else
if [[ $# == 1 ]]; then
count=$1;
fi;
fi && cmd=;
for i in $(seq 1 $count);
do
cmd=${cmd}../;
done && cd $cmd;
echo "$(pwd):" && l
}
wgr => () { wget -np -m -p -k -nH "$@"
}
term => () { rxvt -e bash --login -i "$@"
}
maim => () { if [[ "$1" == -9 ]]; then
args="-9";
shift;
fi;
if [[ $# == 0 ]]; then
echo 'maim [-9] procname ...';
return;
fi;
for pname in "$@";
do
for pid in $( ps -o pid= -C "$pname" );
do
echo kill $args "$pid";
kill $args "$pid";
done;
done
}
cnu => () { cvs -z 9 -q up -d -P "$@" >cvs.log
}
c => () { if [[ "$1" == '-' ]]; then
cd - >/dev/null;
else
cd "$@";
fi && l
}
asd => () { xmodmap ~/dvorak.pke
}
pu => () { if [[ $# > 0 ]]; then
if [[ -n "$(ps -p 1 2>&1)" ]]; then
ps -u "$USER" | grep "\\<$@\\>";
else
ps -p $(pgrep -u "$USER" -x "$@");
fi;
else
ps -u "$USER";
fi
}
la => () { l -A "$@"
}
ll => () { l -Al "$@"
}
cu => () { cvs -z 9 -q -n up -d -P "$@" >cvs.log
}
l => () { ls --color=auto -F "$@"
}
- => () { c -
}
news => () { ssh -f -L 119:news:119 -N a@nova.cs.berkeley.edu
}
aoe => () { xmodmap ~/original.pke
}
t => () { latex "$@" && dvips "$@" && rm "$@.dvi" "$@.aux" "$@.log" &&
ps2pdf "
$@.ps"
}
v => () { if [[ "$DISPLAY" == "" ]]; then
vim "$@";
else
if [[ -n "$(pu gvim)" ]]; then
if [[ $# > 0 ]]; then
gvim --servername "$(hostname)" --remote "$@";
else
echo 'Starting vim without servername...';
gvim;
fi;
else
gvim --servername "$(hostname)" "$@";
fi;
fi
}
sq => () { tr -s '[:space:]' ' '
}
uni => () { unison -root "$HOME" -root ssh://home/ -logfile
$HOME/.unison/uniso
n.log "$@"
}
_ => ./test.php
PHP Variables
Variable => Value
_SERVER["MANPATH"] => /home/a/local/man:
_SERVER["TERM"] => xterm
_SERVER["SHELL"] => /bin/bash
_SERVER["ORIG_LD_LIBRARY_PATH"] =>
_SERVER["SSH_CLIENT"] => 192.168.1.101 1417 22
_SERVER["CVSROOT"] => :ext:f:/projects/ICT/repository
_SERVER["ORIGMANPATH"] =>
_SERVER["SSH_TTY"] => /dev/pts/1
_SERVER["USER"] => a
_SERVER["UNISON"] => /home/a/.unison
_SERVER["MAIL"] => /var/mail/a
_SERVER["PATH"] => /home/a/local/bin:/home/a/local/sbin:/home/a/local/s
cripts:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/gam
es
_SERVER["ORIGPATH"] =>
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
_SERVER["CAMLLIB"] => /home/a/local/lib/ocaml
_SERVER["PWD"] => /home/a
_SERVER["EDITOR"] => vim
_SERVER["USERPROFILE"] => /home/a
_SERVER["PYTHONSTARTUP"] => /home/a/.pythonrc.py
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /home/a
_SERVER["PYTHONPATH"] => /home/a/local/lib/python2.3/site-packages
_SERVER["LOGNAME"] => a
_SERVER["SSH_CONNECTION"] => 192.168.1.101 1417 192.168.1.102 22
_SERVER["settitle"] => () { echo -n \"^[]2;$@^G^[]1;$@^G\"
}
_SERVER["__"] => () { if [[ $# == 0 ]]; then
count=1;
else
if [[ $# == 1 ]]; then
count=$1;
fi;
fi && cmd=;
for i in $(seq 1 $count);
do
cmd=${cmd}../;
done && cd $cmd;
echo \"$(pwd):\" && l
}
_SERVER["wgr"] => () { wget -np -m -p -k -nH \"$@\"
}
_SERVER["term"] => () { rxvt -e bash --login -i \"$@\"
}
_SERVER["maim"] => () { if [[ \"$1\" == -9 ]]; then
args=\"-9\";
shift;
fi;
if [[ $# == 0 ]]; then
echo \'maim [-9] procname ...\';
return;
fi;
for pname in \"$@\";
do
for pid in $( ps -o pid= -C \"$pname\" );
do
echo kill $args \"$pid\";
kill $args \"$pid\";
done;
done
}
_SERVER["cnu"] => () { cvs -z 9 -q up -d -P \"$@\" >cvs.log
}
_SERVER["c"] => () { if [[ \"$1\" == \'-\' ]]; then
cd - >/dev/null;
else
cd \"$@\";
fi && l
}
_SERVER["asd"] => () { xmodmap ~/dvorak.pke
}
_SERVER["pu"] => () { if [[ $# > 0 ]]; then
if [[ -n \"$(ps -p 1 2>&1)\" ]]; then
ps -u \"$USER\" | grep \"\\\\<$@\\\\>\";
else
ps -p $(pgrep -u \"$USER\" -x \"$@\");
fi;
else
ps -u \"$USER\";
fi
}
_SERVER["la"] => () { l -A \"$@\"
}
_SERVER["ll"] => () { l -Al \"$@\"
}
_SERVER["cu"] => () { cvs -z 9 -q -n up -d -P \"$@\" >cvs.log
}
_SERVER["l"] => () { ls --color=auto -F \"$@\"
}
_SERVER["-"] => () { c -
}
_SERVER["news"] => () { ssh -f -L 119:news:119 -N
a@nova.cs.berkeley.edu
}
_SERVER["aoe"] => () { xmodmap ~/original.pke
}
_SERVER["t"] => () { latex \"$@\" && dvips \"$@\" && rm \"$@.dvi\"
\"$@.aux\" \
"$@.log\" && ps2pdf \"$@.ps\"
}
_SERVER["v"] => () { if [[ \"$DISPLAY\" == \"\" ]]; then
vim \"$@\";
else
if [[ -n \"$(pu gvim)\" ]]; then
if [[ $# > 0 ]]; then
gvim --servername \"$(hostname)\" --remote \"$@\";
else
echo \'Starting vim without servername...\';
gvim;
fi;
else
gvim --servername \"$(hostname)\" \"$@\";
fi;
fi
}
_SERVER["sq"] => () { tr -s \'[:space:]\' \' \'
}
_SERVER["uni"] => () { unison -root \"$HOME\" -root ssh://home/ -
logfile $HOME/
..unison/unison.log \"$@\"
}
_SERVER["_"] => ./test.php
_SERVER["PHP_SELF"] => ./test.php
_SERVER["SCRIPT_NAME"] => ./test.php
_SERVER["SCRIPT_FILENAME"] => ./test.php
_SERVER["PATH_TRANSLATED"] => ./test.php
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["argv"] => Array
(
[0] => ./test.php
)
_SERVER["argc"] => 1
_ENV["MANPATH"] => /home/a/local/man:
_ENV["TERM"] => xterm
_ENV["SHELL"] => /bin/bash
_ENV["ORIG_LD_LIBRARY_PATH"] =>
_ENV["SSH_CLIENT"] => 192.168.1.101 1417 22
_ENV["CVSROOT"] => :ext:f:/projects/ICT/repository
_ENV["ORIGMANPATH"] =>
_ENV["SSH_TTY"] => /dev/pts/1
_ENV["USER"] => a
_ENV["UNISON"] => /home/a/.unison
_ENV["MAIL"] => /var/mail/a
_ENV["PATH"] => /home/a/local/bin:/home/a/local/sbin:/home/a/local/scri
pts:/usr/X11R6/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
_ENV["ORIGPATH"] => /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
_ENV["CAMLLIB"] => /home/a/local/lib/ocaml
_ENV["PWD"] => /home/a
_ENV["EDITOR"] => vim
_ENV["USERPROFILE"] => /home/a
_ENV["PYTHONSTARTUP"] => /home/a/.pythonrc.py
_ENV["SHLVL"] => 1
_ENV["HOME"] => /home/a
_ENV["PYTHONPATH"] => /home/a/local/lib/python2.3/site-packages
_ENV["LOGNAME"] => a
_ENV["SSH_CONNECTION"] => 192.168.1.101 1417 192.168.1.102 22
_ENV["settitle"] => () { echo -n \"^[]2;$@^G^[]1;$@^G\"
}
_ENV["__"] => () { if [[ $# == 0 ]]; then
count=1;
else
if [[ $# == 1 ]]; then
count=$1;
fi;
fi && cmd=;
for i in $(seq 1 $count);
do
cmd=${cmd}../;
done && cd $cmd;
echo \"$(pwd):\" && l
}
_ENV["wgr"] => () { wget -np -m -p -k -nH \"$@\"
}
_ENV["term"] => () { rxvt -e bash --login -i \"$@\"
}
_ENV["maim"] => () { if [[ \"$1\" == -9 ]]; then
args=\"-9\";
shift;
fi;
if [[ $# == 0 ]]; then
echo \'maim [-9] procname ...\';
return;
fi;
for pname in \"$@\";
do
for pid in $( ps -o pid= -C \"$pname\" );
do
echo kill $args \"$pid\";
kill $args \"$pid\";
done;
done
}
_ENV["cnu"] => () { cvs -z 9 -q up -d -P \"$@\" >cvs.log
}
_ENV["c"] => () { if [[ \"$1\" == \'-\' ]]; then
cd - >/dev/null;
else
cd \"$@\";
fi && l
}
_ENV["asd"] => () { xmodmap ~/dvorak.pke
}
_ENV["pu"] => () { if [[ $# > 0 ]]; then
if [[ -n \"$(ps -p 1 2>&1)\" ]]; then
ps -u \"$USER\" | grep \"\\\\<$@\\\\>\";
else
ps -p $(pgrep -u \"$USER\" -x \"$@\");
fi;
else
ps -u \"$USER\";
fi
}
_ENV["la"] => () { l -A \"$@\"
}
_ENV["ll"] => () { l -Al \"$@\"
}
_ENV["cu"] => () { cvs -z 9 -q -n up -d -P \"$@\" >cvs.log
}
_ENV["l"] => () { ls --color=auto -F \"$@\"
}
_ENV["-"] => () { c -
}
_ENV["news"] => () { ssh -f -L 119:news:119 -N a@nova.cs.berkeley.edu
}
_ENV["aoe"] => () { xmodmap ~/original.pke
}
_ENV["t"] => () { latex \"$@\" && dvips \"$@\" && rm \"$@.dvi\"
\"$@.aux\" \"$@
..log\" && ps2pdf \"$@.ps\"
}
_ENV["v"] => () { if [[ \"$DISPLAY\" == \"\" ]]; then
vim \"$@\";
else
if [[ -n \"$(pu gvim)\" ]]; then
if [[ $# > 0 ]]; then
gvim --servername \"$(hostname)\" --remote \"$@\";
else
echo \'Starting vim without servername...\';
gvim;
fi;
else
gvim --servername \"$(hostname)\" \"$@\";
fi;
fi
}
_ENV["sq"] => () { tr -s \'[:space:]\' \' \'
}
_ENV["uni"] => () { unison -root \"$HOME\" -root ssh://home/ -logfile
$HOME/.un
ison/unison.log \"$@\"
}
_ENV["_"] => ./test.php
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.
1
Navigation:
[Reply to this message]
|