Women in Technology

Hear us Roar



Article:
  PHP 4.3 and Mac OS X
Subject:   These instructions don't seem to work
Date:   2003-02-16 23:28:52
From:   anonymous2
Did anyone get these instructions, or anything like them, to actually work .... what I see here is lots of questions, and few - if any - answers. It can't find zlib, but the instructions say its required (its not on fink either) and also even if you install gd-bin from fink the configure can't find it... these kind of questions are asked below, but with no answers.


it seems better to go to www.entropy.ch/software/macosx/php and get it from there, it seems to have to most usual set of extensions (including GD - which is the main reason I want to upgrade).


- Mitra

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • These instructions don't - But I got it
    2003-03-25 12:18:45  anonymous2 [View]

    I had the same problem.

    So I read an article on PHPmac.com, but before re-doing everything I just tried this:

    If you have not used PHP on your Mac before:
    Open the Apache Configuration file (/etc/httpd/httpd.conf) in your favourite Text Editor (In these examples I have used Pico)
    % sudo pico /etc/httpd/httpd.conf

    Now add these lines to the very bottom of the file:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    Now save and quit by pressing Control-O, Overwrite the old file (hit Enter) and then press Control-X to exit Pico.

    Restart Apache:
    % sudo apachectl restart

    If you have any questions etc. please check below, or email support@phpmac.com

    -James


    That worked for me.

    For the complete article goto http://www.phpmac.com/articles/view.php?id=117
  • These instructions don't seem to work
    2003-02-28 21:06:42  tychay [View]

    Adam is not quite right when he says "without zlib, MySQL and other programs won't run", without zlib, PHP 4.3 MySQL can't take advantage of compression (a feature that is very rarely used and turned off by default in phpMyAdmin).

    Also, the correct line to enable it for MySQL "and other programs" is
    --with-zlib-dir=/usr

    I'm not too sure why it can't find zlib. zlib comes by default with Mac OS X and developer tools should install the proper headers:

    bash-2.05a$ locate libz
    ...some other stuff...
    /usr/lib/libz.1.1.3.dylib
    /usr/lib/libz.1.dylib
    /usr/lib/libz.dylib

    Why not try '--with-zlib=/usr' which should be redundant unless you've f-d up your library and include paths.

    If a header file is missing, then check to see of /usr/include/zlib.h is on your system. If not, install Developer Tools.

    Installing gd-bin from fink doesn't do squat because it's not the library or the headers. Besides, you should be using gd2, not gd. Try installing "gd2", "gd2-bin", and "gd2-shlibs" (why there is no "gd-devel" I don't know). Better yet, build just the libpng3*, libjpeg*, freetype2* packages and then use the version of gd2 that came with PHP 4.3 (it has better support for alpha channels as well as can load GIFs).

    As for why compile it yourself. I see five reasons
    1) Mark installed something that you don't need. Because lack of dynamic loading of extensions in Mac OS X, your binary is bigger than it needs to be.
    2) Mark didn't install something you need (for the especially masochistic, try building php-gtk).
    3) Mark doesn't have the latest version or there is a patch in CVS for a bug.
    4) You want to use the PHP command line interface or need PEAR.
    5) You want to install PHP 5
    In the future there will be"
    6) You want to compile PHP5 with dynamic loading of extensions.

    If those aren't an issue, use a precompiled binary froma trusted source. That's the mac way, anyway.

    Take care,

    terry chay
    tychay at php dot net