Bug#231450: PHP5 install through apxs2: missing leading slash in module path
Package: apache2-threaded-dev
Version: 2.0.48-7
Other software: PHP 5.0.0b3 and also PHP 5.0.0RC1-dev (2004-02-06 10:30).
When installing PHP 5, it calls instdso.sh which in turn calls apxs2 to
install the PHP5 SAPI loadable module. However, the resulting path to the
module in apache2.conf misses a leading slash (/).
Here is the output from PHP5's "make install" (forgive any strange line
breaks; they're due to cut-and-paste):
gloomy:~/software/php5-200402061030# make install
Installing PHP SAPI module: apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/bin/libtool'
libphp5.la /usr/lib/apache2/modules
/usr/bin/libtool --mode=install cp libphp5.la /usr/lib/apache2/modules/
cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish
/root/software/php5-200402061030/libs'
chmod 755 /usr/lib/apache2/modules/libphp5.so
[activating module `php5' in /etc/apache2/apache2.conf]
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - upgraded: 1.3b6
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] DB - upgraded: 1.6.0RC1
[PEAR] HTTP - upgraded: 1.2.2
[PEAR] Mail - upgraded: 1.1.2
[PEAR] Net_SMTP - already installed: 1.2.3
[PEAR] Net_Socket - already installed: 1.0.1
[PEAR] XML_Parser - already installed: 1.0.1
[PEAR] XML_RPC - already installed: 1.0.4
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist
gloomy:~/software/php5-200402061030#
Below is the resulting LoadModule directive that gets added to
apache2.conf.
Notice that I've added a commented dummy LoadModule directive so that
apxs2 at all manages to figure out where to place the new LoadModule directive
(for more details, see Bug#231134).
Notice that the leading slash in /usr/lib/apache2/modules/libphp5.so is
missing:
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# To give PHP installation a hint on where to add its LoadModule directive
#LoadModule dummy_module /usr/lib/apache2/modules/mod_dummy.so
LoadModule php5_module usr/lib/apache2/modules/libphp5.so
# Include all the user configurations:
Include /etc/apache2/httpd.conf
This of course has to be corrected manually, as any relative path to the
LoadModule directive is taken relative to the server root.
I hope that the output from PHP5's "make install" will aid you in spotting
the error (either in instdso.sh or apxs2).
Best regards,
Björn
--
Björn Wiberg (bjorn.wiberg@home.se)
Homepage: http://bwiberg.dyndns.org/
Reply to: