Home › Forums › OS X Server and Client Discussion › Questions and Answers › PHP 4.x – Recompiling for GD Support
- This topic has 2 replies, 2 voices, and was last updated 22 years, 3 months ago by
Anonymous.
-
AuthorPosts
-
December 13, 2002 at 5:29 am #354874
legacyb4
ParticipantFor all of us who have been on 10.x client, many of us have probably been on the receiving end of Marc Liyanage’s precompiled PHP module that included GD support.
However, the last I checked, he mentioned that his binary doesn’t specifically support Server… have any of you gone out and tried it or recompiled for yourselves?
Thanks in advance.
December 13, 2002 at 8:04 am #354875legacyb4
ParticipantAlright, I did some tinkering around and here’s what I was able to test out.
Before going any further, I made a backup copy of the original libphp4.so file:
[b:0b8c7f4e3d]sudo cp /usr/libexec/httpd/libphp4.so libphp4.so.bak[/b:0b8c7f4e3d]
In addition, I went ahead and commented out the following from inside /etc/httpd/httpd.conf
[b#LoadModule apple_auth_module /usr/libexec/httpd/mod_auth_apple.so[/b]
as well as
[b:0b8c7f4e3d]#AddModule mod_auth_apple.c[/b:0b8c7f4e3d]
since Marc wrote that this module needed to be disabled.
Next, I downloaded the latest 4.2.3 installer from [url=http://www.entropy.ch/software/macosx/php/]Marc Liyanage’s site[/url]. This was then unzipped and moved into the /usr/libexec/httpd directory
[b:0b8c7f4e3d]curl -O http://www2.entropy.ch/download/libphp4.so.gz
gunzip libphp4.so.gz
sudo mv libphp4.so.gz /usr/libexec/httpd[/b:0b8c7f4e3d]Next, I loaded the module into Apache with:
[b:0b8c7f4e3d]sudo apxs -e -a -n php4 libexec/httpd/libphp4.so[/b:0b8c7f4e3d]
which spits back:
[b:0b8c7f4e3d][activating module `php4′ in /private/etc/httpd/httpd.conf]
cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak
cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf
rm /private/etc/httpd/httpd.conf.new[/b:0b8c7f4e3d]I didn’t run step #5 of his instructions which state:
[b:0b8c7f4e3d]echo ‘echo “AddType application/x-httpd-php .php” >> /etc/httpd/httpd.conf’ | sudo sh -s[/b:0b8c7f4e3d]
because in the Server conf file, it specifically states:
[b:0b8c7f4e3d] #### For Mac OS X Server: Do not uncomment; this is already handled by
#### Server Settings app, with directives in mime_macosxserver.conf
#
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps[/b:0b8c7f4e3d]which, if you check in the mime_macosxserver.types file, it already lists:
[b:0b8c7f4e3d]AddType application/x-httpd-php php
AddType application/x-httpd-php-source phps[/b:0b8c7f4e3d]which I assume is good enough (note the absence of the “.” though).
Restarting the webserver with the control panel and testing the ol’ phpinfo test script gives back the config page in IE:
[b:0b8c7f4e3d]
PHP Version 4.2.3System:
Darwin primavera.entropy.ch 6.1 Darwin Kernel Version 6.1: Fri Sep 6 23:24:34 PDT 2002; root:xnu/xnu-344.2.obj~2/RELEASE_PPC Power Macintosh powerpcBuild Date:
Sep 24 2002 23:15:03Configure Command:
‘./configure’ ‘–disable-cli’ ‘–with-apxs’ ‘–with-mysql’ ‘–with-pgsql’ ‘–with-gd=/usr/local’ ‘–with-png-dir=/usr/local’ ‘–with-zlib-dir=/usr’ ‘–with-jpeg-dir=/usr/local’ ‘–with-freetype-dir=/usr/local’ ‘–with-t1lib=/usr/local’ ‘–enable-trans-sid’ ‘–enable-exif’ ‘–with-xml’ ‘–enable-wddx’ ‘–with-curl=/usr/local’ ‘–with-pdflib=/usr/local’ ‘–enable-ftp’ ‘–enable-mbstring’ ‘–enable-xslt’ ‘–with-xslt-sablot=/usr/local’ ‘–with-imap=../imap-2001a’ ‘–enable-dbx’ ‘–enable-dbase’ ‘–with-mcrypt=/usr/local’ ‘–enable-sockets’ ‘–with-ldap’ ‘–with-xmlrpc’ ‘–with-iodbc’
[/b:0b8c7f4e3d]
and in particular, it specifically lists that GD support is now in.myphpAdmin runs without a hitch so I assume the update went smoothly. What I would like to know is what gets broken by disabling auth_apple_module?
Cheers.
[quote:0b8c7f4e3d=”legacyb4″]For all of us who have been on 10.x client, many of us have probably been on the receiving end of Marc Liyanage’s precompiled PHP module that included GD support.
However, the last I checked, he mentioned that his binary doesn’t specifically support Server… have any of you gone out and tried it or recompiled for yourselves?
Thanks in advance.[/quote:0b8c7f4e3d]
December 24, 2002 at 12:58 am #354915Anonymous
ParticipantFollow up note:
mod_auth_apple is a customized module of the normal mod_auth and by disabling Apple’s own to get Marc’s PHP module to run, you effectively disable the ability to use standard .htaccess files for directory protection, etc.
It turns out that the mod_auth.so is present in the expected directory and if you add the following lines in [b:7d0734b941]/etc/httpd/httpd.conf[/b:7d0734b941](I put mine right after the commented out Apple directives), you can enable functionality again.
[b:7d0734b941]LoadModule auth_module /usr/libexec/httpd/mod_auth.so[/b:7d0734b941]
and
[b:7d0734b941]AddModule mod_auth.c[/b:7d0734b941]
Running a [b:7d0734b941]sudo httpd configtest[/b:7d0734b941] indicates that nothing conflicts and the server starts and functions properly so far.
Do note that there is a duplicate entry under Section 6. ACGI Server Configuration of the following:
[b:7d0734b941]LoadModule php4_module libexec/httpd/libphp4.so[/b:7d0734b941]
if you’ve also enabled Squirrelmail.
Cheers.
[quote:7d0734b941=”legacyb4″]…commented out the following from inside /etc/httpd/httpd.conf
[b#LoadModule apple_auth_module /usr/libexec/httpd/mod_auth_apple.so[/b]
as well as
[b:7d0734b941]#AddModule mod_auth_apple.c[/b:7d0734b941]
since Marc wrote that this module needed to be disabled.
[/quote:7d0734b941][/quote] -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed