# Noob looking for PHP help

**URL:** <https://www.ruby-forum.com/t/noob-looking-for-php-help/165860>\
**Category:** NGINX\
**Created:** [April 18, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860 "2009-04-18T16:08:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 18, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/1 "2009-04-18T16:08:12Z")

</div>

i’ve been trying to wean myself off cpanel/whm and now apache for a long  
time. i’m down to just apache so it’s time to take the final step… i  
hope.

i think i have a basic understanding on how to setup nginx and mysql  
after  
reading this thread and the nginx wiki but the php stuff is bothering  
me.

I really don’t have time to baby sit the updates everyday or week so I  
just  
want to set a crontab to run yum install -y or something.

Can someone help me understand what I need to install to get php to work  
with nginx?

i got the following google style. can someone give me a better  
understanding  
of what i need and don’t need here?

yum install php-cgi php-cli php-mysql php-gd php-imap php-ldap php-odbc  
php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand  
php-magpierss  
php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout  
php-snmp  
php-soap php-tidy

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 18, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/2 "2009-04-18T16:56:42Z")

</div>

> Can someone help me understand what I need to install to get php to work  
> with nginx?

Most people install php-fpm to work with Nginx. I tried it and got  
PhpMyAdmin running, so I guess it’s a good solution.

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 18, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/3 "2009-04-18T17:07:23Z")

</div>

Hi,

> yum install php-cgi php-cli php-mysql php-gd php-imap php-ldap php-odbc  
> php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss  
> php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp  
> php-soap php-tidy

php-cgi oughta be enough (at least on Debian), the trick si to enable  
it to start on boot, but if you use update-rc.d on you script it’ll  
do. Now make sure you fiddle with /etc/nginx/nginx.conf, there’s a  
part that’s comented out about fast-cgi: configure that - pay  
attention to the port the cgi server will be lsitening on, then HUP  
nginx and give it a try.

HTH,  
Nuno MagalhÃ£es

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 18, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/4 "2009-04-18T17:33:45Z")

</div>

I keep reading that php-fpm is the best for large busy sites. Have you  
heard the same?

If so I think I have to install php and php-fpm manually but I’m not  
sure if that’s the best option because how would we keep it up to date?  
Who has time to babysit new versions and then recompile?

Any suggestions?

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 18, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/5 "2009-04-18T17:40:50Z")

</div>

On Sat, Apr 18, 2009 at 10:26 PM, AMP Admin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I keep reading that php-fpm is the best for large busy sites. Â Have you heard the same?
> 
> If so I think I have to install php and php-fpm manually but I’m not sure if that’s the best option because how would we keep it up to date? Â Who has time to babysit new versions and then recompile?
> 
> Any suggestions?

it’s not like new version of php is released every other months

there’s spawn-fcgi if you don’t like compiling php from source

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 11:19am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/6 "2009-04-19T11:19:20Z")

</div>

Ouch Jim. Lol

I see your point. I’m trying to get away from cPanel the best I can.

Ok, I’m going to compile it and give it a go!

One last thing… suggestions on what I should include when compiling  
php? Like is ’ --enable-fastcgi --enable-fpm’ all I need?

Thanks!

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 11:43am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/7 "2009-04-19T11:43:53Z")

</div>

On Sat, 2009-04-18 at 11:08 -0500, AMP Admin wrote:

> Ouch Jim. Lol
> 
> I see your point. I’m trying to get away from cPanel the best I can.
> 
> Ok, I’m going to compile it and give it a go!
> 
> One last thing… suggestions on what I should include when compiling  
> php? Like is ’ --enable-fastcgi --enable-fpm’ all I need?

You should probably check to see what options your current version of  
php is compiled with (php -i | grep “Configure Command =\>”) and make  
sure you have at least those options enabled.

Cliff

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 11:46am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/8 "2009-04-19T11:46:15Z")

</div>

