participate


Cool Tools - Compiling More Options Into PHP
<<   Back to Forum  |   Give us Feedback Topics: « Previous | Next
This topic has 3 replies on 1 page.
j.kemp
Posts:4
Registered: 11/25/06
Compiling More Options Into PHP   
Dec 1, 2006 9:45 AM

 
Hi,

I downloaded this CoolStack and was really impressed. This will definitively help new administrators in the Solaris community. I am really thankful all of the hard work.

I have a question:

I'm trying to install SugarCRM but it complains that PHP does not contain support for CURL, MBSTRINGS, LIBXML, IMAP, PHP-JSON, and ZLIB. Can I enable this support somewhere without having to re-compile PHP? I do not want to lose the optimization. This was the main reason for downloading beside the convenience of a stack.

Can there be more functions included in your compiled PHP?
What restrictions would preclude compiling PHP with more support?

Thank you for your efforts and sharing,

James
 
John.Tracy
Posts:2
Registered: 12/7/06
Re: Compiling More Options Into PHP   
Dec 7, 2006 3:25 AM (reply 1 of 3)  (In reply to original post )

 
Hey James-
I saw this posted in another topic here by ShantiS. I think it will answer your question:

You're right. PHP in Cool Stack does not include this library. It is obviously not possible to include all of the PHP libraries out there. What we've done is to include a 'config.sh' script in the source directory that tells you how we've built it and you can simply edit it to include whatever library you want. Download the library and run the script and you should have a good, optimized version for Solaris that meets your needs.
The 'config.sh' script resides in each source directory - please download the src tar file.



Does this help?

Cheers-
John

Message was edited by:
John.Tracy
 
