In the source directory:
./configure --prefix=/home/ashkan/Development/php/bin/php-5.2 --with-mysql --with-apxs2=/usr/bin/apxs2
make
works fine but make install
says:
Installing PHP SAPI module: apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install cp libphp5.la /usr/lib/apache2/modules/
libtool: install: cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
cp: cannot create regular file `/usr/lib/apache2/modules/libphp5.so': Permission denied
apxs:Error: Command failed with rc=65536
UPDATE: reading man apxs2
it seems apxs compiles and then installs the module into apache module directory
. This module directory seems to be fixed!
Based on this blog article, if you specify
INSTALL_ROOT
the PHP apache module will try to install in that directory.The other thing you might want to try adding this option to your
./configure
of php-src:as I believe those are being used in the Makefile
No permission to copy binaries to
/usr
. Dosudo make install
.