GD2 and PHP on OS X

There are tons of links to this topic, but everyone has a different approach. I have a clean os x 10.5.6 installation. I am using the version of PHP that comes with the OS.

I installed GD using FINK, it installed related packages. My question is: how do I get GD support in PHP now?

(pref no macports or marc liyanage suggestions, as this includes canceling other pear, mysql and php installations that I already did)

+3
source share
2 answers

As Nerdling points out, PHP must be compiled with the GD extension turned on, so there is no clean way to add GD2 to the version of PHP that ships with Mac OS X.

(Mac OS X 10.5.2, 10.5), PHP. PEAR MySQL, sudo .

, PHP, PHP (LoadModule php5_module libexec/apache2/libphp5.so) (/etc/apache2/) httpd. . , :

  • Terminal.app sudo ln -s /etc/apache2 /etc/httpd
    , .

  • PHP 5.2.4 Apache 2 .

  • :

    sudo cp /usr/sbin/httpd /usr/sbin/httpd-fat
    sudo lipo /usr/sbin/httpd -thin i386 -output /usr/sbin/httpd

    Apache 2 32 , PHP.

    sudo ln -s /usr/local/php5 /usr/local/apache2
    sudo ln -s /usr/lib/libexpat.dylib /usr/local/apache2/lib/libexpat.0.dylib

    .

    sudo mv /usr/bin/php /usr/bin/php_back
    sudo ln -s /usr/local/php5/bin/php /usr/bin/php

    PEAR/PHP.

  • Apache ( sudo apachectl restart).

  • Upvote;)

  • .

: http://www.entropy.ch/phpbb2/viewtopic.php?t=3074

+4

PHP GD.

, PHP:

<?php phpinfo() ?>
0

Source: https://habr.com/ru/post/1703734/


All Articles