Php5 / Mysql 4.1.9 Howto

I tried to make this easy but I only did it for CentOS at this time due to my busy schedule. I’ll accept RPMs for other platforms as well if people would like to submit them.

!! WARNING !! WARNING !!

THIS IS DEEMED EXPERIMENTAL AND WILL NOT BE SUPPORTED DIRECTLY BY US. IT MAY BREAK YOUR BOX, IT MAY WORK FINE.

We have it running on a few internal servers and it has been fine, but you have been forewarned.

To upgrade your iworx-CP boxes to use php5 and mysql 4.1 you can add this to your /etc/yum.conf


[interworx-php5-mysql4.1]
name=InterWorx-CP - CentOS - PHP 5.X / MYSQL 4.1.X
baseurl=http://updates.interworx.info/iworx/RPMS/cos3x/php5-mysql4.1/$basearch
#gpgcheck=1

Then just ‘yum update’ and restart httpd

NOTE: THE ABOVE WILL ONLY WORK FOR CENTOS BOXES.

If you’d like to get your Fedora/RedHat/WhiteBox boxes working just compile and install the following RPMS in the following order:

http://updates.interworx.info/iworx/SRPMS/experimental/mysql-shared-compat-4.1.9-100.iworx.src.rpm
http://updates.interworx.info/iworx/SRPMS/experimental/mysql-4.1.9-100.iworx.src.rpm
http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.3-100.iworx.src.rpm

If you’d like to submit binaries of the other platforms just PM me.

Chris

To upgrade your iworx-CP boxes to use php5 and mysql 4.1 you can add this to your /etc/yum.conf

Does it means there will be only php5 / mysql 4.1 on the box, or does it mean there will be both php4/php5 and mysql 4.0x/4.1 working together ?

Thanks
Pascal

This is for php5/mysql4.1 only, any previous version(s) for php and/or mysql will be upgraded and not exist on the box anymore.

What’s the latest (easiest) way to install PHP5 now on an Iworx box?

We’ve had some other recent questions about this and I’ll post a whitepaper on how it’s most easily done. There have been some nonsense rumors that iworx-cp doesn’t “support” PHP5 and it’s partly our fault for lack of info on the subject.

Chris

Thanks Chris, I want to setup my test box with PHP5 so I can start internally testing my PHP scripts on the new engine.

Just a bump to see if there’s any news on this front. I have a new box that should be coming online today or tomorrow and I’d like to set it up with PHP 5.0.4 and MySQL 4.1.12 if possible. :slight_smile:

100% possible. If you’d like to ‘donate’ the use of your server for the setup I can do the howto on it Paul. I’ve just been short on time and we don’t have any free boxes with a fresh iworx-cp on them.

I can do another quickie howto like I did for the jailed shell if that’s ok.

Chris

A quickie howto would be fine, but I can donate my new server for a bit (when Sago sends me the information) if you’d like to do it that way.

Chris,

I have a CentOS fresh install of InterWorx on my ‘now working’ test box you could set it up on as well.

I also have a fresh install of RH9 on the same box, but haven’t install InterWorx on that as of yet (at least I don’t think I did). But I could give you access to that as well.

Let me know

If one or both of you could provide your login info I can get going on this howto. Feel free to either open a ticket or drop your root info here: https://secure.interworx.info/iworx-cp/support/rootdrop.php

Chris

Dropped the info for you.

Do you know if PHP5 is still not 100% full compatible with PHP4 ?

Also, did some of you tried to install PHP5 as CGI with PHP4 on an existing Interworx Box ?

If yes, a quick howto could help a lot of people (and me first)

Thanks

Pascal

It isn’t, and never will be Pascal. It was not designed for full backwards compatibility.

Chris

Indeed.

In fact I’m thinking of installing php5 as CGI and use the apache module suPHP, maybe try to use fastcgi.

The idea behind this is to try to offer two types of config to my customers :
php 4 as module = quicker but with safemod on and openbasedir
php 4 & php 5 as CGI with suPHP = less quick but more secure. So without safe mod and open base dir

Before doing this, I’d like to only install PHP5 as cgi with suPHP, just to try and to allow some customers to tests PHP5

All your comments about this idea are really welcome. If you already done it, a quick howto may help. Also I’m open to hear the bad and good thinks about this idea

Maybe fastCgi would be the best solution, but I really don’t know it… I’ve already tried suPHP and I find it very usefull, it’s like suexec

Thanks for your comments / howto / points of view / discussion about this

Pascal

Sounds nice. I am planning on putting PHP 5 on our box in the background soon. I have it working on my non-IWorx box at home. PHP4 is installed as normal as an Apache module and PHP5 is located in the cgi-bin. If I have PHP5 files in a directory I can add these lines to a .htaccess file (or for IWorx, .htaccess or /etc/httpd/conf.d/domain.tld.conf for domain-wide changes)

AddType application/x-httpd-php-cgi .php
Action application/x-httpd-php-cgi /cgi-bin/php5

I don’t know how well this works because my PHP5 code there is still pre-pre-alpha.

CMI

did you install php5 from RPMs ?
Could you please provide a brief Howto.

For me there is only to install PHP with the option --force-redirect-cgi ?
then apply this (I’d prefer to have .php5 than .php but not sure)
AddType application/x-httpd-php-cgi .php5
Action application/x-httpd-php-cgi /cgi-bin/php5

Does it means that all php5 have to be in the cgi-bin/php5 repertory and are readable from http://domaine.tld/cgi-bin/php5/ or can they be readable from http://domaine.tld ?

What about the location of the BIN php, where did you install it, and the php.ini ?

I’m looking for a php5-cgi RPM for centos

arff not have too much time at the moment, but I’d really like to di this asap

Thanks CMI
Pascal

I installed from source as to not clobber anything, although I’m using Gentoo at home and I could install mod_php4 while using PHP5 for CLI and CGI. When you build the source code you can look for sapi/cgi/php which will be suitable for dropping in cgi-bin.

If you go with the .php5 extension, you can do this server-wide. Personally, I think .php5 is ugly and will cause problems in the future which is why I didn’t do it.

/cgi-bin/php5 needs to be where ever Apache will look for it. For me, it looks under the localhost site. The actual files can be anywhere, so long as they are accessable by the php5 app.

As a reminder, I haven’t tried this on our IWorx box yet, only at home. I didn’t look into security considerations and performance tweaking yet, so I wouldn’t do this in a production environment without a little review first.

As a reminder, I haven’t tried this on our IWorx box yet, only at home. I didn’t look into security considerations and performance tweaking yet, so I wouldn’t do this in a production environment without a little review first.

Absolutly, it’s the reason why we would like to install it on our iworx test box.

My idea was to ask to interworx team if they already have an php5-cgi rpm home made. (I prefer rpm, as it is easly removable)

If not, I think I’ll use the ./configure that is in the php.spec file of the php4 iworx’s rpm. Of course I’ll add --force-redirect-cgi (think it is enough)

Thanks CMI for your advises

Pascal

My idea was to ask to interworx team if they already have an php5-cgi rpm home made. (I prefer rpm, as it is easly removable)

We don’t Pascal, and probably won’t, at least in the near future.

Btw, PaulK, will be finisihing up your box today I hope.

Chris