note 12668 deleted from ref.xslt by sobak
| From: | sobak@php.net | Date: | Fri, 25 Nov 2016 06:50:57 +0000 |
| Subject: | note 12668 deleted from ref.xslt by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207667@lists.php.net to get a copy of this message | ||
Note Submitter: maximo at migliari dot com
----
COMPILING AND INSTALLING SABLOTRON AND EXPAT FOR PHP ON A FREEBSD iServer
0) Prepare your virtual server environment. Telnet to your iserver and type:
mkdir -p ~/usr/local/apache/1.3/bin
ln /usr/bin/make ~/usr/bin/make
ln /usr/local/apache/1.3/bin/apxs ~/usr/local/apache/1.3/bin/apxs
ln /usr/local/apache/1.3/bin/httpd ~/usr/local/apache/1.3/bin/httpd
1) download the following files:
expat-1.95.tar.gz - http://expat.sourceforge.com
Sablot-0.52.tar.gz - http://www.gingerall.com
php4-latest.tar.gz - http://snaps.php.net
2) copy these files to ~/usr/local
3) expand all these files uing tar -xvzf
4) go into expat directory and type:
./configure --prefix=/usr/home/your_iserver_login_name/usr/local
make
make install
the files will be installed under ~/usr/local/lib and ~/usr/local/include
5) set the following environment variables:
setenv LD_LIBRARY_PATH /usr/home/your_iserver_login_name/usr/local/lib
setenv LD_RUN_PATH /usr/home/your_iserver_login_name/usr/local/
setenv CPLUS_INCLUDE_PATH /usr/home/your_iserver_login_name/usr/local/include
setenv LIBRARY_PATH /usr/home/your_iserver_login_name/usr/local/lib
6) go into the Sablotron directory and type:
./configure --prefix=/usr/home/your_iserver_login_name/usr/local
make
make install
7) go into the php directory and type:
./configure --with-apxs=/usr/local/apache/1.3/bin/apxs \
--disable-debug \
--enable-trans-sid \
--enable-versioning \
--enable-ftp \
--with-mysql=/usr/home/your_iserver_login_name/usr/local/mysql \
--with-xml \
--enable-magic-quotes \
--enable-track-vars \
--enable-sablot-errors-descriptive \
--with-sablot=/usr/home/your_iserver_login_name/usr/local \
--with-expat=/usr/home/your_iserver_login_name/usr/local
then
make
and
make install
the final command - make install - should give an error about not being able to install pear.
This is normal, as pear tries to copy itself outside of your virtual server space. Since pear
is not an essential part of PHP - you can ignore this. (maybe there is a command for ./configure
in php that allows us to specify the directory in which pear will be installed?
8) final steps:
go to ~/usr/local/etc/httpd/conf
edit httpd.conf
comment out the LoadModule directive for the previous php .so module.
not that you should see the new module you just compile already inserted in the httpd.conf as
the last line of all LoadModule directives. (it should be called libphp4.so
now just go back to the command prompt after you have edited httpd.conf and type:
restart_apache
now go to your httpd document root (usually htdocs), and create a php file with the following
code in it:
<?php
phpinfo();
?>
load the file in your browser, and you should see that everything has been installed properly :)