LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2012, 05:22 AM   #1
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Rep: Reputation: Disabled
doesn't centos 5.x support the latest version of php?


I have Centos 5.8 running on the server and the php version is 5.1 but the latest php version is 5.4 or something..

i googled a lot but i didn't see it anywhere... I feel that centos 5 doesn't support the latest version of php and if i want to ugrade the php it seems i need to upgrade the whole server to centos 6... is this true,i mean m i correct?


We don't have cpanel as of now so we cant upgrade it directly....a client has a website written in latest php,it isn't working so though this might be the problem.

when i chnaged his homepage to index.html instead of index.php the homepage opened but other pages aren't opening...can you give any suggestion?
 
Old 03-20-2012, 06:57 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
CentOS is a binary compile of RedHat Enteprise Linux (RHEL) source.

For RHEL the main idea is stability so unlike other distros they pick start with an upstream version of a package and stay with that version. They will backport security and bug fixes from later upstream versions into their version and then add their own versioning to it.

So if you run "rpm -q php" you might see something like:
php-5.1.6-23.2.el5_3
The 5.1.6 tells you the upstream version they started with. The rest of tells you the RHEL (CentOS) version.

Other distros instead simply pass on upstream versions (with minor modifications as necessary).

The benefit to the RHEL way of doing it is that you don't end up having to redo code/scripts for newer upstream versions that remove older functionality so it makes it good for Production systems. The downside is that security scanning software often looks only at the 5.1 and ignores the platform and subversion and says it is compromised. (We saw this for php specifically.) The fix is to simply modify your setup so that the php version isn't reported at all to scanning software via web pages.

You CAN actually get the later PHP source and compile and add it to your system but at that point you can't use the yum repositories for standard CentOS to get updates. (You may be able to find newer PHP in the EPEL from Fedora or one of the extended repositories for CentOS but at that point you're not running in full binary compatibility mode with RHEL any longer.
 
Old 03-20-2012, 10:16 AM   #3
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Here is an explanation of the Red Hat policy (and by extension CentOS):

https://access.redhat.com/security/u...g/?sc_cid=3093

6.x doesn't give you the latest PHP either; it is "frozen" at 5.3.3. Someday Red Hat 7.x will come out, and so forth.

If you constantly need the current PHP then you might consider a "rolling release" distribution like Arch (although such are not commonly used in servers due to stability concerns).
 
Old 03-20-2012, 10:41 PM   #4
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
Well thanks a lot for your answers...It cleared my doubts...

So it isn't that centos not supporting the latest version..

I had doubt that the customers might build their websites with the latest version of php while we are still runiing php 5.1 so thought that would be an issue?or will it not create any problem..

And in the server when i do yum searsh i get php 5.3 so is it ok to do yum update php53 or yum install php53 when 5.1 is still running?
 
Old 03-21-2012, 02:50 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You might want to check on the development or testing server before rolling the changes on the production server. Do you have an external repository configured other than the ones from CentOS? If you have, then you should check which repository is giving php53 package. It is not advisable to have multiple repositories configured on a production server for stability issues. The dependency checks might conflict with packages available with other repositories.
I had issues with PHP before. Trying to install php53 gave conflicts between repository packages. In such cases you need to know which repositories are giving which packages and then you can exclude those packages for particular repo.
But the best bet would be to have a testing or development server identical to your production one and check on it. This will give you a playing field without breaking the production environment. And if you are running a hosting business, I dont think customers would like to have a down time.
 
Old 03-21-2012, 04:01 AM   #6
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
well in my case right now i don't think the issue is with the php now because the client has used php 5.0 and we have 5.1 and that should work.

But i don't understand why we are not able to view the website though everthing has been uploaded in the server...we just get a blank page..

And both index.html and index.php is there...
 
Old 03-21-2012, 04:45 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
How are you trying to access the page? Did you check the apache logs to see if the server is infact receiving the requests? You can also check for the error logs. Also check if your apache is correctly configured and that it can actually parse the php files and it knows what to do with php files. If apache is not properly configured for php, say missing mod_php module, you may face the issues.
 
Old 03-21-2012, 04:59 AM   #8
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
but if the conf file for apache is not configured well then other websites should have not worked as well right?but they are working..

IS there a problem if a client is using php version greater than our server?
 
Old 03-21-2012, 05:45 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I have no idea how your server architecture is hence it would not be possible to pin point the issue you have. You may need to check the log files for apache to see if it is actually accepting the requests for the said website.
Is it a shared server? Are there multiple websites running off the same server? Are you using virtual hosts to host multiple websites off the same server? If this is the case, you may want to check the website specific configuration for any errors. Also, in this case you should have website specific logging. You should be checking those before hand. Only logs can get you to pin point the issue. Else you would find yourself fiddling with the server without any success.
 
Old 03-21-2012, 05:58 AM   #10
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
The log shows error sayin undefined path and undefined variable in some directory..

but hw can that be when it has been created using cms....is it that we are not supporting his php?

Last edited by SarahGurung; 03-21-2012 at 06:02 AM.
 
Old 03-21-2012, 06:16 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Which CMS are you using? Have you gone through the CMS documentation to see if the installation has been done correctly. And if its saying undefined path, check which path is giving you error. Check if the path is actually valid or not
 
Old 03-22-2012, 04:32 AM   #12
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
Well thank you all...

Now i found the error. Our server was not not supporting his version of php so now i need to upgrade php 5.1.6..

But the thing is the package will clash? can you please tell me a safer way to do that..
 
Old 03-22-2012, 04:50 AM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
The safe way is to see if the version you need is available in the distribution repository. This will help manage the dependencies. Which version of php do you need by the way?
As said before, using multiple repositories to install a package can break things up. There could be conflicts of versions between different versions available in different repositories.
The better way would be to build a test environment identical to your production one and test things out in testing env.
 
Old 03-22-2012, 04:58 AM   #14
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
i need 5.3..

ya when i do yum search the package is der....but it isnt there in the update package so..
 
Old 03-22-2012, 05:09 AM   #15
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
If you absolutely need it, you should first check the compatible and trust worthy repositories for Cent OS. Then test those repositories on a test system identical to your production one. If everything seems fine for you, then upgrade it. There is this webtatic repository for Cent OS for which has PHP package. But use it on your own risk if you want to apply directly on production servers rather than test.
Else if you know how to compile it manually, download and compile it from source.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest Version of VirtualBox Kernel Errors on CentOS 5, i386 Doctorzongo Linux - Desktop 15 04-21-2012 08:42 AM
How to install latest version of Firefox on CentOS Dmjmusser Linux - Software 3 02-20-2007 12:02 PM
How do I upgrade to latest version of J2RE using YUM on CentOS 4.4? Dmjmusser Linux - Server 1 02-08-2007 01:06 PM
latest php version for RH9 ? vbsaltydog Red Hat 6 03-05-2006 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration