Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > PHP on a intel imac

PHP on a intel imac
Thread Tools
Mediaman_12
Professional Poster
Join Date: Jan 2001
Location: Manchester,UK
Status: Offline
Reply With Quote
Mar 26, 2006, 12:14 PM
 
I am doing some Web dev and I could do with PHP installing on to the webserver on my iMac.
But I run in to problems whatever way I try to install it.
first I tried Mark Liyanage's pre made installer that uses the OSX installer app, this gets to the end then fails (I suspect it's because it's built for PPC not intel).
I then try this method from Apples ADC site. I download the PHP source and get to the ./configure --with-apxs part, this fails with the following message in the terminal
checking for C compiler default output file name... configure: error: C compiler cannot create executables
. Maybe the source code is a 'windows' version?
So then I find Get DarwinPorts which lists a Darwin version of PHP. First you have to install an app to run there installers, there is no binary for Intel Mac's so yo have to get the source and build your own. I get the source extract it and again get to the ./configure && make && sudo make install bit, again it fails, the terminal has a bit more to say this time
checking build system type... i686-apple-darwin8.5.1
checking host system type... i686-apple-darwin8.5.1
checking target system type... i686-apple-darwin8.5.1
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
and I can't find config.log to see what info that contains.
I have run a .PHP file with
<?php
phpinfo();
?>
in it but it just gets displayed as text in Safari, even though 'Personal Web Sharing' is on in the control panel, so there is no version of PHP currently running.
     
Mediaman_12  (op)
Professional Poster
Join Date: Jan 2001
Location: Manchester,UK
Status: Offline
Reply With Quote
Mar 26, 2006, 12:35 PM
 
I hadn't Edited the HTTP.conf file, I will live with the older version of PHP on Tiger.
     
Mithras
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
Mar 26, 2006, 02:51 PM
 
I've hit that problem compiling something else on my MBP. I worked around it, but maybe try downloading the latest autoconf script?
     
york28
Senior User
Join Date: Mar 2002
Location: Chicago, IL
Status: Offline
Reply With Quote
Apr 22, 2006, 12:47 AM
 
I recently had to deal with this. Here's what you do:
1. Download and install Fink source code, and install normally. The Installers are not yet Universal.
2. Following the instructions on this page, install the required libraries through Fink. If they aren't available, or won't build, make a note and move on.
3. Download the PHP source code
4. Install using the tutorial above. You will need to modify the command passed to configure slightly to account for all the libraries being in /sw, and also to remove the ones that reference libraries you don't have (from #2)

This worked fine on an Intel iMac, using PHP 5.12.

Good luck.

PS. I couldn't get Darwinports to build, but you could also go that route.

Also, make sure Xcode was installed OK.
We need less Democrats and Republicans, and more people that think for themselves.

infinite expanse
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Apr 22, 2006, 10:02 AM
 
I suggest using DarwinPorts. It will automate this install process for you, and assist you with upgrading the software once installed.

Software like this standard fare on Linux/Unix distributions such as Fedora/Redhat/Debian/Gentoo/FreeBSD, etc.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:55 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,