Noob looking for PHP help

Momchil Ivanov slogster at gmail.com
Sun Apr 19 16:29:53 MSD 2009


На Sunday 19 April 2009 02:19:03 Jim Ohlstein написа:
> Momchil Ivanov 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.

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

> > 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.

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/


Momchil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://nginx.org/pipermail/nginx/attachments/20090419/5bff292b/attachment.pgp>


More information about the nginx mailing list