Obsolete Releases > SME 8.x Contribs
Need to update PHP support from 5.3.3 to 5.5.x
wdepot:
What version of PHP is included with SME 9? I'm also looking to create an SME server with PHP 5.5 but since my use is strictly for web site testing purposes the beta version of SME would be fine as long as it will work on the old Pentium 4 computer I plan to use as the test server and it includes or can easily be upgraded to PHP 5.5 without causing problems with MySQL. Basically I want to ensure the web site is fully compatible with PHP 5.5 in advance of it becoming the default version of PHP on web servers. I will require phpMyAdmin but that is easily downloaded from phpmyadmin.net and installed in an ibay to allow the PHP update that smeserver-phpmyadmin prevents due to dependency issues. I just yum install php-mcrypt and php-php-gettext in advance and use the phpMyAdmin/config.inc.php template from the SMEserver version of phpMyAdmin to generate the configuration file needed to allow it to access MySQL. While I've had a bit of problem getting it to access the /etc/phpMyAdmin/config.inc.php file I suspect that was due to an incorrect permissions setting for the folder on my part.
My problem has been that every time I've tried update PHP under SME 8 I can successfully get it to version 5.5.8 but MySQL totally quits working. Of course, I've been using the Remi PHP5.5 repository to do the update and I suspect that the problem is due to the fact that it is made for general Red Hat/CentOS rather than SME. I didn't know that PHP 5.5 was also available from the Webtatic repository so I'll give that a try and see if it works better. It would be nice if the listings for the extra yum repositories had a rough list of what was included in each repository. I think the Remi version was automatically updating MySQL as well. I don't know why that would be a problem unless SME is placing the MySQL program files in a different location than what is used in standard CentOS. If the updated RPM files then placed the newer MySQL program files in a different location rather than just updating the files in their current location I could understand how the problem is occurring.
wdepot:
I FINALLY managed to update a test server using SME 8.0 to use PHP 5.5 without causing MySQL to fail after reading through some of the links here. Here is what I had to do in order to do it.
First create a new yum repository for Webtatic EL5 (not the CentOS version listed in the SME extra yum repositories documentation since that one doesn't include PHP 5.5) as follows:
--- Code: ---/sbin/e-smith/db yum_repositories set webtatic-el5 repository \
Name 'webtatic - EL5' \
MirrorList 'http://mirror.webtatic.com/yum/el5/$basearch/mirrorlist' \
EnableGroups no \
GPGCheck yes \
GPGKey http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy \
Visible no \
status disabled
signal-event yum-modify
--- End code ---
Next install the yum replace add on from the new repository:
--- Code: ---yum install yum-plugin-replace --enablerepo=webtatic-el5
--- End code ---
Now you can upgrade your version of PHP to version 5.5.9 as follows:
--- Code: ---yum replace php --replace-with=php55w --enablerepo=webtatic-el5
--- End code ---
If you need phpMyAdmin like I did then before doing the "signal-event post-upgrade; signal-event reboot" perform one more install:
--- Code: ---yum install php55w-mcrypt --enablerepo=webtatic-el5
--- End code ---
The php-gettext needed by phpMyAdmin is apparently already included in the php55w-common rpm so you won't have to install it separately. Other PHP add ons such as php55w-pear are available in the Webtatic EL5 repository if you need them, you can view the list at http://us-east.repo.webtatic.com/yum/el5/ choosing the i386 or x86_64 directories as appropriate for your server. Of course to use phpMyAdmin with this you will have to forgo the SME contribution and download the current version directly from http://www.phpmyadmin.net
To make phpMyAdmin usable:
1) Create a new ibay specifically for phpMyAdmin (I would suggest calling it phpmyadmin) and set it with the appropriate access permissions being sure to enable dynamic content (i.e. PHP). Then delete the index.html file from the html folder of this new ibay.
2) Load the complete phpMyAdmin file set you've just downloaded into the html folder of the new ibay. The root directory for phpMyAdmin should be the ibay's html folder so load the entire CONTENTS of the phpMyAdmin folder you've downloaded into it and not the phpMyAdmin folder itself.
3) Create a new folder in /etc called phpMyAdmin and set permissions on it to at least 775.
4) Create a folder in /etc/e-smith/templates-custom named phpMyAdmin and then inside that create a folder named config.inc.php
5) Inside the new /etc/e-smith/templates-custom/phpMyAdmin/config.inc.php folder create three files, an EMPTY file named template-begin, an EMPTY file named template-end and one other file (I used the "10config" name used by the smeserver-phpmyadmin contribution where this comes from) containing the following:
--- Code: ---<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.9.0.2 setup script by Michal Čihař <michal@cihar.com>
* Version: $Id: setup.php,v 1.36.2.3.2.1 2006/10/03 13:11:08 nijel Exp $
* Date: Thu, 12 Oct 2006 16:17:17 GMT
*/
/* Servers configuration */
$i = 0;
/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '{
open (PW, "/etc/openldap/ldap.pw")
|| die "Could not read LDAP password.\n";
my $pw = <PW>;
chomp ($pw);
close PW;
$OUT .= "$pw";
}';
/* End of servers configuration */
?>
--- End code ---
6) expand-template /etc/phpMyAdmin/config.inc.php
7) You should now have a config.inc.php inside the /etc/phpMyAdmin folder you created. If can figure out how to get your phpMyAdmin to directly access this file you are set to go. Otherwise, do like I did and just copy the password from the file and then log in to phpMyAdmin as root using this password. In that case the very first thing to do is create a new user with all privileges and a password you can remember to use for all future access to phpMyAdmin which you will access as http://server_url/phpmyadmin_ibay_name/
After spending at least two weeks trying to figure out how to get a PHP 5.5 upgrade to work properly I figured I'd better share the information with others that might be trying to do the same thing. Besides, I expect to reuse this information myself to create a test server with PHP 5.5 at work and I wanted it to be easily accessible.
Stefano:
--- Quote from: brunp on February 10, 2014, 03:04:15 PM ---I don't follow you here....if I am using to using RH/CentOS, I should not update the php version? So, are my only options to alter my PHP
--- End quote ---
RH aims to stability and security.. once a version of RHEL is released (let's say RHEL 6) with (let's say) php 5.3 and mysql 5.2, it will never make any version upgrade during all the life time of the distribution..
please remember that RH often backports security path on all the rpms
CentOS (and SME) inherits this modus operandi
if you are used to work with RH/CentOS you should be aware of that..
you can always upgrade your php/mysql/whatever using external repos, but you do it at your risk.. fortunately there are many repos that we can rely on and we can trust.
in any case, if you really need bleeding edge version of php/mysql/whatever, I strongly suggest you to create a small, minimal VM with all you need..
don't play with your server.. that's all
brunp:
interesting....although I do not have an iBay called phpmyadmin, I can't seem to create an ibay with that name as an account is already created with that name,
however, I did find where all my files are stored and it was a local install, so I can simply replace the files and perform the necessary config file updates after the fact. :-)
Paul
janet:
brunp
If you have installed phpmyadmin, then there is probably a folder in /opt with that name, and/or there is an alias (eg http://yourdomain.com/phpmyadmin) for web access, so therefore that name cannot be used a second time on your system. Many contribs rpms will install to /opt
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version