Forums

Resolved
0 votes
EDIT:Amended for new repo and 5.3.5

Instructions below to upgrade PHP to 5.3.5

Please note these are not the official packages, and have been put together by http://rpms.famillecollet.com/ for RHEL5 distributions (thank you!). I have rebuilt these so they install for ClearOS with the addition of two RPM's (libedit and sqlite2).

Thefore please consider these as beta / testing quality.
WARNING: 5.3.x is not entirely backwards compatible with older versions of PHP. Therefore if your application / website / scripts do not specify compatibility then it may break!

If you are a website developer then you may want to review the changes between 5.2 and 5.3 here
http://uk2.php.net/migration53

1. GET THE FILES

Setup the community repo per instructions HERE

2. INSTALL

yum --enablrepo=timb-testing upgrade php
service httpd restart
php -v


3. PHP VERSION INFO
Create a file called phpinfo.php in /var/www/html that looks like the following
<HTML>
<BODY>
<?php
phpinfo();
?>
</BODY>
</HTML>

Point your browser at http://mydomain.com/phpinfo.php

Enjoy! :D
Friday, May 28 2010, 02:18 PM
Share this post:
Responses (48)
  • Accepted Answer

    Friday, May 28 2010, 02:20 PM - #Permalink
    Resolved
    0 votes
    Update - files are uploaded now :)

    I've tested the installation on a clean VM and it works fine, although i've not tried a full blown website
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, May 30 2010, 04:44 PM - #Permalink
    Resolved
    0 votes
    I just wanted t say thanks. I wish they would update the default to at lest 5.2 but I like 5.3 and find it stable enough already.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 28 2010, 02:59 AM - #Permalink
    Resolved
    0 votes
    Im getting this error

    Error: Missing Dependency: php-common = 5.2.9-2 is needed by package php-ncurses
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 28 2010, 09:21 AM - #Permalink
    Resolved
    0 votes
    Hi Alton - it appears that the mhash and ncurses extensions have been removed from PHP 5.3 (versus older releases)

    run the following before upgrading (assuming you don't use them)
    yum remove php-ncurses php-mhash
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 28 2010, 01:44 PM - #Permalink
    Resolved
    0 votes
    Thanks Tim,

    That did the job. Interesting though. This was on a complete rebuild of clearos 5.2 as where when i had 5.1 installed the 5.3.2 full upgrade worked with no issues until now. But that did the job.

    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    sbn
    sbn
    Offline
    Thursday, July 22 2010, 08:27 AM - #Permalink
    Resolved
    0 votes
    I did an upgrade from 5.2.9, and I thought everything worked. Sadly I did not test out thoroughly enough. I opened up rather too quickly the different installed web sites and applications and they all seemed fine.

    However, I now find something very odd. I can log into Roundcube and Group Office 3.52. I can go to the Inbox, and it will list the directories. However I then get error messages telling me "Invalid username or password". I went to check, and double check the password works. Yes, it works perfectly accessing through Thunderbird directly to the server.

    What is very annoying is that if I restart Apache, log in to GroupOffice or Roundcube it will load the mail. However, the minute I go to another folder or open another message the errors start up again with the "invalid username or password" crap.

    How could I drop back to 5.2.9 safely? Would going back even be worth it?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 22 2010, 09:06 AM - #Permalink
    Resolved
    0 votes
    Hi - are there any clues in /var/log/httpd/error_log?

    Not all sites are 5.3 comptaible...as of 5.3 they introduced changes that are not backwards compatible with older php versions. Do roundcube and group office state they are compataible with 5.3?

    You can indeed roll back to 5.2.9 realtively safely although you may have to reinstall horde if you use it, you can simply remove PHP, then reinstall the old version. See what dependancies this throws up:-
    yum remove php-common
    The reply is currently minimized Show
  • Accepted Answer

    sbn
    sbn
    Offline
    Thursday, July 22 2010, 11:08 AM - #Permalink
    Resolved
    0 votes
    Tim Burgess wrote:
    Hi - are there any clues in /var/log/httpd/error_log?

    Not all sites are 5.3 comptaible...as of 5.3 they introduced changes that are not backwards compatible with older php versions. Do roundcube and group office state they are compataible with 5.3?

    You can indeed roll back to 5.2.9 realtively safely although you may have to reinstall horde if you use it, you can simply remove PHP, then reinstall the old version. See what dependancies this throws up:-
    yum remove php-common


    I had a suspicion that something went wrong with how passwords were being read from mysql. I just now created a new GroupOffice account and logged in. Then setup the mail access and had no issues. As of course this new account created new entries into mysql, then I would assume this is an issue with how Groupoffice is reading the mysql database via php.

    The annoying thing, and I mean really annoying was that I got no error messages in the logs. The only thing I got was in Groupoffice, and looking up that specific error message at their forum only indicated an issue when using IMAP or LDAP for authentication to the site. I think the problem is solved for me now. I have a suspicion that if I go to the mail server and do a new password, I will be able to log into my old GroupOffice account.
    The reply is currently minimized Show
  • Accepted Answer

    Cevin
    Cevin
    Offline
    Friday, July 23 2010, 09:30 AM - #Permalink
    Resolved
    0 votes
    joutch, well that hurted and destroyed the killboard update function that i run (yes only for games, not a real one) so i rolled back to 5.2.13 and that worked fine. I got the same error as above and was missing a packet that i couldnt find. (same ones as last time that are neaded for a lot of boards, ehm how are they called againMCcrypt and the other one was ehm... php devil i think.

    Pitty though but 5.2.13 works fine for me too :)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, August 20 2010, 09:43 PM - #Permalink
    Resolved
    0 votes
    Hi Tim,

    Long time ;)

    I have been away on business, I came back upgraded to Clear OS 5.2 and its working fine. I am trying to upgrade to PHP 5.3 and I cant get past this


    Connecting to download.clearfoundation.com|64.34.186.224|:21... connected.
    Logging in as anonymous ... Logged in!
    ==> SYST ... done. ==> PWD ... done.
    ==> TYPE I ... done. ==> CWD /community/timb80/php-5.3.2 ... done.
    ==> PASV ... done. ==> LIST ...
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, August 22 2010, 11:44 AM - #Permalink
    Resolved
    0 votes
    ClearNovice wrote:
    Hi Tim,

    Long time ;)

    I have been away on business, I came back upgraded to Clear OS 5.2 and its working fine. I am trying to upgrade to PHP 5.3 and I cant get past this


    Connecting to download.clearfoundation.com|64.34.186.224|:21... connected.
    Logging in as anonymous ... Logged in!
    ==> SYST ... done. ==> PWD ... done.
    ==> TYPE I ... done. ==> CWD /community/timb80/php-5.3.2 ... done.
    ==> PASV ... done. ==> LIST ...


    Just fixed the issue with slow FTP, I downloaded the files manually from the ftp mirror and uploaded to my ClearBox. The upgrade works fine. :woohoo:
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, December 14 2010, 04:41 AM - #Permalink
    Resolved
    0 votes
    I just upgraded to version 5.3.2 So I thought I would post my experience/How-to here.

    I initially posted it in the wrong thread, so I apologize for the duplication.

    Here goes.....

    I ftp browsed to the ftp site:
    ftp://download.clearfoundation.com/community/timb80/php-5.3.2/

    did these commands:
    wget ftp://download.clearfoundation.com/community/timb80/php-5.3.2/*.rpm

    ran the install and got this.

    Error: Missing Dependency: libsqlite.so.0 is needed by package php-pdo
    Error: Missing Dependency: libedit.so.0 is needed by package php-cli

    then realized that these dependancies were in the 5.3.2 directory mentioned above and that I had already downloaded them with the *.rpm.. so I then ran these in this order.

    yum --nogpgcheck install libedit-*
    yum --nogpgcheck install sqlite2-*
    yum --nogpgcheck install php-*
    service httpd restart

    everything works fine now.

    REASON FOR UP GRADE:
    I had to upgrade the PHP to version 5.3.x in order to run Collabtive.
    http://www.collabtive.o-dyn.de/

    Its a neat task/project management program.
    works well so far too.. simple to install.. you just have to have the latest PHP for it to work or you
    get an error when accessing the admin page ( Fatal Error. Class DateTimeZone could not be located.)

    All you have to do is download collabtive and follow the install text in the package.

    Anyway, I hope this helps someone. Just trying to share :-)

    George
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 05 2011, 05:38 PM - #Permalink
    Resolved
    0 votes
    UPDATE: 5.3.4 now available too
    ftp://download.clearfoundation.com/community/timb80/php-5.3.4/

    I'll be removing 5.3.2 in due course
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 05 2011, 09:04 PM - #Permalink
    Resolved
    0 votes
    Hmm tried the latest version you posted and I get the following dependency issues:

    Error: Missing Dependency: libenchant.so.1 is needed by package php-enchant
    Error: Missing Dependency: libtidy-0.99.so.0 is needed by package php-tidy
    Error: Missing Dependency: librecode.so.0 is needed by package php-recode
    Error: Missing Dependency: libsybdb.so.5 is needed by package php-mssql
    Error: Missing Dependency: libt1.so.5 is needed by package php-gd

    Any help? Search with yum but it's giving me no results
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 05 2011, 10:19 PM - #Permalink
    Resolved
    0 votes
    Hi Laurence, sorry had a bit of a reshuffle - you can find enchant, libtidy, libedit, recode, freetds, libt1 all here:-

    ftp://download.clearfoundation.com/community/timb80/php-5.3.4/extra/
    ftp://download.clearfoundation.com/community/timb80/php-5.3.4/
    The reply is currently minimized Show
  • Accepted Answer

    Duncan Rix
    Duncan Rix
    Offline
    Thursday, January 06 2011, 08:58 PM - #Permalink
    Resolved
    0 votes
    Hello all

    Iget this when i try to install


    --> Running transaction check
    --> Processing Dependency: php-api = 20041225 for package: php-mapi
    ---> Package libicu.i386 0:3.6-5.11.4 set to be updated
    --> Finished Dependency Resolution
    Error: Missing Dependency: php-api = 20041225 is needed by package php-mapi

    Where might i find this package :S
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 07 2011, 11:45 AM - #Permalink
    Resolved
    0 votes
    Hi Duncan, php-mapi is a Zarafa extension, i've not built a compatible version for 5.3.4 yet. You can remove php-mapi if you want to do the PHP upgrade but Zarafa webaccess will no longer work
    The reply is currently minimized Show
  • Accepted Answer

    Duncan Rix
    Duncan Rix
    Offline
    Friday, January 07 2011, 01:29 PM - #Permalink
    Resolved
    0 votes
    Thanks for the heads up Tim.

    My Zarafa webmail seemingly randonly stoped reciving mail just before the end of December. As far as I could tell the mail must still be getting recived as there are no bounce backs. So not being one to find or understand log files :whistle: I insted opted for updating my Zarafa installation.

    The install whent ok (or so I thought) untill I tryed to login to webaccess. All I get is this error

    Not Found: PHP mapi extension not found
    If you have upgraded zarafa, please restart Apache
    Zarafa WebAccess can't start because of incompatible configuration.

    Please correct above errors, a good start is by checking your '/etc/php.ini' file.

    Or if you wish, you can disable this config check by editing the file '/usr/share/zarafa-webaccess/config.php', but this is not recommend.

    In my semi logical way I thought that updating my PHP might help. Do you think installing PHP 5.2.9
    insted will get me going again?

    Thanks as all ways

    P.S If this is going off topic or better suted to a different thred such as this one let me know.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 07 2011, 02:21 PM - #Permalink
    Resolved
    0 votes
    What's you current version of PHP? (you can check by running 'php -v').

    First try and restart the webserver... 'service httpd restart'.

    If that doesn't work you'll need to install the associated version of php-mapi for your PHP version. The default one in the repo is for 5.1.6, there are others available for 5.2.9, 5.2.14 and 5.2.16.

    Mail was probably diverting back to your normal ClearOS account. You can check by running 'grep relay /var/log/maillog' and reviewing the last few lines.
    The reply is currently minimized Show
  • Accepted Answer

    Duncan Rix
    Duncan Rix
    Offline
    Sunday, January 09 2011, 03:04 PM - #Permalink
    Resolved
    0 votes
    Thanks Tim for the above information.

    Using your help iv been able to upgrade to PHP 5.2.16 (i think it was, server down due to my meddling).
    And install the needed Zarafa rpm's.

    Now all I need to is find the right config file as to where my mail gets sent as I have checked the requested log and it does look to be sending it to postfix.

    Thanks as all ways
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 09 2011, 08:15 PM - #Permalink
    Resolved
    0 votes
    Hi Duncan, glad you have upgraded Ok. If you just add the domain or email address you want to go to Zarafa it will be diverted instead of ending up in the normal ClearOS IMAP user folders (Using the Zarafa webconfig app)

    If it's still not working - i'd recommend starting another thread :)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 18 2011, 11:15 PM - #Permalink
    Resolved
    0 votes
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 19 2011, 07:53 AM - #Permalink
    Resolved
    0 votes
    Hi, is it possible to compile this with large file support? I really need this and i was planning to compile php from source, but i maybe it would be easier for someone who already have the build environment set-up to help me ? :)
    The reply is currently minimized Show
  • Accepted Answer

    Roy Tam
    Roy Tam
    Offline
    Tuesday, January 25 2011, 04:13 AM - #Permalink
    Resolved
    0 votes
    Tim Burgess wrote:
    UPDATE: PHP 5.3.5 now available
    http://download.clearfoundation.com/community/timb80/php-5.3.5/

    Thanks for updating.

    But I wonder if you can provide php-pecl-apc?

    Edit: nvm, I got remi's php-pecl-apc installed.
    The reply is currently minimized Show
  • Accepted Answer

    Calvin Teh
    Calvin Teh
    Offline
    Wednesday, January 26 2011, 03:06 AM - #Permalink
    Resolved
    0 votes
    how do I actually update this ? :huh:
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 26 2011, 03:55 PM - #Permalink
    Resolved
    0 votes
    Instructions are on the first page - i've updated the versions :)
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 09 2011, 04:31 PM - #Permalink
    Resolved
    0 votes
    Hi Tim,

    Total download size: 52 M
    Is this ok [y/N]: y
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    ERROR with rpm_check_debug vs depsolve:
    Package php-mapi needs php-api = 20041225, this is not available.
    Complete!

    I have a clean install of ClearOS with Zarafa installed.
    Anybody else get the dependancy probs?

    Stuart
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 09 2011, 10:00 PM - #Permalink
    Resolved
    0 votes
    If I get a clean install of ClearOS 5.2 SP 1
    Then it is possible to upgrade to PHP5.3 only problem then is the dependencies for Zarafa are broken.
    If you install Zarafa then you can't install PHP5.3

    Sort of a catch 22 its either Zarafa or PHP5.3 but not both Doh!

    Stuart
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 09 2011, 10:11 PM - #Permalink
    Resolved
    0 votes
    Hi Stuart, Zarafa uses a PHP-MAPI extension which has to be built for the version you are running. By default this is PHP-5.1.6 as found in ClearOS5.2. Therefore to upgrade PHP you need update to a compatible version of PHP-MAPI to use with Zarafa-Webaccess.

    At present there are alternative versions for 5.2.9 and 5.2.17 as outlined in the Zarafa thread on the first page. As you've requested it i'll setup a VM and run a build for 5.3.5. ClearOS6 will be using PHP-5.3.x so will remove the need for maintaing several versions of the PHP-MAPI RPM

    Note that PHP 5.3 is not 100% backwards compatible with 5.2 so unless you require it for a specific application, I would stick with the latest 5.2.x variant
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 09 2011, 11:09 PM - #Permalink
    Resolved
    0 votes
    Cheers Tim,

    I am trying out the new version of Joomla and a few components that require PHP 5.3 so for me it would be a god send.

    I am thinking I might use the Howto and run a VMserver on ClearOS and use that to host some of these problems.
    I am totally hooked on the Zarafa module there is no comparison with the Hoarde module.

    Stuart
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 09 2011, 04:21 PM - #Permalink
    Resolved
    0 votes
    Updated installation instructions on the first page so that it uses the new repo and simplifies installation :)
    The reply is currently minimized Show
  • Accepted Answer

    Andi  Riza
    Andi Riza
    Offline
    Friday, March 11 2011, 02:38 AM - #Permalink
    Resolved
    0 votes
    Hi Tim

    How to use the repo to upgrade to version 5.2.17 instead to version 5.3.x?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 11 2011, 09:15 AM - #Permalink
    Resolved
    0 votes
    Hi Andi, I updated the instructions on the first page

    but essentially for PHP5.2.x
    yum --enablrepo=timb upgrade php

    for PHP5.3.x
    yum --enablerepo=timb-testing upgrade php

    Don't forget to run 'service httpd restart' afterwards
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2011, 07:27 PM - #Permalink
    Resolved
    0 votes
    Hey Tim,
    thanks for all of your work. In the latest upgrade from you repo, libtidy wasn't included? Where can I grab these?
    Robert
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2011, 08:08 PM - #Permalink
    Resolved
    0 votes
    Hi Robert, thanks for the feedback - however libtidy is available in both timb and timb-testing repo's?
    yum --enablerepo=timb install libtidy
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2011, 08:21 PM - #Permalink
    Resolved
    0 votes
    thanks, installed ok but phpinfo() still doesn't list libtidy. Do I have to edit php.ini?
    added /etc/php.d/tidy.ini where tidy.ini loads extension=tidy.so but that didn't seem to solve it
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2011, 09:47 PM - #Permalink
    Resolved
    0 votes
    Sorry my bad, got confused with the libtidy RPM. What you need is php-tidy
    yum --enablerepo=timb-testing install php-tidy
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2011, 10:07 PM - #Permalink
    Resolved
    0 votes
    yes :)
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 03 2011, 02:14 AM - #Permalink
    Resolved
    0 votes
    well not so fast sonny.....
    upgrading may have cause unintended consequences with joomla 1.6

    how would I go back to php 5.2.17? yum remove php & yum remove php-tidy?

    update: I think I've rolled back everything to 5.2.17 and the joomla1.6 site is no longer broken. Is there a way to check that everythings the correct php version and that I didn't miss anything? thanks

    Robert
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 03 2011, 08:33 AM - #Permalink
    Resolved
    0 votes
    Hi Robert, PHP 5.3.x is not 100% compatible with 5.2.x or earlier so unless your CMS/blog/website specifically requires it you should stay at 5.2

    If you run 'php -v' from the command line, use phpinfo() or 'rpm -qa | grep php-' you can list all the PHP packages and cehck the versions...

    Just remember to backup /etc/php.ini if you remove PHP, to downgrade
    yum remove php-*
    yum --enablrepo=timb install app-php php php-common
    The reply is currently minimized Show
Your Reply