Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Jak dokompilować do PHP biblioteke GD?
Forum PHP.pl > Forum > Przedszkole
Kres
Jak w temacie mam php 4.2.3 i chce dołożyć GD wersji 2.xx system linux, jak tego dokonać?questionmark.gif
hwao
Prosze:
Click
Kres
Duzo tego, a moze bardziej szczegolowo co zrobic?

Czy np. wystarczy path do php 4.2.3( którego uzywam)?


INSTRUCTIONS (Please Follow Carefully)
Step One: download and install gd 2.0.8 or better. See the gd manual if you have questions about this step.
Step Two: download the php 4.2.3 source distribution. You have probably done this already. (If you can use a newer version of php, then DON'T USE this patch at all. See the message at the top of this page.)
Step Three: download the patch file, php-4.2.3-gd-2.0.8.patch, and save it to the directory where you saved the php source distribution. I recommend right-clicking on the above link and selecting the "save target as" option.
Step Four: untar the php distribution, if you have not already done so, and cd to the php-4.2.3 directory.
Step Five: type this command:
patch -p1 < ../php-4.2.3-gd-2.0.8.patch

Step Six: type ./configure, make, make install, etc. as you would normally do for php. In my experience, you will probably have to specify --with-gd=/usr/local, --with-png-dir=/usr/local, and --with-zlib-dir=/usr/local at a minimum to get configure to notice that gd is available, but your mileage may vary.
Step Seven: enjoy! The new imagecopyrotated function is similar to imagecopyresized, except with slightly different arguments: dstImage, srcImage, dstX, dstY, srcX, srcY, srcWidth, srcHeight, angle. Note that the destination X and Y coordinates specify the center of the rotated version of the source rectangle. Also note that the angle is specified as an integer number of degrees (0-359).
Jojo
Na stronie, którą podał Ci hwao masz wyraźnie napisane:
Cytat
To enable GD-support configure php --with-gd[=DIR], where DIR is the GD base install directory.

Czyli musisz napisać:
Kod
./configure --with-gd=/path/to/gd

Oczywiście musisz dodać również wszystkie inne opcje z którymi wcześniej kompilowałeś php.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.