I installed my own Apache 2.2.4 and php 5.2.3 side by side with the system install. I would like to enable libgd. How can I do that? According to the php website, libgd comes bundled with php 5.2.3. I get an error when I call one of the libgd functions in a php script, so I assume libgd is not enabled:
Fatal error: Call to undefined function imagecreate() in /Library/Apache2/htdocs/mypages/myimage.php on line 2
;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).
So I renamed that to php.ini and moved it to /Library/PHP5/lib, and at the top of the file under the
section I added:
>
```php
;Added by me to enable php libgd:
extension=gd.so
I saved the file, then restarted apache, but I still get the same error. phpinfo now shows:
> Configuration File (php.ini) Path /Library/PHP5/lib
Loaded Configuration File /Library/PHP5/lib/php.ini
So php is reading the file.