note 43044 added to install.solaris
| From: | ravi_kumarm at hotmail dot com | Date: | Mon, 07 Jun 2004 18:33:11 +0000 |
| Subject: | note 43044 added to install.solaris | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70754@lists.php.net to get a copy of this message | ||
Install Steps for PHP 4.3.6 with gd 2.0.25 support (for dymanic graphs)
for Apache 2.0.48 on Solaris 8 with Oracle 8i or MySQL:
------------------------------------------------------------
1. Install gd : configure, make, make install
Install dependent libaries if not already installed. This will require libiconv.
Install libiconv if not present.
> cd gd dir.
./configure --with-png=/usr/local --with-libiconv-prefix=/usr/local \
--with-png=/usr/local --with-freetype=/usr/local --with-jpeg=/usr/local \
--with-xpm=/usr/local --prefix=/usr/local
where /usr/local is the dir where the png, freetype, etc shared libs are installed.
>make
>make install
2. Install PHP:
IMPORTANT NOTE: The configure file in PHP dir was not linking libiconv shared lib and
throwing undefined symbols for functions defined in libiconv .
libiconv is used by gd 2.0.25. So, I manually added "-liconv" in front of all
occurances of "-lgd" in PHP's configure file to link libconv.so from /usr/local
Errors seen with PHP configure prior to adding -liconv in PHP's configure file.
Errors:
------
gdImageEllipse()
; return 0; }
configure:35140: checking for gdImageSetBrush in -lgd
configure:35159: gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -R/usr/local
/lib -L/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/opt/TWWfsw/gcc332/lib/gcc-
lib/sparc-sun-solaris2.8/3.3.2 -L/opt/TWWfsw/gcc332/lib/gcc-lib/sparc-sun-solari
s2.8/3.3.2 -R/usr/local/lib -L/usr/local/lib conftest.c -lgd -lgd -lfreetype -l
X11 -lXpm -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lsocket -lgcc 1>&5
Undefined first referenced
symbol in file
libiconv_open /usr/local/lib/libgd.so
libiconv /usr/local/lib/libgd.so
libiconv_close /usr/local/lib/libgd.so
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
---------------------------------------------------------
So, the final PHP configure command looks like this -
Oracle 8i -
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local
--with-freetype-dir=/usr/local --enable-gd-native-ttf
--with-xpm-dir=/usr/local --with-iconv=/usr/local --with-iconv-dir=/usr/local
--with-png-dir=/usr/local --with-jpeg-dir=/usr/local
--with-gettext=/usr/local
--with-oracle=/export/home/oracle/OraHome1
--with-oci8=/export/home/oracle/OraHome1
--with-zlib-dir=/usr/local
--enable-sigchild
MySQL -
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local
--with-freetype-dir=/usr/local --enable-gd-native-ttf
--with-xpm-dir=/usr/local --with-iconv=/usr/local --with-iconv-dir=/usr/local
--with-png-dir=/usr/local --with-jpeg-dir=/usr/local
--with-gettext=/usr/local
--with-zlib-dir=/usr/local
--with-mysql
> make
> make install
cp php.ini-dist /usr/local/lib/php.ini
Install Apache - with configure, make, make install
Add to Apache httpd.conf to enable PHP
--------------------------------------
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php .phtml
# Remove PHOP source in production
AddType application/x-httpd-php-source .phps
----------------------------------------------------------
----
Manual Page -- http://www.php.net/manual/en/install.solaris.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43044
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43044&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43044&report=yes
Search -- http://master.php.net/manage/user-notes.php