doesn't centos 5.x support the latest version of php?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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).
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?
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.
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.