Subject | Re: [firebird-php] Firebird + PHP |
---|---|
Author | Lutz Brückner |
Post date | 2004-01-30T18:39:09Z |
Lester Caine wrote:
the INSTALL file of the php source distribution.
Traditionally I'm building libphp4.so (libphp5.so for php5) for apache
1.3 with all needed extensions built in. My apache installation
directory is /usr/local/apache/current, Firebird is in /usr/local/firebird .
Step 1. Grab the desired php source package from www.php.net and move it
to the /usr/local/src directory
Step 2. Unpack the source, i.e.: tar xvfj php-4.3.5RC1.tar.bz2
Step 3. change to the created directory: cd php-4.3.5RC1
Step 4. configure the source, for a basic installation plus Firebird:
./configure --with-apxs=/usr/local/apache/current/bin/apxs \
--with-interbase=/usr/local/firebird
Usually one want to include more extensions. ./configure --help displays
all possibilities. But for a beginner I would recommend to start simple
and add one option after another. This makes it easier to find the
reason if something fails. For the first try I would even omit the
--with-interbase.
If you run ./configure several times, don't forget to remove the file
config.cache between the runs: rm config.cache
Step 5. Make it: make
Step 6. Install it: make install
Because I have already a complete installation I skip the make install
most times and copy the libphp4.so directly:
cp .libs/libphp4.so /usr/local/apache/current/.libexec
Step 7. Edit /usr/local/apache/current/conf/httpd.conf, add the lines
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php .php3
in the suitable sections.
Step 8. Restart the apache: /etc/rc.d/apachectl restart
That's all. For php5 just replace libphp4.so with libphp5.so and
mod_php4.c with mod_php5.c.
Unfortunately it is usual that something else is failing. Common
problems for suse are that some required packages are not installed. So
one have to watch out for error messages and intall the rpms with the
missing tools or files. Good canditates are yacc and/or devel packages
for libraries.
Lutz
--
web based Firebird and InterBase administration: http://ibwebadmin.sf.net
> Lutz Br|ckner wrote:ok, I will do so, but there are no mysteries and it is also described in
>
>>>write what version of Firebird you're using, since 1.5 requires some
>>>manual changes to the source, AFAIK.
>>
>>fortunately this is not longer true. I've just build php4.3.5rc1 and
>>php5.0b3 with Firebird 1.5 this morning on my linux box (suse8.2)
>>without any trouble.
>
>
> Can you write us some notes please :)
the INSTALL file of the php source distribution.
Traditionally I'm building libphp4.so (libphp5.so for php5) for apache
1.3 with all needed extensions built in. My apache installation
directory is /usr/local/apache/current, Firebird is in /usr/local/firebird .
Step 1. Grab the desired php source package from www.php.net and move it
to the /usr/local/src directory
Step 2. Unpack the source, i.e.: tar xvfj php-4.3.5RC1.tar.bz2
Step 3. change to the created directory: cd php-4.3.5RC1
Step 4. configure the source, for a basic installation plus Firebird:
./configure --with-apxs=/usr/local/apache/current/bin/apxs \
--with-interbase=/usr/local/firebird
Usually one want to include more extensions. ./configure --help displays
all possibilities. But for a beginner I would recommend to start simple
and add one option after another. This makes it easier to find the
reason if something fails. For the first try I would even omit the
--with-interbase.
If you run ./configure several times, don't forget to remove the file
config.cache between the runs: rm config.cache
Step 5. Make it: make
Step 6. Install it: make install
Because I have already a complete installation I skip the make install
most times and copy the libphp4.so directly:
cp .libs/libphp4.so /usr/local/apache/current/.libexec
Step 7. Edit /usr/local/apache/current/conf/httpd.conf, add the lines
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php .php3
in the suitable sections.
Step 8. Restart the apache: /etc/rc.d/apachectl restart
That's all. For php5 just replace libphp4.so with libphp5.so and
mod_php4.c with mod_php5.c.
Unfortunately it is usual that something else is failing. Common
problems for suse are that some required packages are not installed. So
one have to watch out for error messages and intall the rpms with the
missing tools or files. Good canditates are yacc and/or devel packages
for libraries.
Lutz
--
web based Firebird and InterBase administration: http://ibwebadmin.sf.net