SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Adding the GD Graphics Library
      extension (gd.so) to PHP5 on
    Mac OS X Server 10.5.7 or greater
        for 64- and 32-bit CPUs



   1. - Introduction

   2. - Requirements

   3. - Getting and installing libjpeg

   4. - Getting and installing the GD Graphics Library Ext.

   5. - Caveats - READ this chapter!




----------------------------------------------------------------
DISCLAIMER: The author(s) claim(s) no responsibility for any
damage that may occur from the use of any information found here
or found on links followed from this document. The author(s)
will take credit for the good stuff though.

All items and/or companies mentioned on this and other pages are
or may be trademarks, registered trademarks, or service marks of
the respective companies or individuals.
----------------------------------------------------------------
1. - Introduction
NOTE: With the introduction of Mac OS X Server 10.5 Leopard a
few things have changed with regards to included libraries and
PHP5. For example, the mysql client libraries are not present
anymore, so recompiling PHP exactly as intended by Apple is not
possible. It still is possible to update PHP5 when new versions
come out, but it will require a few workarounds. Given this
situation, we have decided to split the GD and PHP tutorials
into 10.4.x and 10.5.x versions. Furthermore, the 10.5 tutorial
on the GD Graphics Library is now available in two flavors. One,
universally applicable and one purely PHP centric, like the
current one.

The purpose of this document is to provide instructions on how
to add the GD Graphics Library Extension (gd.so) to PHP5 on OS X
10.5.7 or greater Server. Since there are certain differences,
it has separate instructions for 64- and 32-bit CPUs.

Unlike our other tutorial: "Installing GD Graphics Library on
Mac OS X Server 10.5.x", this will not install a universally
available library, but only what is required to use GD from
PHP5. On the bright side, you will not need to recompile PHP5
from scratch.

You will not find many explanations as to why something is done
one way or the other. There are plenty of tutorials on this
around on the internet. This document should just help you in
getting things done.

The GD Graphics Library depends on other libraries to be
installed first. These include: zlib, libpng, libjpeg et al.
Luckily, the Developer Tools for OS X Server 10.5 include
current versions for all but libjpeg.

This document will require you to use the command line. If you
do not feel comfortable with using the command line, you should
look for a ready made installer package or for somebody to
assist you.

This document is written for Mac OS X 10.5.7 or greater. It may
or may not work on earlier versions.
DISCLAIMER: Whatever you do based on this document, you do it at
your own risk! Just in case you haven't understood: Whatever you
do based on this document, you do it at your own risk!

This tutorial has been tested on a standard Mac OS X 10.5.7
Server installation. If you have already tinkered with your
system, be aware that things might differ. It is impossible for
me to foresee all changes that one might have applied to a
server.

This tutorial contains step-by-step instructions for the
terminal. Although you could just type them in line by line, it
is recommended you have a basic understanding of the terminal.

NOTE: Throughout this document you will see a few instructions that
differ between 32- and 64-bit CPUs. Leopard Server is built with
Universal Binaries, which contain 4 architectures (32- and 64-bit for
PPC and Intel). On a 64-bit system, Apache2 will try to load the 64-bit
image of libphp5.so, so it is important that Apache2 can find it. Thus,
we must compile PHP5 and/or all related modules as the same type of
Universal Binary. Well, you could also just build versions relevant to
your system, but I am not going to publish x variations ;-)

(This is a very simplified version of what really goes on, just so you
understand certain apparent redundancies).
2. - Requirements

Before you get started, you need to make sure some basic
requirements are met:

- You have made a backup of your system.
- You have the latest version of Apple's Developer Tools
  (XCode 3.1.2 or higher for 10.5) installed.
  Dev Tools are available on your Server DVD and as a free
  download from Apple's Developer Connection.
- X11 is installed (part of standard OS X Server install unless
  you deselect it)
- X11 SDK is installed (available on your OS X Developer Tools
  Disc or Image and part of the standard installation. This is
  different from the X11 client that comes with OS X.)
