27.PHP5 Extensions for MediaLibrary 1.5.x Shop.

To answer many questions from users about this, here follows a short explanation of the PHP5 extensions that MediaLibrary needs to function. Including links to more information for each extension and instructions on how to install on FreeBSD and Linux.

Please make sure you have:

These PHP5 extensions installed in PHP5

The library dependencies on the OS that these extensions need Otherwise some MediaLibrary functions will not work!

MediaLibrary needs PHP5 with:

cURL (remote files Amazon) - needs libcurl

GD (for CAPTCHA generation - Shop only) - needs GD library with Freetype2

Below are some short explanations of these PHP extensions and links to more details on the PHP.net pages.



cURL

Link: http://us.php.net/manual/nl/ref.curl.php

Needs: libcurl version 7.10.5 or greater.

Installation in PHP5: --with-curl[=DIR]

Where DIR is the location of the directory containing the lib and include directories. In the "include" directory there should be a folder named "curl" which should contain the easy.h and curl.h files. There should be a file named libcurl.a located in the "lib" directory. Beginning with PHP 4.3.0 you can configure PHP to use cURL for URL streams --with-curlwrappers.



GD (only needed for MediaLibrary Shop CAPTCHA)

Link: http://nl2.php.net/gd

Needs: GD library

Installation in PHP5: --with-gd

To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), you can use the configure option --with-gd.

GD library requires libpng and libjpeg to compile! To enable support for

FreeType 2 add --with-freetype-dir=DIR.

FreeBSD users:

First make sure that the libraries needed by the PHP extensions are on your system. For FreeBSD user this is easy, because they do not need to worry about this: the built-in port dependencies will make sure the proper libraries are installed when you recompile PHP5 with the chosen options. Anyway, the following will then be added to your system:

GNOME xml

For MediaLibrary Shop users also:

GD library with Freetype2

Recompiling PHP5

For FreeBSD all PHP5 extensions can be found in the port:

/usr/ports/lang/php5-extensions. By going into that directory and

running "make config" you can choose the extensions you want included in your PHP5 installation.

After that run "make all deinstall reinstall clean". Once PHP5 is

recompiled, you're done.



Linux users:

First make sure that the libraries needed by the PHP extensions are on your system. Some Linux flavours like Debian and Ubuntu also have a port dependencies system which will take care of this for you.

libcurl

For MediaLibrary Shop users also:

GD library with Freetype2

Recompiling PHP5

Linux users will need to recompile PHP5 with the options needed by explicitly enabling the modules with the configure option, specifying on the command line the following:

MediaLibrary Free users:

" --with-curl[=DIR] "

MediaLibrary Shop users:

"--with-curl[=DIR] --with-gd[=DIR] --with-freetype-dir=DIR"

Once PHP5 is recompiled, you're done.

Remark:

Your system will stay up and running during the PHP recompiling. After the installation you only need to restart Apache (apachectl restart from the command line), which will only give a 0.5 second interruption of service. Users who are online during the Apache restart will not even notice any disruption.

What are you looking for?
Anti-spam question: How many eyes has a typical person?