php

From AIXTOOLS
Jump to: navigation, search

Contents

PHP for AIX

(Note: later I will try and make this prettier. For now I just want to get the basics in - Non-existent pages will be followed by their initial contents in-line.)

I have always found that building PHP has always been difficult, to put it simply. The problems, for me go back to 1999 and PHP v4.0.4 and PHP 4.0.6. Part of this was caused, in my humble opinion (imho) by issues with libtool - and later with problems in APR and/or apxs.

These later problems I have been able to correct with some minor changes to instdso.sh (more on that later)

The last years I have been struggling with getting a PHP build to work with my tool buildaix.

Building PHP for AIX

patching instdso.sh

After sapi/cli/php has been successfully built you want to be able to run "make install" and have the php module for httpd installed. The key problem is that the wrong file gets copied - so instdso removes it after it was copied. The effect is that nothing seems to have been copied.

While I do not think instdso.sh is the guilty code - as something has already gone wrong before instdso.sh starts it verification and cleanup - instdso.sh is an easy place to fix the problem as long as you can assume that the directory where the file is coming from is ./.libs

Below is the patch I now apply to the standard instdso.sh

--- ./build/instdso.sh  2006-07-12 03:38:44 +0000
+++ /var/httpd/build/instdso.sh 2014-06-20 19:13:56 +0000
@@ -72,6 +72,20 @@
   exit 0
 fi
 
+if test "$DLNAME" != "$TARGET_NAME"
+then
+    mv $TARGETDIR/$DLNAME $TARGETDIR/$TARGET_NAME
+fi
+
+# at this point $TARGETDIR/$TARGET_NAME should exist
+# if not, let's hope it is in .libs and copy it to $TARGET_DIR
+status=0
+if ! test -e  $TARGETDIR/$TARGET_NAME
+then
+       cp -p .libs/$TARGET_NAME  $TARGETDIR/$TARGET_NAME || exit 1
+       status=$?
+fi
+
 if test -n "$LIBRARY_NAMES"
 then
     for f in $LIBRARY_NAMES
@@ -80,14 +94,9 @@
     done
 fi
 
-if test "$DLNAME" != "$TARGET_NAME"
-then
-    mv $TARGETDIR/$DLNAME $TARGETDIR/$TARGET_NAME
-fi
-
 rm -f $TARGETDIR/$DSOARCHIVE_BASENAME
 rm -f $TARGETDIR/$DSOBASE.a
 rm -f $TARGETDIR/lib$DSOBASE.a
 rm -f $TARGETDIR/lib$TARGET_NAME
 
-exit 0
+exit $status


config.status

#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host x093:
#
# ./configure  --prefix=/opt --sysconfdir=/var/php/etc --mandir=/usr/share/man \
 --with-apxs2=/opt/httpd/sbin/apxs --enable-magic-quotes --enable-mod-charset \
 --enable-bcmath=shared --enable-calendar --enable-mbstring --enable-dba=shared \
 --enable-ftp=shared --enable-zip=shared --enable-gd-native-ttf \
 --enable-embedded-mysqli --with-gd --with-jpeg-dir=/opt --with-ttf \
 --with-zlib=shared --with-curlwrappers --with-curl=shared --with-curl=/opt \
 --with-freetype-dir=/opt --with-libxml-dir=/opt --with-mysqli=/opt/mysql/bin/mysql_config \
 --with-pdo-mysql=/opt/mysql --with-pear=/opt/php/bin

PHP 5.2.17

module list or phpinfo()

root@x093:[/data/prj/php/php-5.2.17]sapi/cli/php -i
phpinfo()
PHP Version => 5.2.17

