# PHP Installation Woes!



## jdashberry (Mar 21, 2004)

I am a web developer trying to get into PHP. Been trying to install into Mac OS X 10.2.8 using the guide at:

http://developer.apple.com/internet/opensource/php.html

I have downloaded php-4.3.4.tar.gz from the PHP site, and uncrompressed following the comands:

gunzip php-4.3.4.tar.gz
tar xf php-4.3.4.tar

This worked fine. Went into the php-4.3.4 folder and ran the following command:

./configure --with-apxs

I get the following error message:

loading cache ./config.cache
checking host system type... powerpc-apple-darwin6.8
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

Also for some reason my admin password on MacOS X will not let me log in as su.

Well whilst I am sure the Apple Developer guide is great if all things go right, it's sod all good when you get errors cause there's no help anywhere!

Any help would be much appreciated.


----------



## dlloyd (Mar 21, 2004)

Well, first of all, that document is so complicated, it's not even funny.
If you want a nice simple Mac OS X installer package, look here: http://www.entropy.ch/software/macosx/php/

And your admin account's password will not work because 'su' is not an administrator action. It is a root action. Therefore, you need to use the root user's password. You probably don't have the root user activated yet, but you can do that via NetInfo Manager in the Utilities folder. Just go to the Security menu and select Enable Root User. The password you specify is now active for the 'su' command, and also allows you to log in via the login area (under the Other 'account' if it's set up to show a list). As a side note, 'sudo' can be used for *most* things you would use 'su' for. 'Sudo' IS an administer action, so you don't need the root password. There are places where it won't work, though, so I would still use 'su' if that's what the instructions say.


----------



## mdnky (Mar 21, 2004)

Or here:  http://www.serverlogistics.com/software.php


----------



## uoba (Mar 21, 2004)

As the other two state, your better going with the package installs. FYI anyhow, the errors you got where related to the installation. You don't have the GCC compiler installed (and CC obviously) on your machine. YOu could easily find these and install them in a similar way to the PHP you where installing. But, there's no guarantee that they'll require something else to install those. And once you've done all this (successfully), you've got to install PHP and hope it works! Best stick to the package installs 

Doing it via the command-line is a superb way to learn Unix (*nix) but can be frustrating and time consuming initially.

The first thing you should do is bookmark Marc Liyanage's site in dlloyd's post above... fantastic comprehensive resource for OS X-based PHP and MySQL.


----------



## Cymru (Apr 18, 2004)

You haven't got the gcc compiler installed. If you install developer tools gcc will install with that and everything will be ok. Also, if developer tools is installed you could learn some programming, yeyyyyy


----------



## clem_c_rock (Apr 28, 2004)

Hello,

      I have successfully installed php and mysql on this machine.   When I log on via the command line to modify the php.ini I can modify it
successfully but when I go to view my phpinfo() script which is at: http://localhost/test.php it shows none of my modifications.    For instance, if I set the doc_root to: /usr/local and then view it in the phpinfo() script, it doesn't show the changes.

Am I missing something?

Any ideas?

Thanx,
Clem C


----------



## btoth (May 1, 2004)

clem_c_rock said:
			
		

> Hello,
> 
> I have successfully installed php and mysql on this machine.   When I log on via the command line to modify the php.ini I can modify it
> successfully but when I go to view my phpinfo() script which is at: http://localhost/test.php it shows none of my modifications.    For instance, if I set the doc_root to: /usr/local and then view it in the phpinfo() script, it doesn't show the changes.
> ...



Check in your phpinfo() results and see which php.ini it's reading the information from.  Check if that's the same one that you made your changes to.


----------



## dlloyd (May 1, 2004)

Also, don't you have to restart the PHP server after changing the php.ini file before the changes take effect?


----------



## clem_c_rock (May 3, 2004)

dlloyd said:
			
		

> Also, don't you have to restart the PHP server after changing the php.ini file before the changes take effect?


----------

