Fedora Linux Support Community & Resources Center
  #1  
Old 14th February 2010, 04:34 PM
Quasaur's Avatar
Quasaur Offline
Registered User
 
Join Date: Jul 2009
Location: Pittsburgh, PA
Posts: 57
linuxfedorafirefox
Downgrading PHP 5.3 to 5.2

I need to downgrade the PHP on my Fedora 12 machine from 5.3.1 to 5.2...how do I do this?

---------- Post added at 11:34 AM CST ---------- Previous post was at 10:33 AM CST ----------

ran 'yum downgrade php php-common php-cli' but can't get lower than 5.3.0.
Reply With Quote
  #2  
Old 14th February 2010, 04:58 PM
CSchwangler Offline
Registered User
 
Join Date: Feb 2009
Posts: 2,535
linuxfedorafirefox
PHP 5.2 is not in the Fedora repositories. However, you may get it from different sources.
Reply With Quote
  #3  
Old 21st April 2010, 12:34 PM
bvbmedia Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_vistaie
Re: Downgrading PHP 5.3 to 5.2

I recommend you to install PHP 5.2 through source.

Before you proceed first make sure you have the right packages installed to compile from source. Probably the easiest way to do it as following:

# stop apache
/etc/init.d/httpd stop

# remove PHP 5.3 RPM
yum remove php
# install packages to compile from source
yum groupinstall "Development Tools"
yum install httpd-devel
yum install libxml2-devel
yum install mysql-devel

# download PHP 5.2.13 Source from www.php.net
# after that extract the tar file:
tar -zxvf php-5.2.13.tar.gz
cd php-5.2.13
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local
make
make test (not neccessary)
make install

# hopefully the compilation is succesfully completed
# now copy the default php.ini
cp php.ini-recommended /usr/local/lib/php.ini

# edit php ini
vi /usr/local/lib/php.ini
# change this:
short_open_tag = Off
# to:
short_open_tag = On
# save the document

# edit your Apache http.conf to allow .php files to be parsed
vi /etc/httpd/conf/httpd.conf
# add the following lines:
LoadModule php5_module modules/libphp5.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# save the document
# restart apache
/etc/init.d/httpd restart

Enjoy PHP 5.2.X!

Kind regards,

Bas van Beek
Reply With Quote
  #4  
Old 8th May 2010, 10:49 AM
bvbmedia Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_vistaie
Re: Downgrading PHP 5.3 to 5.2

If you are missing some functionalities like Exif and Curl then configure your command as follows:

# installing the additional packages
yum install libcurl libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel libiconv iconv libxslt-devel libstdc++-devel libmcrypt

# configuring PHP before installing it
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local \
--with-kerberos=/usr \
--enable-cli \
--with-zlib-dir=/usr \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--with-curl \
--with-openssl=/usr \
--with-xmlrpc \
--with-xsl=/usr \
--with-pear \
--with-iconv \
--with-gd \
--with-jpeg-dir=/opt/local \
--with-png-dir=/opt/local \
--with-freetype-dir=/opt/local \

Now proceed the steps that I mentioned in my previous post.

Let me know if it's helping.

Best regards,

Bas van Beek
Reply With Quote
  #5  
Old 3rd June 2010, 10:15 PM
Andrew James Offline
Registered User
 
Join Date: Jun 2006
Posts: 68
macosfirefox
Re: Downgrading PHP 5.3 to 5.2

Is there no way to do this with yum? I need to do this with php-mysql and lots of other stuff and the idea of compiling for everything I need does not appeal!

If I choose another repository that has 5.2 but is for maybe fc10 will that work or am I leaving myself open to conflicts.

Thanks,

Andrew
Reply With Quote
  #6  
Old 3rd June 2010, 10:36 PM
bvbmedia Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_vistasafari
Re: Downgrading PHP 5.3 to 5.2

I know what your challenging, believe me.

Using packages from a newer repo is not the right solution. The files are simply not compiled for your FC release.

You can, however, try to manually upgrade your FC release. It's not impossible to update it. But officially it's not supported.

Installing from source is not hard. If you follow my previous post it's even more easy. Just follow the command lines in the right order and you would have a fresh and good compiled version of PHP running in combination with MySQL.

Best Regards,

Bas
Reply With Quote
  #7  
Old 19th June 2010, 12:43 PM
geek4life Offline
Registered User
 