System => AIX x093 3 5 0002C0CAD300
Build Date => Jul 31 2014 13:06:57
Configure Command =>  './configure'  '--prefix=/opt' '--sysconfdir=/var/php/etc' '--mandir=/usr/share/man' '--with-apxs2=/opt/httpd/sbin/apxs' '--enable-magic-quotes' '--enable-mod-charset' '--enable-bcmath=shared' '--enable-calendar' '--enable-mbstring' '--enable-dba=shared' '--enable-ftp=shared' '--enable-zip=shared' '--enable-gd-native-ttf' '--enable-embedded-mysqli' '--with-gd' '--with-jpeg-dir=/opt' '--with-ttf' '--with-zlib=shared' '--with-curlwrappers' '--with-curl=shared' '--with-curl=/opt' '--with-freetype-dir=/opt' '--with-libxml-dir=/opt' '--with-mysqli=/opt/mysql/bin/mysql_config' '--with-pdo-mysql=/opt/mysql' '--with-pear=/opt/php/bin'
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => /opt/lib
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
additional .ini files parsed => (none)
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => enabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => dict, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp, php, file, data  
Registered Stream Socket Transports => tcp, udp, unix, udg
Registered Stream Filters => convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed


This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies


 _______________________________________________________________________


Configuration

PHP Core

Directive => Local Value => Master Value
allow_call_time_pass_reference => On => On
allow_url_fopen => On => On
allow_url_include => Off => Off
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_globals_jit => On => On
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 => STDOUT => STDOUT
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 => no value => no value
expose_php => On => On
extension_dir => /opt/lib/php/extensions/no-debug-zts-20060613 => /opt/lib/php/extensions/no-debug-zts-20060613
file_uploads => On => On
highlight.bg => <font style="color: #FFFFFF">#FFFFFF</font> => <font style="color: #FFFFFF">#FFFFFF</font>
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/opt/php/bin => .:/opt/php/bin
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 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
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 => /usr/local/php/bin => /usr/local/php/bin
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
zend.ze1_compatibility_mode => Off => Off

calendar

Calendar support => enabled

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => libcurl/7.27.0 OpenSSL/0.9.8k zlib/1.2.3

date

date/time support => enabled
"Olson" Timezone Database Version => 2010.9
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.7.7
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

filter

Input Validation and Filtering => enabled
Revision => $Revision: 298196 $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

gd

GD Support => enabled
GD Version => bundled (2.0.34 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.10
GIF Read Support => enabled
GIF Create Support => enabled
JPG Support => enabled
PNG Support => enabled
WBMP Support => enabled
XBM Support => enabled

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

iconv

iconv support => enabled
iconv implementation => unknown
iconv library version => unknown

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

json

json support => enabled
json version => 1.2.1

libxml

libXML support => active
libXML Version => 2.7.7
libXML streams => enabled

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) version => 4.4.4
Multibyte regex (oniguruma) backtrack check => On

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 => no value => no value
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

mysqli

MysqlI Support => enabled
Client API library version => 5.0.91
Client API header version => 5.0.91
MYSQLI_SOCKET => /tmp/mysql.sock

Directive => Local Value => Master Value
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.reconnect => Off => Off

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.02 2010-03-19

Directive => Local Value => Master Value
pcre.backtrack_limit => 100000 => 100000
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers => mysql, sqlite, sqlite2

pdo_mysql

PDO Driver for MySQL, client library version => 5.0.91

pdo_sqlite

PDO Driver for SQLite 3.x => enabled
PECL Module version => (bundled) 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library => 3.3.7

posix

Revision => $Revision: 293036 $

Reflection

Reflection => enabled
Version => $Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $

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_httponly => Off => Off
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 => no value => no value
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => Off => Off
session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled
Revision => $Revision: 299016 $
Schema support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support => enabled
PECL Module version => 2.0-dev $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $
SQLite Library => 2.8.17
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 

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,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset=
user_agent => no value => no value

tokenizer

Tokenizer Support => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.7.7

xmlreader

XMLReader => enabled

xmlwriter

XMLWriter => enabled

Additional Modules

Module Name

Environment