j.kemp
Posts:4
Registered: 11/25/06
Re: Compiling More Options Into PHP   
Dec 15, 2006 9:44 AM (reply 2 of 3)  (In reply to #1 )

 
Hi John,

Thanks for info. It does help a lot. I'm just starting to compile software so it's confusing which process is best. I installed most of these packages from the Solaris CDs, but found they are older versions. So I looked at Blastwave, sunfreeware.com, tarballs directly from developers websites, then now these Cool Tools and all seem very laborious to get setup.

Maybe its just me, but this reminds me of the days the car manufacturers had two hundred vacuum lines on a carborator attempting to solve one problem.

I'm trying to setup SugarCRM and find I need Apache2, MySQL 4.14, PHP with five additional libraries and extensions. Perl has to be connected to Apache2 and PHP. All of there packages have own dependencies.

It seems without serious knowledge there is no way to have a clean system is there? From a new administrator point of view this is a total maze. I guess in time it will probably appear simple.

Thank you for responding,

James
 
yellowtea
Posts:7
Registered: 3/3/05
Re: Compiling More Options Into PHP   
Dec 26, 2006 11:44 AM (reply 3 of 3)  (In reply to #2 )

 
James,

I have SugarCRM (open source) running on a Solaris 9 Box. Most of my services run on a T-2000 in zones, but I haven't migrated this app over yet.

Here is what I used to get it all running. I'm sure some of the flags that I used to compile can be better optimized, and I'll leave that to those that know better (I did this 3 years ago)

Here is my /.profile
ENV=/.kshrc
EDITOR=vi
PS1="`uname -n`# "
EXINIT='set showmode| set ignorecase'
SHELL=/bin/ksh
export ENV EDITOR PS1 EXINIT SHELL
LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/opt/sfw/lib:/usr/sfw/lib
PATH=.:/usr/local/ssl/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share:/usr/sbin:/usr/bin:/usr/ccs/bin:/opt/sfw:/usr/sfw/bin
PHPRC=/usr/local/bin/php
CC="/usr/sfw/bin/gcc -m64"
export PATH
export PHPRC
export CC
export LD_LIBRARY_PATH

I have compiled the following, with the majority of the source code coming from sunfreeware.com. Much was just installed by running ./configure then "make" and then "make install". If the compile errors, be sure to run "make clean" before you try again.

autoconf-2.59 libmcrypt-2.5.7
automake-1.9 libpng-1.2.8
bison-1.875d libtool-1.5
curl-7.12.2 libxml2-2.6.20
expat-1.95.5 m4-1.4.2
flex-2.5.4 make-3.80-sol10-sparc-local
freetype-2.1.10 mhash-0.9.3
gcc-3.3.2-sol10-sparc-local mysql-5.0.18
gd-2.0.33 openssl-0.9.7i
httpd-2.2.0 php-5.0.4
jpeg-6b xpm-3.4k-sol10-sparc-local
libgcc-3.3-sol10-sparc-local zlib-1.2.3

bison-1.875d/
CC="gcc"
CFLAGS="-m64"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS
./configure --enable-shared

curl-7.12.2/
./configure --enable-ftp --enable-http --with-zlib=/usr/local --with-ssl=/usr/local/ssl

expat-1.95.5/
env CC="gcc -m64" ./configure

flex-2.5.4/
env CC="gcc -m64" ./configure


gd-2.0.33/
CC="gcc -m64"
export CC
./configure \
--prefix=/usr/local \
--with-freetype=/usr/sfw \
--with-png=/usr/sfw \
--with-jpeg=/usr/sfw \
--with-libiconv-prefix=/usr/local

httpd-2.2.0/
./configure --prefix=/usr/local/apache2 --enable-module=so --enable-ssl \
--with-ssl=/usr/local/ssl

libiconv-1.8/
env CC="gcc -m64" ./configure

libmcrypt-2.5.7/
env CC="gcc -m64" ./configure

mysql-5.0.18/
CC="/usr/local/bin/gcc"
CXX="gcc"
CFLAGS="-m64 -g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa"
CXXFLAGS="-m64 -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX CXXFLAGS
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--with-named-z-libs=yes \
--with-big-tables \
--disable-shared \
--with-readline \
--with-archive-storage-engine \
--with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib


openssl-0.9.7i/
./Configure solaris64-sparcv9-gcc31

php-5.0.4/
CC="gcc"
CPP="gcc -E"
CPPFLAGS="-I/usr/local/include -I/usr/local/ssl/include/openssl -I/usr/local/mysql/include/mysql -I/usr/local/apache2"
CXX="gcc"
CFLAGS="-I/usr/local/include -m64 -g -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa"
CXXFLAGS="-m64 -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g"
LDFLAGS="-L/usr/local/lib -L/usr/local/lib/sparcv9 -L/usr/local/mysql/lib/mysql -L/usr/local/ssl/lib -R/usr/local/lib -R/usr/local/ssl/lib -R/usr/local/lib/sparcv9 -R/usr/local/mysql/lib/mysql -m64"
LD_RUN_PATH=/usr/local/ssl/lib
export CC CXX CFLAGS CXXFLADGS LDFLAGS CPP CPPFLAGS LD_RUN_PATH
./configure \
--with-mcrypt \
--enable-bcmath \
--enable-calendar \
--with-curl \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-libgcc \
--with-dom \
--with-dom-xslt \
--with-dom-exslt \
--enable-exif \
--enable-ftp \
--with-gd \
--with-png-dir=/usr/local \
--with-xpm-dir=/usr/local \
--with-gettext \
--enable-mbstring=all \
--enable-mbstr-enc-trans \
--enable-mbregex \
--with-mcrypt \
--enable-magic-quotes \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-mysql=/usr/local/mysql \
--with-mysql-sock=/tmp/mysql.sock \
--with-openssl=/usr/local/ssl \
--with-xml \
--enable-discard-path \
--with-pear \
--enable-xslt \
--with-xslt-sablot \
--enable-sockets \
--enable-track-vars \
--with-ttf \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--enable-versioning \
--enable-wddx \
--with-xmlrpc \
--with-zip \
--with-zlib-dir=/usr/local \
--enable-xml \
--with-libxml-dir=/usr/local/lib \
--with-jpeg-dir=/usr/local \
--disable-posix-threads
 
This topic has 3 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 29
  • Guests : 132

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums