Configuring Php 5.2.3 With Gd Support For Mac

So, you need GD for your killer PHP web app, and you’re running Mac OS X 10.5? A quick look shows that GD doesn’t ship with Leopard. No worries. It’s pretty simple to install.
Codex loosely only mentions PHP version in server requirements, however PHP can be configured in pretty wide range of excluding/including different parts. What are extensions/libraries that: are. Part 1: macOS 10.15 Catalina Web Development Environment Developing web applications on macOS is a real joy. There are plenty of options for setting up your development environments, including the ever-popular MAMP Pro that provides a nice UI on top of Apache, PHP and MySQL. However, there are times when MAMP Pro has slow downs, or out of date versions, or is simply behaving badly due to its.
There are a few core requirements you must take care of before getting started. Choose to ignore these, and you’re doomed to failure!
- Always back up your system before a command-line activity such as this.
- Update your system to Mac OS 10.5.5. I could detail how to do this with prior versions, but I don’t have time.
- Install the latest version of Apple’s Developer Tools: XCode 3.0+ for 10.5. XCode is available on your OS X DVD, or from Apple as a free download.
- X11 must be installed (it is by default), as well as X11 SDK (from the Developer Tools in step 3).
DISCLAIMER: The author claims no responsibility for any damage that may occur from the use of any information found here or found on links followed from this document. If you choose to use this information, you do so at your own risk.
Get Started
To begin, open Terminal (Macintosh HD -> Applications -> Utilities ->Terminal) and invoke the superuser do command. You will need to enter your administrator password. Careful – you can now utterly destroy your machine:
sudo bash
You will need to enter your administrator password.
Determine Your Architecture
Mac OS X Leopard comes in two flavors, depending on the capabilities of your CPU — 32-bit or 64-bit. YOU MUST COMPILE FOR THE PROPER ARCHITECTURE.
Which architecture do you have? Easy enough using Terminal or the GUI. For Terminal, issue this command:
/usr/sbin/system_profiler SPHardwareDataType grep 'Processor Name:'
Or, in the GUI, choose the Apple Menu, select “About This Mac”:
Match your CPU to the table below:
Model | 32-bit | 64-bit |
---|---|---|
PowerPC G3 | X | |
PowerPC G4 | X | |
PowerPC G5 | X | |
Intel Core Duo | X | |
Intel Core2 Duo | X | |
Intel Xeon | X |
Make a note of whether your CPU is 32-bit or 64-bit, because you will be compiling software using vastly different settings depending on your CPU.
Install libjpeg
The free image compression library, libjpeg, is required by GD.
First, let’s create a directory for storing the source files we’ll be downloading:
mkdir -p /SourceCache
cd /SourceCache
Download the source file and unpack it:
curl -O http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar xzpf jpegsrc.v6b.tar.gz
cd /SourceCache/jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
For 32-bit only, use the following command:
./configure --enable-shared
64-bit architecture uses this command instead:
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
Continue on for both architectures:
make clean
make
mkdir -p /usr/local/include
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/man/man1
make install
You now have compiled libjpeg!
Download and compile the GD graphics library extension (gd.so)
We will be using Apple’s Darwin sources for PHP, which interestingly contain the GD source code. Why Apple doesn’t ship with gd.so already compiled is known only to the maker.
mkdir -p /SourceCache
cd /SourceCache
curl -O http://www.opensource.apple.com/darwinsource/10.5.5/apache_mod_php-44.1/php-5.2.6.tar.bz2
tar xjf php-5.2.6.tar.bz2
cd /SourceCache/php-5.2.6/ext/gd
phpize
Again: YOU MUST COMPILE FOR THE PROPER ARCHITECTURE.
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
sudo ln -s /usr/X11/lib/libpng.3.dylib /usr/X11/lib/libpng.3.0.0.dylib
Likewise, if your error refers to libpng12.0.##.#, you should create a symbolic link to libpng12.0.dylib.
Then, recompile GD.
Continue on for both architectures:
make clean
make

make install
Add gd.so to PHP
PHP needs to be configured to load the gd.so
shared object extension that you just compiled. You will tell PHP to load it by adding a directive in your /etc/php.ini
file.
First, let me give you a couple of pointers about this file. It *probably* exists on your machine. If not, you should just create it as a simple text file. Directives in the file can be commented out by placing a semi-colon in front of the directive.
Open the /etc/php.ini
file in a text editor, and search for the section on Dynamic Extensions. Mine looks like this:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
Simply add the following line, which loads your newly compiled GD shared object:
extension=gd.so
Search your /etc/php.ini
file for the extension_dir=
directive, and either comment it out (by inserting a semi-colon in front of it) or ensure it is pointing to the directory where your new GD shared object is stored:
extension_dir=/usr/lib/php/extensions/no-debug-non-zts-20060613
Confirm gd.so is loading
Restart Apache to force the reloading of the PHP configuration file.
apachectl graceful
Confirm that PHP is loading the gd.so
extension by running the following command, and looking for the line “GD Support => enabled” in the resulting output:
/usr/bin/php -i grep -i gd
Alternatively, you can create a file called phpinfo.php
in your web server document directory (/Library/WebServer/Documents/
) with the following contents:
2 player fighting games pc. <?php
phpinfo();
?>
Point your web browser to http://localhost/phpinfo.php, and you should see a GD block verifying installation, as shown below:
*Latest updates on 18th Oct 2016
It supports both Smart Phonetic & Smart Wijesekara keyboard layouts for Sinhala as well as Word Predictions & Voice Typing for both Sinhala & English languages. Helakuru Apk Download for PC Full Version.Download Helakuru Apk for PC,Laptop,Windows Latest Version.Helakuru (හෙළකුරු) is Sri Lanka’s No.1 App with over 4 Million Users recognized as the Most Popular App of Sri Lanka by NYDB Awards 2016. Helakuru has bagged many national & international awards including mBillionth South Asian Award 2014, e-Swabhimani National Award 2013, NBQSA National Award in 2014 & Sri Lanka’s Best Local Language Product Award in 2014.Helakuru empowers millions of Sri Lankans to type in Sinhala natively from their mobiles. Sinhala typing keyboard free download.
Note: This guide is for those who have FULL access to the server when system configuration can be changed. If you are using shared hosting, please contact your hosting provider.
Step 1: Check whether cURL extension is installed/enabled or not
Within the Joomla administration area, you can view “php.ini” configurations by navigating to Site > System Information and selecting the tab “PHP Information”.
At this point, search for the keyword “curl” and if it does not appear on the page, the extension might not be installed/enabled. Please proceed to the next step.
P.S: In this step, you are also able to locate where the “php.ini” configuration file is. Search for “Loaded Configuration File” and you might end up with something like:
Step 2: Ensure cURL extension for PHP is installed
On Windows, people often use WAMP (Windows, Apache, MySQL, PHP) bundles for local development. Fortunately, the cURL extension is pre-installed with those bundles, so you can proceed to Step 3.
On Linux, it depends on which Linux distro the server is installed with, so you might need to run the appropriate command.
For example, with Ubuntu/Debian server, you need to run this command:
After that, restart the Apache server:
After the Apache server has restarted, the extension should be enabled by default. You might use the method at Step 1 to check, and if not, please proceed to the next step.
Step 3: Enable cURL extension in “php.ini” file
Load the “php.ini” file located in Step 1 into your favourite text editor (if you are using Windows, we suggest Notepad++), then search for “php_curl”. At this point, you need to uncomment the line by removing the semicolon at the beginning of the line, as below.
After saving the file, restart the Apache server. Double-check the Joomla “PHP Information” section again to see if the extension is enabled.
If you see something like that, then congratulations, you have successfully enabled PHP cURL!
NOTE:
Enabling cURL for your Joomla website is very important. Because all Joomla extensionsfrom JoomlaShine require enabling cURL to operate functionally.