First, you need to download php and the patch, then apply the patch.  
There is a link to a working patch for php 5.2.9 in the php-fpm section  
of [http://forum.nginx.org](http://forum.nginx.org). At least it works for me using both 32 and 64  
bit versions of CentOS 5.2.

I’m using my phone right now so I’m not sure, but if I recall correctly  
the file is named patch.php-fpm. Assuming it is (and change the name if  
it is something else), place it and the php tarball in /usr/local/src.  
Unpack the php tarball and you should have a directory called php-5.2.9.

To apply the patch run:

#cat patch.php-fpm | patch -d php-5.2.9 -p1

I use the following configuration options for 32 bit CentOS 5.2:

‘–enable-fastcgi’ ‘–enable-fpm’ ‘–enable-force-cgi-redirect’  
‘–with-mcrypt’ ‘–with-zlib’ ‘–enable-mbstring’ ‘–with-openssl’  
‘–with-mysql’ ‘–with-mysqli’ ‘–with-mysql-sock’ ‘–with-gd’  
‘–enable-gd-native-ttf’ ‘–with-bz2’ ‘–with-curl’  
‘–with-freetype-dir=/usr’ ‘–with-jpeg-dir=/usr’ ‘–with-pspell’  
‘–with-sqlite’ ‘–enable-pdo’ ‘–enable-reflection’ ‘–with-gettext’  
‘–enable-soap’ ‘–enable-dom’ ‘–with-png-dir’ ‘–with-mhash’  
‘–with-mcrypt’

You may not need all of them.

Jim

Sent from my Verizon Wireless BlackBerry

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 12:12pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/9 "2009-04-19T12:12:00Z")

</div>

Jim you’re a gem. 🙂

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/10 "2009-04-19T18:36:18Z")

</div>

ÐÐ° Saturday 18 April 2009 19:02:19 AMP Admin Ð½Ð°Ð¿Ð¸ÑÐ°:

> To apply the patch run:
> 
> #cat patch.php-fpm | patch -d php-5.2.9 -p1

you don’t really need cat here:

patch -d php-5.2.9 -p1 \< patch.php-fpm

> ‘–with-mcrypt’  
> You should also use --prefix=/usr/local/php-fpm-5.2.9 or something else,  
> just  
> to have it in a separate directory, otherwise you mess up your system

Momchil

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/11 "2009-04-19T19:29:34Z")

</div>

## Momchil I. Wrote:

> ÐÐ° Saturday 18 April 2009 19:02:19 AMP Admin  
> Ð½Ð°Ð¿Ð¸ÑÐ°:
> 
> > To apply the patch run:
> > 
> > #cat patch.php-fpm | patch -d php-5.2.9 -p1
> 
> you don’t really need cat here:
> 
> patch -d php-5.2.9 -p1 \< patch.php-fpm

I believe the result is the same.

Correct me if I am wrong.

> ‘–with-mysql-sock’ ‘–with-gd’  
> You should also use  
> –prefix=/usr/local/php-fpm-5.2.9 or something  
> else, just  
> to have it in a separate directory, otherwise you  
> mess up your system

I specifically stated the OS for which these instructions were meant  
(CentOS 5.2 - 32 bit). Following them to the letter, php and php-cgi  
will be installed in /usr/local/bin/ and php-fpm in /usr/local/sbin/.  
php-fpm.conf will be in /usr/local/etc/. php.ini will need to be in  
/usr/local/lib/.

In a stock CentOS php is in /usr/bin/ and php.ini in /etc/. I have done  
it this way now in dozens of servers and it has not “messed up” any  
systems. I use different options in 64 bit CenOS but they amount to the  
same basic thing.

> Momchil

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,1157,1180#msg-1180](http://forum.nginx.org/read.php?2,1157,1180#msg-1180)

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 12:22pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/12 "2009-04-19T12:22:32Z")

</div>

This is a new QA box before we start moving production so there’s no php  
yet. 🙂

Thanks for your help too, Cliff!

I’m messing with it now so I’m sure you’ll see more messages from me  
soon.  
haha

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 9:14am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/13 "2009-04-20T09:14:42Z")

</div>

## Momchil I. Wrote:

> > > Ð½Ð°Ð¿Ð¸ÑÐ°:
> 
> you
> 
> > /usr/local/lib/.  
> > directory is that you can delete it  
> > be left (executables, libs, headers, etc…). At  
> > Moreover on different systems  
> > stated on [1]: "CentOS is an Enterprise-class
> 
> But at the end, you ca do with your systems what  
> you want 🙂 it’s the freedom  
> that Unix-like systems give you!
> 
> 1: [http://www.centos.org/](http://www.centos.org/)

It’s pointless to carry out this discussion. Everything you say is  
“technically” correct. However, nothing I have said is “technically”  
wrong.

We have an expression in English that goes “There is more than one way  
to skin a cat”. There is probably something similar in your language.

I will leave this discussion with the following:

I do know the difference between a distribution and an operating system.  
I could have been clearer in my choice of terms. So could the people who  
created the CentOS project. After all, looking at the link that you  
provided, a page that I have visited many times, it occurs to me that  
you left out the words at the VERY top of the page, ones that occur  
before the section that you quoted. Perhaps this was an oversight on  
your part?

“CentOS:  
The Community ENTerprise Operating System”

Seems that they are as confused as I am… 🙂

> Momchil

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,1157,1185#msg-1185](http://forum.nginx.org/read.php?2,1157,1185#msg-1185)

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 19, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/14 "2009-04-19T23:12:53Z")

