PHP5 on Debian Stable?
Posted by simonw on Wed 28 Sep 2005 at 13:08
What is the smart way to get PHP5 on a Debian stable box?
I know I can "pin" packages from other releases by following the Debian reference.
I could snaffle the packages manually from testing, I could do my own backport, or use someone elses. I could even rebuild everything from source tar balls from the respective websites.
I'm leaning toward pinning packages, but I've never done this on anything but my own desktop box before, and I gather that "backports" was the unofficial but sensible way of doing this sort of thing before.
I figure there is no "right way" (except perhaps not using PHP5 operationally before for Etch is released?), but what is the way of least resistance?
The packages have been fine or testing code and projects, but I've not used it in production.
Another alternative could be to try ubuntu. They have php5 packages in their upcoming Breezy release.
[ Parent | Reply to this comment ]
Dotdeb packages are provided by an hosting company, and yes, they are made for production (count several thousand servers using it).
M
[ Parent | Reply to this comment ]
One easy and efficient way is to use "Dotdeb" packages.
http://www.dotdeb.org/
I used them several years on Woody (mutualized platform with many users) without any problem. Dotdeb is always up to date, especially concerning security issues.
M
[ Parent | Reply to this comment ]
deb http://people.debian.org/~dexter all sarge
deb-src http://people.debian.org/~dexter all sarge
---
kobak
[ Parent | Reply to this comment ]
But with the release of starge (current stable), the dotdeb packages support apache2.
[ Parent | Reply to this comment ]
Known issue, or do I need to doublecheck stuff?
[ Parent | Reply to this comment ]
I've used the packages from Dexter, but I found several bugs in, so now, I used the Dotdeb one, and it's allright ...
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
If so I can appreciate the flexibility of having PHP4 for in stable, and PHP5 in testing, it seems to have increased my work load as the system admin?! All the other GNU/Linux boxes run Debian stable, or will do by Christmas.
We even discussed offering some sort of virtual server hosting (we were thinking Xen or UML, but vserver might be an option), but most of our clients want us to "just make it work", rather than wanting their own server (even if I think it is very easy to manage a virtual server, since you don't have any of those hardware headaches that Linux can still bring, not everyone agrees). So if we did go with some sort of virtual server solution, we might end up maintaining N instances ourselves, so it would need some careful planning.
I had read about Dexter's packages, but not the dotdeb packages, perhaps I should have searched a little harder, but I was finding very little.
I think PHP5 adoption was quite slow, no doubt in part because it isn't 100% backwardly compatible, and also that the new features benefit big packages, and they take time to write.
But even customers who want handholding are now asking for it by name, as they are looking at products that require it.
[ Parent | Reply to this comment ]
Concerning PHP5, there's also a section on "Adoption Among Hosting Providers" and "Application Support"
---
stoffell
[ Parent | Reply to this comment ]
How can it continue to be this if you don't use Stable's packages?
This isn't intended as flamebait, I'd really like to know.
[ Parent | Reply to this comment ]
Dont forget that Debian is a great distro but ultimatly you have to make whatever OS you use work for your enviroment. Its rediculous to be say if Debian does not have a stable package dont use it, thats just not practical.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Found an article saying basically add the repositories to /etc/apt/sources.list and;
apt-get update # Of course
apt-get install libapache2-mod-php5 php5 php5-mysql
Will report back if we get any issues. Previous attempts were less specific on what to install, and were picking up stuff for the old version of Apache. Seems slicker than the "dexter" repository and possibly slightly older, and people are using it in anger. However they do update some existing Debian Sarge packages (presumably for compatibility).
The Apache2 module ousts the PHP4 one, although it seem happy to have both PHP4 and PHP5 installed locally.
I also need to migrate the existing PHP4 applications, which may prove interesting.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
-------------------------------------------------------
Since the apache2 that comes with debian proves to be a bitch when it comes to configuration
lets do this...
Reinstall apache2 and also get it to work such that it points to /var/www
DANGEROUS COMMAND SO HANDLE WITH CARE...
----------------------------------------
dpkg --purge --force-depends apache2-common
dpkg --purge --force-depends apache2
MAKE SURE YOU INSTALL OR DEPENDECIES WILL BREAK
------------------------------------------------
apt-get install apache2-common
apt-get install apache2
PHP5 SUPPORT
------------
add the below to "/etc/apt/sources.list"
deb http://people.debian.org/~dexter php5 sarge
install the necessary packages
apt-get install php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd
For a full list of PHP5 modules
apt-cache search php5.
to install php and mysql modules use the below
cd /etc/apache2/mods-enabled/
ln -s /etc/apache2/mods-available/php5.load
ln -s /etc/apache2/mods-available/php5.conf
Now start the beast....
/etc/init.d/apache2 start
now in /var/www run your first php script... Please no "Hello World!!!"
IF THERE IS SOMETHING TOO OBVIOUS OR IF THERE ARE SOME REDUNANT STEPS
PLEASE CORRECT THEM !!! DON'T COMPLAIN ;)
Thaneshshan Suntharalingam
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]