Variable => Value
_ => sapi/cli/php
LANG => en_US
LOGIN => root
SSH_TTY => /dev/pts/0
PATH => /opt/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/vac/bin
LC__FASTMSG => true
EDITOR => /usr/bin/vi
LOGNAME => root
MAIL => /usr/spool/mail/root
LOCPATH => /usr/lib/nls/loc
PS1 => root@x093:[$PWD]
USER => root
AUTHSTATE => compat
DISPLAY => localhost:10.0
SHELL => /usr/bin/ksh
ODMDIR => /etc/objrepos
HOME => /
SSH_CONNECTION => 192.168.129.11 49275 192.168.129.93 22
SSH_CLIENT => 192.168.129.11 49275 22
TERM => vt102
MAILMSG => [YOU HAVE NEW MAIL]
PWD => /data/prj/php/php-5.2.17
TZ => UTC
A__z => ! LOGNAME
NLSPATH => /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat

PHP Variables

Variable => Value
_SERVER["_"] => sapi/cli/php
_SERVER["LANG"] => en_US
_SERVER["LOGIN"] => root
_SERVER["SSH_TTY"] => /dev/pts/0
_SERVER["PATH"] => /opt/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/vac/bin
_SERVER["LC__FASTMSG"] => true
_SERVER["EDITOR"] => /usr/bin/vi
_SERVER["LOGNAME"] => root
_SERVER["MAIL"] => /usr/spool/mail/root
_SERVER["LOCPATH"] => /usr/lib/nls/loc
_SERVER["PS1"] => root@x093:[$PWD]
_SERVER["USER"] => root
_SERVER["AUTHSTATE"] => compat
_SERVER["DISPLAY"] => localhost:10.0
_SERVER["SHELL"] => /usr/bin/ksh
_SERVER["ODMDIR"] => /etc/objrepos
_SERVER["HOME"] => /
_SERVER["SSH_CONNECTION"] => 192.168.129.11 49275 192.168.129.93 22
_SERVER["SSH_CLIENT"] => 192.168.129.11 49275 22
_SERVER["TERM"] => vt102
_SERVER["MAILMSG"] => [YOU HAVE NEW MAIL]
_SERVER["PWD"] => /data/prj/php/php-5.2.17
_SERVER["TZ"] => UTC
_SERVER["A__z"] => ! LOGNAME
_SERVER["NLSPATH"] => /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
_SERVER["PHP_SELF"] => 
_SERVER["SCRIPT_NAME"] => 
_SERVER["SCRIPT_FILENAME"] => 
_SERVER["PATH_TRANSLATED"] => 
_SERVER["DOCUMENT_ROOT"] => 
_SERVER["REQUEST_TIME"] => 1406829369
_SERVER["argv"] => Array
(
)

_SERVER["argc"] => 0
_ENV["_"] => sapi/cli/php
_ENV["LANG"] => en_US
_ENV["LOGIN"] => root
_ENV["SSH_TTY"] => /dev/pts/0
_ENV["PATH"] => /opt/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/vac/bin
_ENV["LC__FASTMSG"] => true
_ENV["EDITOR"] => /usr/bin/vi
_ENV["LOGNAME"] => root
_ENV["MAIL"] => /usr/spool/mail/root
_ENV["LOCPATH"] => /usr/lib/nls/loc
_ENV["PS1"] => root@x093:[$PWD]
_ENV["USER"] => root
_ENV["AUTHSTATE"] => compat
_ENV["DISPLAY"] => localhost:10.0
_ENV["SHELL"] => /usr/bin/ksh
_ENV["ODMDIR"] => /etc/objrepos
_ENV["HOME"] => /
_ENV["SSH_CONNECTION"] => 192.168.129.11 49275 192.168.129.93 22
_ENV["SSH_CLIENT"] => 192.168.129.11 49275 22
_ENV["TERM"] => vt102
_ENV["MAILMSG"] => [YOU HAVE NEW MAIL]
_ENV["PWD"] => /data/prj/php/php-5.2.17
_ENV["TZ"] => UTC
_ENV["A__z"] => ! LOGNAME
_ENV["NLSPATH"] => /usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat

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.
root@x093:[/data/prj/php/php-5.2.17]
Personal tools
Namespaces

Variants
Actions
Navigation
Downloads
Toolbox