- You do have a backup
- You are running 10.5.7 or greater
- You have not manually updated anything related to GD,
  libpng, libjpeg and freetype so far (if you have, you must
  know how to adapt these instructions to the changes you
  made).

- Not a requirement, but it is recommended you subscribe to our
  newsletter(s) or follow us on Twitter to be informed when
  updated versions of this and other tutorials become
  available:
  http://osx.topicdesk.com/newsletter/
  http://twitter.com/topicdesk/
3. - Getting and installing libjpeg

This chapter will guide you through installing libjpeg. It is
required for GD to work.

So let's get going:
Make sure you are logged in as root.

Get and install the latest version of the libraries by issuing
the following commands (in oblique type). Issue them one after
the other making sure you do not miss any dots or slashes. Note
that the download URLs may change in the future. In that case
just replace the URLs in this document with the current one.
Lines wrapping without line spacing are a single command.

(First we create our environment)

mkdir -p /SourceCache

cd /SourceCache

(Now we get the jpeg library and unpack it.)

curl -O ftp://ftp.internat.freebsd.org/pub/FreeBSD/
distfiles/jpegsrc.v6b.tar.gz

tar xzpf jpegsrc.v6b.tar.gz

(Next we install libjpeg)

cd /SourceCache/jpeg-6b


cp /usr/share/libtool/config.sub .

cp /usr/share/libtool/config.guess .
NOTE: The following configure command is different for 32- and
64-bit CPUs

NOTE: Just in case you missed it: The following configure
command is different for 32- and 64-bit CPUs

For 32-bit use:

./configure --enable-shared

For 64-bit use:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch
ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-
precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch
x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -
arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc
-arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./
configure --enable-shared


make

mkdir -p /usr/local/include

mkdir -p /usr/local/bin

mkdir -p /usr/local/lib

mkdir -p /usr/local/man/man1

make install
4. - Getting and installing the GD Graphics Library extension
(gd.so)

This chapter will guide you through getting and installing the
GD Graphics Library extension (gd.so).

So let's get going:
Make sure you are logged in as root.

Install the GD Graphics Library extension by issuing the
following commands (in oblique type). Issue them one after the
other making sure you do not miss any dots or slashes. Lines
wrapping without line spacing are a single command.

Note: For maximum compatibility, we will be downloading the
needed PHP files from Apple's Darwin Sources.



mkdir -p /SourceCache

cd /SourceCache

curl -O http://www.opensource.apple.com/source/
apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2

tar xjf php-5.2.8.tar.bz2

cd /SourceCache/php-5.2.8/ext/gd

phpize
NOTE: The following configure command is different for 32- and
64-bit CPUs

NOTE: Just in case you missed it: The following configure
command is different for 32- and 64-bit CPUs

For 32-bit use:

./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/
local/lib --with-png-dir=/usr/X11R6 --with-freetype-
dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6

For 64-bit use:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch
ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-
precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch
x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -
arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc
-arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./
configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/
local/lib --with-png-dir=/usr/X11R6 --with-freetype-
dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6

make

make install
The extension has now been built and installed. Next we need to
make sure PHP is aware of it. To this purpose we need to add an
instruction to /etc/php.ini. Apple's stock server installation
does not come with a php.ini file. If you have NOT added one
yourself, just issue the next command.

echo extension=gd.so > /etc/php.ini

If on the other hand you have already created your own /etc/
php.ini, make sure the following parameter is present and
uncommented. If it isn't, add it:

extension=gd.so

Also, if you already had your own php.ini, make sure the
extension_dir= setting is not overriding any defaults. If in doubt,
comment it out or point to the directory gd.so was installed into (usually
/usr/lib/php/extensions/no-debug-non-zts-20060613)

Now that everything is ready, we just restart our web server so
that the extension gets loaded.

apachectl graceful

You are now all set and should have the GD and supporting
libraries installed.

To verify this create a file called info.php with the following
contents:

<?php
phpinfo();
?>

When done, place it in an accessible directory of your web-
server and call it through your browser. Detailed version and
configuration information will be displayed. Among all the
information, you should see a section called "gd" which should
state "GD Support enabled"
5. - Caveats

Not that many. The most important caveat is that if building one
library goes wrong, the rest of the succession will most likely
not work either.

If you have tried to install one of the libraries in the past,
you may have to remove and re-install them (unless you did
install them as described).

If you have modified any paths and or environment variables,
make sure you check them against above instructions.



That's all folks.
Hope this helps.
Have fun,
Alex

------------------------------
Doc. Version 1.1.9, 10.7.2009
Athanasios Alexandrides
Lugano, Switzerland
tutorials -at- topicdesk.com
------------------------------

Contenu connexe

Tendances

How%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffersHow%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20lafferstutorialsruby
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Puppet
 
Packaging for the Maemo Platform
Packaging for the Maemo PlatformPackaging for the Maemo Platform
Packaging for the Maemo PlatformJeremiah Foster
 
5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibmbalajipala
 
Os Leventhal
Os LeventhalOs Leventhal
Os Leventhaloscon2007
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
Composer | PHP Dependency Manager
Composer | PHP Dependency ManagerComposer | PHP Dependency Manager
Composer | PHP Dependency ManagerUjjwal Ojha
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packagesJeremiah Foster
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding styleBo-Yi Wu
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with ComposerAdam Englander
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Clark Everetts
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Denish Patel
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wikiyaranusa
 
Readme
ReadmeReadme
Readmey1ash
 

Tendances (18)

How%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffersHow%20to%20install%20PHP%20on%20Linux%20_%20laffers
How%20to%20install%20PHP%20on%20Linux%20_%20laffers
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
 
NIH package manager for pkgsrc
NIH package manager for pkgsrcNIH package manager for pkgsrc
NIH package manager for pkgsrc
 
Packaging for the Maemo Platform
Packaging for the Maemo PlatformPackaging for the Maemo Platform
Packaging for the Maemo Platform
 
5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm5503 cake php-tutorial-no-1-from-ibm
5503 cake php-tutorial-no-1-from-ibm
 
Os Leventhal
Os LeventhalOs Leventhal
Os Leventhal
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Composer | PHP Dependency Manager
Composer | PHP Dependency ManagerComposer | PHP Dependency Manager
Composer | PHP Dependency Manager
 
The Gory Details of Debian packages
The Gory Details of Debian packagesThe Gory Details of Debian packages
The Gory Details of Debian packages
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
PHP Dependency Management with Composer
PHP Dependency Management with ComposerPHP Dependency Management with Composer
PHP Dependency Management with Composer
 
Manual 5
Manual 5Manual 5
Manual 5
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 
History
HistoryHistory
History
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
 
Apache ssl
Apache ssl Apache ssl
Apache ssl
 
Readme
ReadmeReadme
Readme
 

En vedette

Jeni Intro1 Bab02 Pengenalan Bahasa Java
Jeni Intro1 Bab02 Pengenalan Bahasa JavaJeni Intro1 Bab02 Pengenalan Bahasa Java
Jeni Intro1 Bab02 Pengenalan Bahasa JavaIndividual Consultants
 
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...
P R O S P E K T U S  P E R U S A H A A N  I K K I  G R O U P  D E N G A N  C ...P R O S P E K T U S  P E R U S A H A A N  I K K I  G R O U P  D E N G A N  C ...
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...Individual Consultants
 
Sistem Penyadapan Intruder In The Darkness
Sistem  Penyadapan  Intruder In  The  DarknessSistem  Penyadapan  Intruder In  The  Darkness
Sistem Penyadapan Intruder In The DarknessIndividual Consultants
 
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...
O T O M A S I  P E N G A W A S  R U M A H  D E N G A N  M E N G G U N A K A N...O T O M A S I  P E N G A W A S  R U M A H  D E N G A N  M E N G G U N A K A N...
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...Individual Consultants
 

En vedette (8)

Presentatie Albert Roos Twinfield Masterclass #TWFMC
Presentatie Albert Roos Twinfield Masterclass #TWFMCPresentatie Albert Roos Twinfield Masterclass #TWFMC
Presentatie Albert Roos Twinfield Masterclass #TWFMC
 
YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
Jeni Intro1 Bab02 Pengenalan Bahasa Java
Jeni Intro1 Bab02 Pengenalan Bahasa JavaJeni Intro1 Bab02 Pengenalan Bahasa Java
Jeni Intro1 Bab02 Pengenalan Bahasa Java
 
24602905 Karsten Nohl
24602905  Karsten  Nohl24602905  Karsten  Nohl
24602905 Karsten Nohl
 
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...
P R O S P E K T U S  P E R U S A H A A N  I K K I  G R O U P  D E N G A N  C ...P R O S P E K T U S  P E R U S A H A A N  I K K I  G R O U P  D E N G A N  C ...
P R O S P E K T U S P E R U S A H A A N I K K I G R O U P D E N G A N C ...
 
Sistem Penyadapan Intruder In The Darkness
Sistem  Penyadapan  Intruder In  The  DarknessSistem  Penyadapan  Intruder In  The  Darkness
Sistem Penyadapan Intruder In The Darkness
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...
O T O M A S I  P E N G A W A S  R U M A H  D E N G A N  M E N G G U N A K A N...O T O M A S I  P E N G A W A S  R U M A H  D E N G A N  M E N G G U N A K A N...
O T O M A S I P E N G A W A S R U M A H D E N G A N M E N G G U N A K A N...
 

Similaire à Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard

Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Servertutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Servertutorialsruby
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorialDru Lavigne
 
Setting advanced PHP development environment
Setting advanced PHP development environmentSetting advanced PHP development environment
Setting advanced PHP development environmentKapil Sharma
 
Introducing with MongoDB
Introducing with MongoDBIntroducing with MongoDB
Introducing with MongoDBMahbub Tito
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configurationSubhas Kumar Ghosh
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuis Rodríguez Castromil
 
Centralized Fog Server with OpenLDAP
Centralized Fog Server with OpenLDAP Centralized Fog Server with OpenLDAP
Centralized Fog Server with OpenLDAP tare
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation Mahantesh Angadi
 
PBX on a non-specialized distro
PBX on a non-specialized distroPBX on a non-specialized distro
PBX on a non-specialized distroStefanoFancello
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingBeni Krisbiantoro
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
 
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsHow to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsRizban Ahmad
 
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSEInstalling Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSEFraser Chadburn
 
APACHE
APACHEAPACHE
APACHEARJUN
 

Similaire à Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard (20)

Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_ServerUpdating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 
Setting advanced PHP development environment
Setting advanced PHP development environmentSetting advanced PHP development environment
Setting advanced PHP development environment
 
Introducing with MongoDB
Introducing with MongoDBIntroducing with MongoDB
Introducing with MongoDB
 
LIGGGHTS installation-guide
LIGGGHTS installation-guideLIGGGHTS installation-guide
LIGGGHTS installation-guide
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Php mysql-tutorial-en
Php mysql-tutorial-enPhp mysql-tutorial-en
Php mysql-tutorial-en
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDaysLuisRodriguezLocalDevEnvironmentsDrupalOpenDays
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
 
Centralized Fog Server with OpenLDAP
Centralized Fog Server with OpenLDAP Centralized Fog Server with OpenLDAP
Centralized Fog Server with OpenLDAP
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation
 
PBX on a non-specialized distro
PBX on a non-specialized distroPBX on a non-specialized distro
PBX on a non-specialized distro
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
 
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on WindowsHow to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on Windows
 
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSEInstalling Installing IBM Rational Rhapsody Designer and Architect for MBSE
Installing Installing IBM Rational Rhapsody Designer and Architect for MBSE
 
APACHE
APACHEAPACHE
APACHE
 
Php simple
Php simplePhp simple
Php simple
 

Plus de tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

Plus de tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Dernier

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Dernier (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Adding_GD2_to_PHP_on_OS_X_Server_10_5_Leopard

  • 1. Adding the GD Graphics Library extension (gd.so) to PHP5 on Mac OS X Server 10.5.7 or greater for 64- and 32-bit CPUs 1. - Introduction 2. - Requirements 3. - Getting and installing libjpeg 4. - Getting and installing the GD Graphics Library Ext. 5. - Caveats - READ this chapter! ---------------------------------------------------------------- DISCLAIMER: The author(s) claim(s) no responsibility for any damage that may occur from the use of any information found here or found on links followed from this document. The author(s) will take credit for the good stuff though. All items and/or companies mentioned on this and other pages are or may be trademarks, registered trademarks, or service marks of the respective companies or individuals. ----------------------------------------------------------------
  • 2. 1. - Introduction NOTE: With the introduction of Mac OS X Server 10.5 Leopard a few things have changed with regards to included libraries and PHP5. For example, the mysql client libraries are not present anymore, so recompiling PHP exactly as intended by Apple is not possible. It still is possible to update PHP5 when new versions come out, but it will require a few workarounds. Given this situation, we have decided to split the GD and PHP tutorials into 10.4.x and 10.5.x versions. Furthermore, the 10.5 tutorial on the GD Graphics Library is now available in two flavors. One, universally applicable and one purely PHP centric, like the current one. The purpose of this document is to provide instructions on how to add the GD Graphics Library Extension (gd.so) to PHP5 on OS X 10.5.7 or greater Server. Since there are certain differences, it has separate instructions for 64- and 32-bit CPUs. Unlike our other tutorial: "Installing GD Graphics Library on Mac OS X Server 10.5.x", this will not install a universally available library, but only what is required to use GD from PHP5. On the bright side, you will not need to recompile PHP5 from scratch. You will not find many explanations as to why something is done one way or the other. There are plenty of tutorials on this around on the internet. This document should just help you in getting things done. The GD Graphics Library depends on other libraries to be installed first. These include: zlib, libpng, libjpeg et al. Luckily, the Developer Tools for OS X Server 10.5 include current versions for all but libjpeg. This document will require you to use the command line. If you do not feel comfortable with using the command line, you should look for a ready made installer package or for somebody to assist you. This document is written for Mac OS X 10.5.7 or greater. It may or may not work on earlier versions.
  • 3. DISCLAIMER: Whatever you do based on this document, you do it at your own risk! Just in case you haven't understood: Whatever you do based on this document, you do it at your own risk! This tutorial has been tested on a standard Mac OS X 10.5.7 Server installation. If you have already tinkered with your system, be aware that things might differ. It is impossible for me to foresee all changes that one might have applied to a server. This tutorial contains step-by-step instructions for the terminal. Although you could just type them in line by line, it is recommended you have a basic understanding of the terminal. NOTE: Throughout this document you will see a few instructions that differ between 32- and 64-bit CPUs. Leopard Server is built with Universal Binaries, which contain 4 architectures (32- and 64-bit for PPC and Intel). On a 64-bit system, Apache2 will try to load the 64-bit image of libphp5.so, so it is important that Apache2 can find it. Thus, we must compile PHP5 and/or all related modules as the same type of Universal Binary. Well, you could also just build versions relevant to your system, but I am not going to publish x variations ;-) (This is a very simplified version of what really goes on, just so you understand certain apparent redundancies).
  • 4. 2. - Requirements Before you get started, you need to make sure some basic requirements are met: - You have made a backup of your system. - You have the latest version of Apple's Developer Tools (XCode 3.1.2 or higher for 10.5) installed. Dev Tools are available on your Server DVD and as a free download from Apple's Developer Connection. - X11 is installed (part of standard OS X Server install unless you deselect it) - X11 SDK is installed (available on your OS X Developer Tools Disc or Image and part of the standard installation. This is different from the X11 client that comes with OS X.) - You do have a backup - You are running 10.5.7 or greater - You have not manually updated anything related to GD, libpng, libjpeg and freetype so far (if you have, you must know how to adapt these instructions to the changes you made). - Not a requirement, but it is recommended you subscribe to our newsletter(s) or follow us on Twitter to be informed when updated versions of this and other tutorials become available: http://osx.topicdesk.com/newsletter/ http://twitter.com/topicdesk/
  • 5. 3. - Getting and installing libjpeg This chapter will guide you through installing libjpeg. It is required for GD to work. So let's get going: Make sure you are logged in as root. Get and install the latest version of the libraries by issuing the following commands (in oblique type). Issue them one after the other making sure you do not miss any dots or slashes. Note that the download URLs may change in the future. In that case just replace the URLs in this document with the current one. Lines wrapping without line spacing are a single command. (First we create our environment) mkdir -p /SourceCache cd /SourceCache (Now we get the jpeg library and unpack it.) curl -O ftp://ftp.internat.freebsd.org/pub/FreeBSD/ distfiles/jpegsrc.v6b.tar.gz tar xzpf jpegsrc.v6b.tar.gz (Next we install libjpeg) cd /SourceCache/jpeg-6b cp /usr/share/libtool/config.sub . cp /usr/share/libtool/config.guess .
  • 6. NOTE: The following configure command is different for 32- and 64-bit CPUs NOTE: Just in case you missed it: The following configure command is different for 32- and 64-bit CPUs For 32-bit use: ./configure --enable-shared For 64-bit use: MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp- precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 - arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./ configure --enable-shared make mkdir -p /usr/local/include mkdir -p /usr/local/bin mkdir -p /usr/local/lib mkdir -p /usr/local/man/man1 make install
  • 7. 4. - Getting and installing the GD Graphics Library extension (gd.so) This chapter will guide you through getting and installing the GD Graphics Library extension (gd.so). So let's get going: Make sure you are logged in as root. Install the GD Graphics Library extension by issuing the following commands (in oblique type). Issue them one after the other making sure you do not miss any dots or slashes. Lines wrapping without line spacing are a single command. Note: For maximum compatibility, we will be downloading the needed PHP files from Apple's Darwin Sources. mkdir -p /SourceCache cd /SourceCache curl -O http://www.opensource.apple.com/source/ apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2 tar xjf php-5.2.8.tar.bz2 cd /SourceCache/php-5.2.8/ext/gd phpize
  • 8. NOTE: The following configure command is different for 32- and 64-bit CPUs NOTE: Just in case you missed it: The following configure command is different for 32- and 64-bit CPUs For 32-bit use: ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/ local/lib --with-png-dir=/usr/X11R6 --with-freetype- dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 For 64-bit use: MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp- precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 - arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./ configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/ local/lib --with-png-dir=/usr/X11R6 --with-freetype- dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6 make make install
  • 9. The extension has now been built and installed. Next we need to make sure PHP is aware of it. To this purpose we need to add an instruction to /etc/php.ini. Apple's stock server installation does not come with a php.ini file. If you have NOT added one yourself, just issue the next command. echo extension=gd.so > /etc/php.ini If on the other hand you have already created your own /etc/ php.ini, make sure the following parameter is present and uncommented. If it isn't, add it: extension=gd.so Also, if you already had your own php.ini, make sure the extension_dir= setting is not overriding any defaults. If in doubt, comment it out or point to the directory gd.so was installed into (usually /usr/lib/php/extensions/no-debug-non-zts-20060613) Now that everything is ready, we just restart our web server so that the extension gets loaded. apachectl graceful You are now all set and should have the GD and supporting libraries installed. To verify this create a file called info.php with the following contents: <?php phpinfo(); ?> When done, place it in an accessible directory of your web- server and call it through your browser. Detailed version and configuration information will be displayed. Among all the information, you should see a section called "gd" which should state "GD Support enabled"
  • 10. 5. - Caveats Not that many. The most important caveat is that if building one library goes wrong, the rest of the succession will most likely not work either. If you have tried to install one of the libraries in the past, you may have to remove and re-install them (unless you did install them as described). If you have modified any paths and or environment variables, make sure you check them against above instructions. That's all folks. Hope this helps. Have fun, Alex ------------------------------ Doc. Version 1.1.9, 10.7.2009 Athanasios Alexandrides Lugano, Switzerland tutorials -at- topicdesk.com ------------------------------