• Uncategorized

php-5.2.14

Get the sources:

root@hydra:~# su - soft
soft@hydra:~% cd php 
soft@hydra:~/php% wget "http://pl.php.net/get/php-5.2.14.tar.gz/from/this/mirror"
...
soft@hydra:~/php% gtar -zxf php-5.2.14.tar.gz

Correct version numbers in script (use sed):

soft@hydra:~/php% gsed "s/5.2.12/5.2.14/g" drf_php-5.2.12_conf > drf_php-5.2.14_conf
soft@hydra:~/php% chmod 754 !$
chmod 754 drf_php-5.2.14_conf

Check and correct path to apxs if needed:

soft@hydra:~/php% vi drf_php-5.2.14_conf

Compilation with use of script (see attachement)

soft@hydra:~/php% ./drf_php-5.2.14_conf                                             
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files.  Use 'cc -flags' for details
PATH=/usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb
CFLAGS=-fast -xautopar -D__const=const
CPPFLAGS=-I/usr/local/openldap/include -I/usr/local/include
CXXFLAGS=-fast -xautopar -D__const=const
LDFLAGS=-L/usr/local/openldap/lib -R/usr/local/openldap/lib -L/usr/local/lib -R/usr/local/lib
=============================================
dmake clean [y|n] ?
n
=============================================
configure [y|n] ?
y
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/local/bin/sed
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
checking for gcc... cc
...
Thank you for using PHP.

Please note CFLAGS, especially -D__const=const, without this compilation on Solaris might fail

dmake [y|n] ?
y
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
hydra --> 1 job
/bin/sh /home/soft/php/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/home/soft/php/php-5.2.14/ext/date/ -DPHP_ATOM_INC -I/home/soft/php/php-5.2.14/include -I/home/soft/php/php-5.2.14/main -I/home/soft/php/php-5.2.14 -I/home/soft/php/php-5.2.14/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/ssl/include -I/usr/local/curl/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/imap/include -I/usr/local/openldap/include -I/home/soft/php/php-5.2.14/ext/mbstring/oniguruma -I/home/soft/php/php-5.2.14/ext/mbstring/libmbfl -I/home/soft/php/php-5.2.14/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/home/soft/php/php-5.2.14/TSRM -I/home/soft/php/php-5.2.14/Zend  -I/usr/local/openldap/include -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/local/include -fast -xautopar -D__const=const -xmemalign=8s   -c /home/soft/php/php-5.2.14/ext/date/php_date.c -o ext/date/php_date.lo 
hydra --> 2 jobs
...
Build complete.
Don't forget to run 'make test'.

Compilation successful
=============================================

Testing

Test (dmake test || dmake check) [y|n] ?
y

=====================================================================
PHP         : /home/soft/php/php-5.2.14/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.2.14
ZEND_VERSION: 2.2.0
PHP_OS      : SunOS - SunOS hydra 5.10 Generic_141444-09 sun4u
INI actual  : /home/soft/php/php-5.2.14/tmp-php.ini
More .INIs  :  
CWD         : /home/soft/php/php-5.2.14
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2010-11-03 13:08:57
...
=====================================================================
TIME END 2010-11-03 13:36:04

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   33
Exts tested     :   46
---------------------------------------------------------------------

