I wrote and put on the web this rough guide for my purposes.
 I wanted to have it available "for ever" and "from every where". I am not committing myself to give support.
If anybody wants to let it more readable is welcome. Comments and "bug fixing" are very appreciated. */

[root@nbroversi ]# ls

/* these are the packages I downloaded from the net */

[root@nbroversi ]# tar xvzf mysql-4.0.13.tar.gz
[root@nbroversi ]# cd mysql-4.0.13
[root@nbroversi mysql-4.0.13]# ./configure --prefix /opt/mysql-4.0.13
[root@nbroversi mysql-4.0.13]# make [root@nbroversi mysql-4.0.13]#
make install [root@nbroversi mysql-4.0.13]# cd /opt/mysql-4.0.13/bin/
[root@nbroversi bin]# ./mysql_install_db
[root@nbroversi bin]# /usr/sbin/groupadd mysql
[root@nbroversi bin]# /usr/sbin/useradd -g mysql mysql
[root@nbroversi bin]# cd ..
[root@nbroversi bin]# chown -R mysql var
[root@nbroversi bin]# chgrp -R mysql .
[root@nbroversi bin]# cd
[root@nbroversi ]# cd mysql-4.0.13

/* Now there are two alternatives to have MYSQL as a startup service:
1) append to /etc/rc.local the line /bin/sh -c 'cd /opt/mysql ; ./bin/mysqld_safe --user=mysql &'
This configuration is quite ad hoc and does not trasform mysql as a SysV boot schema deamon.
2) copy ./share/mysql/mysql.server into /etc/init.d/mysql. Then, you could try to use KDE SysV boot scheme configurator to set mysql as an available service.

/* Change passwd with on of the two commands
/opt/mysql-4.0.13/bin/mysqladmin -u root password 'new-password'
/opt/mysql-4.0.13/bin/mysqladmin -u root -h nbroversi.di.unito.it password 'new-password'

/* Make some test the MySQL daemon with:
./mysqlshow -u root -p mysql
./mysql -e "select host,db,user from db" -u root -p mysql

[root@nbroversi ]# cd
[root@nbroversi ]# tar xzf FirebirdSS-
[root@nbroversi ]# cd FirebirdSS-
[root@nbroversi FirebirdSS-]# ./install.sh

/* Fireird installs everything at /opt/interbase and updates /etc/rc.d/init.d by writing in it the script named "firebird":
this becomes a service integrated into the SysV boot schema. Also, be sure to read SYSDBA.password file

[root@nbroversi FirebirdSS-]# cd
[root@nbroversi ]# tar xzf apache_1.3.27.tar.gz
[root@nbroversi ]# cd apache_1.3.27
[root@nbroversi apache_1.3.27]# ./configure --prefix=/opt/www
[root@nbroversi ]# cd ..
[root@nbroversi ]# tar xf php-4.2.3.tar.gz
[root@nbroversi ]# ln -s /opt/mysql-4.0.13/   /opt/mysql
[root@nbroversi ]# cd php-4.2.3
[root@localhost php-4.2.3]# ./configure --with-interbase=/opt/interbase/include/ --with-mysql=/opt/mysql --with-apache=../apache_1.3.27 --enable-track-vars --enable-trans-sid

/* For the configuration commands to build PHP also with XSLT capabilities refer to: http://www.protonicdesign.com/tutorial/sablot_and_php.php
 I used a RH9 and I needed to follow these steps:
*) download libiconv-1.8.tar.gz and compile it
*) libxml was already installed by the distribution
*) expath was already installed by the distribution with xmlwf in /usr/bin
*) download Sablot-0.98.tar.gz and compile it. If you experience problems look at http://www.protonicdesign.com/tutorial/faq.php
*) concerning the configuration parameters to compile php add all the following:
--with-dom --enable-sockets --enable-wddx --with-xmlrpc --enable-xslt --with-xslt-sablot=/usr/local/ --with-zlib-dir=/usr/lib --with-expat --with-iconv-dir=/usr/local/lib
*) continue as described below

[root@localhost php-4.2.3]# make
[root@localhost php-4.2.3]# make install
[root@localhost php-4.2.3]# cd ../apache_1.3.27
[root@localhost apache_1.3.27]# ./configure --prefix=/opt/www --activate-module=src/modules/php4/libphp4.module
[root@localhost apache_1.3.27]# cp src/modules/php4/libmodphp4.a src/modules/php4/libphp4.a
[root@localhost apache_1.3.27]# make
[root@localhost apache_1.3.27]# make install
[root@localhost apache_1.3.27]# cd ../php-4.2.3
[root@localhost php-4.2.3]# cp php.ini-dist /usr/local/lib/php.ini

Now two alternatives:
1) apache can be "manually" controlled with /opt/www/bin/apachectl start|stop
2) apache can be included as a SysV boot schema service by copying /opt/www/bin/apachectl in /etc/init.d/apache and updating the SysV boot schema eathe manually or by means of a an editor (KDE has one)

/* It is better to control that /opt/www/conf/httpd.conf contains an uncommented line:
AddType application/x-httpd-php .php

My https.conf did not have that line. I
 added it next to an existing AddType... clause.  

I enclose the complete  bash script  that works fo me .