Join Date: Jun 2010
Posts: 1
macossafari
Re: Downgrading PHP 5.3 to 5.2

Should I remove the "Development Tools" after I'm done with the install?

---------- Post added at 04:43 AM CDT ---------- Previous post was at 04:37 AM CDT ----------

Quote:
Originally Posted by bvbmedia View Post
If you are missing some functionalities like Exif and Curl then configure your command as follows:

# installing the additional packages
yum install libcurl libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel libiconv iconv libxslt-devel libstdc++-devel libmcrypt

# configuring PHP before installing it
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local \
--with-kerberos=/usr \
--enable-cli \
--with-zlib-dir=/usr \
--enable-exif \
--enable-ftp \
--enable-mbstring \
--enable-mbregex \
--enable-sockets \
--with-curl \
--with-openssl=/usr \
--with-xmlrpc \
--with-xsl=/usr \
--with-pear \
--with-iconv \
--with-gd \
--with-jpeg-dir=/opt/local \
--with-png-dir=/opt/local \
--with-freetype-dir=/opt/local \

Now proceed the steps that I mentioned in my previous post.

Let me know if it's helping.

Best regards,

Bas van Beek

I tried the above, but I get

configure: error: Cannot find OpenSSL's libraries

(I'm running fedora 13)
Reply With Quote
  #8  
Old 18th July 2010, 01:53 AM
bvbmedia Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_vistaie
Re: Downgrading PHP 5.3 to 5.2

You could try to install the development package of OpenSSL by running:

yum -y install openssl-devel

Let me know if it helps.

Best regards,

Bas van Beek

---------- Post added at 04:53 PM CDT ---------- Previous post was at 04:52 PM CDT ----------

Here another 1 line based command for bypassing those issues:

yum -y install libcurl libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel libiconv iconv libxslt-devel libstdc++-devel libmcrypt freetype-devel freetype libxslt-devel libpng* libjpeg*
Reply With Quote
  #9  
Old 18th July 2010, 03:55 AM
Zanpactou Offline
Banned
 
Join Date: Oct 2009
Posts: 358
linuxopera
Re: Downgrading PHP 5.3 to 5.2

What's the big problem with php 5.3.x guys?

Thanks,
Zanpactou
Reply With Quote
  #10  
Old 19th July 2010, 08:58 AM
bvbmedia Offline
Registered User
 
Join Date: Apr 2010
Posts: 5
windows_vistaie
Re: Downgrading PHP 5.3 to 5.2

In PHP 5.3 ereg is deprecated. Many old web-applications will fail because of this.

Best Regards,

Bas van Beek
BVB Media
Reply With Quote
  #11  
Old 19th July 2010, 11:09 AM
Zanpactou Offline
Banned
 
Join Date: Oct 2009
Posts: 358
linuxopera
Re: Downgrading PHP 5.3 to 5.2

Quote:
Originally Posted by bvbmedia View Post
In PHP 5.3 ereg is deprecated. Many old web-applications will fail because of this.

Best Regards,

Bas van Beek
BVB Media
OK. Fair enough.
Some other stuff was depreciated too but the depreciated warning for ereg and others was in previous versions before ereg was removed, do people not check their php logs?
Or is it that people can't be bothered with swapping ereg out for one of the safer and faster regular expression functions in the current php release?

Thanks,
Zanpactou
Reply With Quote
  #12  
Old 8th November 2010, 03:24 PM
pmin00 Offline
Registered User
 
Join Date: Nov 2007
Posts: 4
linuxfedorafirefox
Re: Downgrading PHP 5.3 to 5.2

Quote:
Originally Posted by Zanpactou View Post
What's the big problem with php 5.3.x guys?
No problems. Just #!#@$ hosting companies
that don't allow you to upgrade
Reply With Quote
Reply

Tags
downgrade, fc12, fedora 12, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downgrading my KDE Antikorper Using Fedora 2 12th June 2008 08:14 PM
Downgrading using yum carlg Using Fedora 0 28th November 2007 03:22 AM
Downgrading from 64-bit to 32-bit Jim Rockford Using Fedora 4 8th October 2006 03:41 AM
Downgrading from FC5 to FC4 mick-porter Using Fedora 1 29th March 2006 09:41 PM


Current GMT-time: 16:50 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat