My ultimate goal is to install OwnCloud on my Debian box, a 64-bit squeeze.
My setup is pretty simple. I have installed OpenPanel which in turn installs all of the required LAMP modules via APT-GET. This installs PHP5.3.7 on my system, and points Apache2 to use it, all nice and proper.
However, OwnCloud requires mbstring to be enabled in PHP. This requires me to compile my own version of PHP with the --with-mbstring
configuration option, as the PHP bundled in the Debian repositories seemingly won't have that, and there is no such package as php-mbstring
or php5-mbstring
as there used to be with PHP4.
I have compiled the PHP using the tutorial found here, omitting APXS2 from the config (as I couldn't get it to work for the love of me) and substituting 5.2 with 5.4. However, the Apache2 installed by APT-GET (in /etc/apache2
) will not recognize this, and continues to say "5.3.7".
I have also tried to first compile the PHP, and then install OpenPanel, to no avail.
Having OpenPanel is essential, as it will help my customers manage their DNSs, domains, and databases, as well as Shell access.
Having OpenCloud is necessary also, because my clients require the use of an opensource collaboration suite.
How do I achieve this.
(Previously asked on stackoverflow.com but figured it didn't belong there.)
Best Answer
Debian can actually help you here--
apt-get
has a mode for downloading the source and build-dependencies for a package, which you can then tweak and build yourself. In theory, the setup should be identical to what Debian's repository contains, so it ought to integrate well with your version of Apache.I originally found this is PHP Magazine where they used it to customize the version of GD they were compiling with PHP. But you could use it for changing other build flags just as easily.
http://web.archive.org/web/20101229025544/http://www.phpmag.ru/2009/09/12/ubuntu-9-04-php-5-gd-2/
Since the original site isn't available any more (link above is through the Way Back Machine), I'm reproducing the instructions here:
Obviously, change the version number to match the version you're actually compiling, and replace the flags with the ones you actually want.