</div>

ÐÐ° Sunday 19 April 2009 02:19:03 Jim O. Ð½Ð°Ð¿Ð¸ÑÐ°:

> > you don’t really need cat here:  
> > ^^^
> > 
> > patch -d php-5.2.9 -p1 \< patch.php-fpm
> 
> I believe the result is the same.
> 
> Correct me if I am wrong.

yes it is the same, but that is not the point, see above 🙂

> /usr/local/lib/.
> 
> In a stock CentOS php is in /usr/bin/ and php.ini in /etc/. I have done it  
> this way now in dozens of servers and it has not “messed up” any systems. I  
> use different options in 64 bit CenOS but they amount to the same basic  
> thing.

The advantage of having php in a separate directory is that you can  
delete it  
before installing a new version. Instaling everything from source  
in /usr/local or /usr or wherever leaves you no chance for  
deinstallation,  
because you don’t know what files were installed and where. When you are  
going to upgrade your php installation, the new one will overwrite some  
files  
(tha files that it installs) but some files from the old installation  
might  
be left (executables, libs, headers, etc…). At this point your system  
is  
already messed up and might later need a new installation! Therefore on  
most  
systems there are facilities called package/port managers that help you  
safely install and deinstall stuff without leaving any remains. Remains  
might  
later break other applications that you want to install. It’s a general  
practice for maintaining your system clean. Moreover on different  
systems  
stuffs goes in different places and in new app versions default paths  
might  
change, therefore if you want to have a maintainable system you must  
always  
specify a prefix directory when installing from source.

It seems that you need to inform yourself better:

- CentOS is not an OS, it is a GNU/Linux distribution, which is  
explicitly  
stated on [1]: “CentOS is an Enterprise-class Linux Distribution derived  
from  
sources freely provided to the public by a prominent North American  
Enterprise Linux vendor.”
- there is no stock php, but php that you might install via a package,  
moreover it is common practice from GNU/Linux distros to put apps in  
/usr and  
confs in /etc

But at the end, you ca do with your systems what you want 🙂 it’s the  
freedom  
that Unix-like systems give you!

1: [http://www.centos.org/](http://www.centos.org/)

Momchil

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 10:12am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/15 "2009-04-20T10:12:04Z")

</div>

I don’t really know what --prefix=/usr/local/php-fpm-5.2.9 accomplishes.

Will that move the default locating of php.ini or anything?

What’s the best practice here. Right now this is on a QA box but will  
eventually move into production and it’s a very busy site so maintenance  
times have to be minimal when upgrading or making future changes.

I ended up going with the following because we want only what’s needed  
for our webapp but it’s not too late to change it.

./configure --disable-all --enable-fastcgi --enable-fpm --with-mysqli  
–with-gd --with-mysql --with-freetype-dir=/usr/include/freetype2  
–enable-shmop --enable-sysvsem --enable-sysvshm --enable-libxml  
–with-pcre-regex --enable-spl --enable-session --enable-xml  
–enable-mbstring --with-mcrypt --enable-force-cgi-redirect

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 10:58am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/16 "2009-04-20T10:58:25Z")

</div>

On Sun, Apr 19, 2009 at 10:00 PM, AMP Admin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I don’t really know what --prefix=/usr/local/php-fpm-5.2.9 accomplishes.
> 
> Will that move the default locating of php.ini or anything?

it’ll allow you to remove and update php-fpm with ease. The location  
is relative to prefix, iirc

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 11:30am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/17 "2009-04-20T11:30:08Z")

</div>

So is the following what would change?

The default is:  
PHP SAPI module: cgi  
PHP CGI binary: /usr/local/bin/  
FPM config: /usr/local/etc/php-fpm.conf  
init.d script: /usr/local/sbin/php-fpm  
PHP CLI binary: /usr/local/bin/  
PHP CLI man page: /usr/local/man/man1/  
build environment: /usr/local/lib/php/build/  
header files: /usr/local/include/php/  
helper programs: /usr/local/bin/  
PHP /usr/local/lib/php/  
PHP.INI /usr/local/lib/php.ini