Number of tests : 9023              7179
Tests skipped   : 1844 ( 20.4%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :  171 (  1.9%) (  2.4%)
Expected fail   :    4 (  0.0%) (  0.1%)
Tests passed    : 7004 ( 77.6%) ( 97.6%)
---------------------------------------------------------------------
Time taken      : 1627 seconds
=====================================================================

Download and patching sources to add funcionality of mail() function logging:

soft@hydra:~/php% wget http://choon.net/opensource/php/php-5.2.14-mail-header.patch
...
2010-11-03 14:41:40 (15.8 KB/s) - `php-5.2.14-mail-header.patch' saved [3383/3383]

soft@hydra:~/php% gpatch -p0 --verbose < php-5.2.14-mail-header.patch          
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- php-5.2.14/ext/standard/mail.c.original	2010-08-08 19:45:17.000000000 +0800
|+++ php-5.2.14/ext/standard/mail.c	2010-08-08 19:45:35.000000000 +0800
--------------------------
Patching file php-5.2.14/ext/standard/mail.c using Plan A...
Hunk #1 succeeded at 216.
Hunk #2 succeeded at 321.
done

Compile and test again:

soft@hydra:~/php% ./drf_php-5.2.14_conf 
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files.  Use 'cc -flags' for details
PATH=/usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb
...

Switch back to root and install:

soft@hydra:~/php% exit
root@hydra:~# cd /home/soft/php/php-5.2.14 
root@hydra:/home/soft/php/php-5.2.14# dmake install

php-5.2.14

root@hydra:~# su - soft
soft@hydra:~% cd php 
soft@hydra:~/php% wget "http://pl.php.net/get/php-5.2.14.tar.gz/from/this/mirror"
...
soft@hydra:~/php% gtar -zxf php-5.2.14.tar.gz
soft@hydra:~/php% gsed "s/5.2.12/5.2.14/g" drf_php-5.2.12_conf > drf_php-5.2.14_conf
soft@hydra:~/php% chmod 754 !$
chmod 754 drf_php-5.2.14_conf

Trzeba sprawdzić i ewentualnie poprawić ścieżkę do apxs

soft@hydra:~/php% vi drf_php-5.2.14_conf

Kompilacja przy użyciu skryptu (w załączniku)

soft@hydra:~/php% ./drf_php-5.2.14_conf                                             
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files.  Use 'cc -flags' for details
PATH=/usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb
CFLAGS=-fast -xautopar -D__const=const
CPPFLAGS=-I/usr/local/openldap/include -I/usr/local/include
CXXFLAGS=-fast -xautopar -D__const=const
LDFLAGS=-L/usr/local/openldap/lib -R/usr/local/openldap/lib -L/usr/local/lib -R/usr/local/lib
=============================================
dmake clean [y|n] ?
n
=============================================
configure [y|n] ?
y
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/local/bin/sed
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
checking for gcc... cc
...
Thank you for using PHP.

Proszę zwrócić uwagę na flagi (CFLAGS), szczególnie na -D__const=const, bez tego kompilacja na Solarisie może się skończyć niepowodzeniem

dmake [y|n] ?
y
dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc file.
hydra --> 1 job
/bin/sh /home/soft/php/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/date/lib -Iext/date/ -I/home/soft/php/php-5.2.14/ext/date/ -DPHP_ATOM_INC -I/home/soft/php/php-5.2.14/include -I/home/soft/php/php-5.2.14/main -I/home/soft/php/php-5.2.14 -I/home/soft/php/php-5.2.14/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/ssl/include -I/usr/local/curl/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/imap/include -I/usr/local/openldap/include -I/home/soft/php/php-5.2.14/ext/mbstring/oniguruma -I/home/soft/php/php-5.2.14/ext/mbstring/libmbfl -I/home/soft/php/php-5.2.14/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/home/soft/php/php-5.2.14/TSRM -I/home/soft/php/php-5.2.14/Zend  -I/usr/local/openldap/include -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS  -I/usr/local/include -fast -xautopar -D__const=const -xmemalign=8s   -c /home/soft/php/php-5.2.14/ext/date/php_date.c -o ext/date/php_date.lo 
hydra --> 2 jobs
...
Build complete.
Don't forget to run 'make test'.

Compilation successful
=============================================

Testowanie

Test (dmake test || dmake check) [y|n] ?
y

=====================================================================
PHP         : /home/soft/php/php-5.2.14/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 5.2.14
ZEND_VERSION: 2.2.0
PHP_OS      : SunOS - SunOS hydra 5.10 Generic_141444-09 sun4u
INI actual  : /home/soft/php/php-5.2.14/tmp-php.ini
More .INIs  :  
CWD         : /home/soft/php/php-5.2.14
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2010-11-03 13:08:57
...
=====================================================================
TIME END 2010-11-03 13:36:04

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   33
Exts tested     :   46
---------------------------------------------------------------------

Number of tests : 9023              7179
Tests skipped   : 1844 ( 20.4%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :  171 (  1.9%) (  2.4%)
Expected fail   :    4 (  0.0%) (  0.1%)
Tests passed    : 7004 ( 77.6%) ( 97.6%)
---------------------------------------------------------------------
Time taken      : 1627 seconds
=====================================================================

Ściągnięcie i założenie patcha do logowania z funkcji mail i ponowna kompilacja

soft@hydra:~/php% wget http://choon.net/opensource/php/php-5.2.14-mail-header.patch
...
2010-11-03 14:41:40 (15.8 KB/s) - `php-5.2.14-mail-header.patch' saved [3383/3383]

soft@hydra:~/php% gpatch -p0 --verbose < php-5.2.14-mail-header.patch          
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- php-5.2.14/ext/standard/mail.c.original	2010-08-08 19:45:17.000000000 +0800
|+++ php-5.2.14/ext/standard/mail.c	2010-08-08 19:45:35.000000000 +0800
--------------------------
Patching file php-5.2.14/ext/standard/mail.c using Plan A...
Hunk #1 succeeded at 216.
Hunk #2 succeeded at 321.
done

soft@hydra:~/php% ./drf_php-5.2.14_conf 
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
usage: cc [ options] files.  Use 'cc -flags' for details
PATH=/usr/local/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/ucb
...

Instalacja (po przełączeniu na roota)

soft@hydra:~/php% exit
root@hydra:~# cd /home/soft/php/php-5.2.14 
root@hydra:/home/soft/php/php-5.2.14# dmake install

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.