It looks like you'll have to recompile php5 yourself in order to enable that extension.
Probably the easiest way to do that (this is untested by me in terms of php5):
install the apt-src, build-essential packages, and fakeroot packages
create a directory ~/source
start a terminal
cd to ~/source
(This will download and expand the source for php5 (assuming you have the appropriate deb-src lines in your sources.list file). It will also check for and download/install the build dependencies for the package (although enabling additional options, as you're doing here, may add additional dependencies - which won't appear until you go to compile. At which point you'll have to install the new dependencies and recompile. But this will get the bulk of them).
in the new directory that was just created find the debian/rules file
Edit that file and find the section with the php5 config options. (A bunch of --enable-xxx and --with-xxx statements). Add --enable-mbstring to the list.
Next change the debian/changelog file. Note that the format inside this file is important, else it will throw an error when you try to compile. Easiet way to do this is to just copy/paste the first section starting with the first libe of the file and ending with the blank line following the first line that starts with:
-- <maintainers name> <mainainers email> <date/time field>. So duplicate this section at the top of the file.
Edit the first line and add a suffix to the version (inside the parentheses) Simply add a string "+your initials" (without the quotes and replacing the phrase your initials with your actual initials
Modify the comments section - you can just delete most of them and say "recompile to enable mbstring".
Change the maintainer line to reflect your name, email address, and the current date/time. Make sure you maintain the same format and spacing on this line as what exists.
Save the file.
Go back to the root of the source and issue the following command:
dpkg-buildpackage -b -rfakeroot -us -uc
That will perform the entire compile pricess for you. If it throws any errors correct them (probably additional dependencies, or you messed with format of the control file) and rerun the command. Once it completes successdully you should have a bunch of deb files in the ~/source directory. To install I recommend that you use gdebi (you'll probably have to install gdebi first)
simply run (from inside ~/source):
# gdebi php5_<version>.deb
(gdebi has the advantage over dpkg -i in that it will resolve and install any needed dependencies).
Actually the compile may generate a package called php5-mbstring_<version>.deb
If that's the case then all you need to do is install that package. (although you may have to force it because of the new version number you generated. In which case the command to install it would be:
- Code: Select all
# dpkg -i --force-depends-version php5-mbstring_<version>.deb
or you could recompile using the original changelog)
Hope this helps - it's not as hard as it sounds (at least if everything works the way it should).