If we add --prefix=/usr/local/lib/php-fpm-5.2.9 the new installation  
will look like:  
PHP SAPI module: cgi  
PHP CGI binary: /usr/local/bin/  
FPM config: /usr/local/etc/php-fpm.conf  
init.d script: /usr/local/sbin/php-fpm  
PHP CLI binary: /usr/local/bin/  
PHP CLI man page: /usr/local/man/man1/  
build environment: /usr/local/lib/php-fpm-5.2.9/build/  
header files: /usr/local/include/php/  
helper programs: /usr/local/bin/  
PHP /usr/local/lib/php-fpm-5.2.9/  
PHP.INI /usr/local/lib/php.ini

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/18 "2009-04-20T13:19:09Z")

</div>

On Sun, Apr 19, 2009 at 11:22 PM, AMP Admin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> header files: Â Â Â Â Â /usr/local/include/php/  
> PHP CLI man page: Â Â Â /usr/local/man/man1/  
> build environment: Â Â /usr/local/lib/php-fpm-5.2.9/build/  
> header files: Â Â Â Â Â /usr/local/include/php/  
> helper programs: Â Â Â /usr/local/bin/  
> PHP Â Â Â Â Â Â Â Â Â Â Â Â Â Â /usr/local/lib/php-fpm-5.2.9/  
> PHP.INI Â Â Â Â Â Â Â Â /usr/local/lib/php.ini

prefix will replace all /usr/local to $prefix

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 11:57am UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/19 "2009-04-20T11:57:41Z")

</div>

ÐÐ° Sunday 19 April 2009 18:22:43 AMP Admin Ð½Ð°Ð¿Ð¸ÑÐ°:

> header files: /usr/local/include/php/  
> PHP CLI man page: /usr/local/man/man1/  
> To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> Subject: Re: Noob looking for PHP help
> 
> On Sun, Apr 19, 2009 at 10:00 PM, AMP Admin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I don’t really know what --prefix=/usr/local/php-fpm-5.2.9 accomplishes.
> > 
> > Will that move the default locating of php.ini or anything?
> 
> it’ll allow you to remove and update php-fpm with ease. The location  
> is relative to prefix, iirc

You can execute “./configure --help” to see what options are available  
and  
what they do. There is a section concerning paths where different parts  
of  
the program are installed:

Directory and file names:  
–prefix=PREFIX install architecture-independent files in  
PREFIX  
[/usr/local]  
–exec-prefix=EPREFIX install architecture-dependent files in  
EPREFIX  
[same as prefix]  
–bindir=DIR user executables in DIR [EPREFIX/bin]  
–sbindir=DIR system admin executables in DIR [EPREFIX/sbin]  
–libexecdir=DIR program executables in DIR [EPREFIX/libexec]  
–datadir=DIR read-only architecture-independent data in DIR  
[PREFIX/share]  
–sysconfdir=DIR read-only single-machine data in DIR  
[PREFIX/etc]  
–sharedstatedir=DIR modifiable architecture-independent data in  
DIR  
[PREFIX/com]  
–localstatedir=DIR modifiable single-machine data in DIR  
[PREFIX/var]  
–libdir=DIR object code libraries in DIR [EPREFIX/lib]  
–includedir=DIR C header files in DIR [PREFIX/include]  
–oldincludedir=DIR C header files for non-gcc in DIR  
[/usr/include]  
–infodir=DIR info documentation in DIR [PREFIX/info]  
–mandir=DIR man documentation in DIR [PREFIX/man]  
–srcdir=DIR find the sources in DIR [configure dir or ..]  
–program-prefix=PREFIX prepend PREFIX to installed program names  
–program-suffix=SUFFIX append SUFFIX to installed program names  
–program-transform-name=PROGRAM  
run sed PROGRAM on installed program names

If you are using --prefix=/foo, all the files that your software  
installs will  
be installed under /foo, which in most cases gives you the following  
structure /foo/bin /foo/etc /foo/lib …, so your php.ini  
will go  
in /foo/lib/ if you don’t change that with some of the options above.  
You can  
also see the defaults (prefix=/usr/local for the example above). You  
must  
also consider that these defaults might change with new versions, so you  
must  
check what is changed in every new version or be on the safe side  
specifying  
the options yourself and have it allways installed where and as you  
wish.

This is common for all software that comes with some kind of “configure”  
script.

Momchil

---

<div class="post-metadata">

**Author:** ![AMP\_Admin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3ab097/32.png) [@AMP\_Admin](https://www.ruby-forum.com/u/AMP_Admin)\
**Post date:** [April 20, 2009, 3:05pm UTC](https://www.ruby-forum.com/t/noob-looking-for-php-help/165860/20 "2009-04-20T15:05:51Z")

</div>

I got it up and running. Our QA box is now cPanel/WHM & Apache free!  
We’ll be testing this week and hopefully be moving to production soon.

Thanks everyone for your help!
