Can you upgrade only php in existing lampp???

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Can you upgrade only php in existing lampp???

Postby rahuliq » 22. March 2013 18:53

Hi

I have 32 bit lamp version 1.8.1 installed on mu 64 bit CentOS system.

I need to upgrade only the php of the lamp from 5.4.7 to 5.4.13(32 bit)

Please suggest how I can do this.

Regards
Rahul Bellamkonda
rahuliq
 
Posts: 6
Joined: 22. February 2013 15:22
Operating System: CentsOS 6.3 64 bit

Re: upgrade only php in existing lampp

Postby JonB » 22. March 2013 20:44

You know its amazing. I answered this exact same question a few hours ago to the same IP address.

Nothing has changed. You can't. Read and comprehend this post.

viewtopic.php?f=17&t=53219&p=203930#p203930

OR alternatively, search this forum for more posts on how to upgrade single core components. The answer has always been the same. NO CAN DO.

Or learn to build a stack and maintain it.

Have a good day
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: upgrade only php in existing lampp

Postby rahuliq » 25. March 2013 10:55

Hi Jon

Thank for getting back to me. The guy who raised the other post and myself work for the same organization. I'm part of the support team and he raised this issue with me. I could not find a solution and hence raised post on this forum and looks like the other guy also raised a post.

I have read your reply and have one query. What is the difference between installing the lamp stack, by separately installing each component and installing xampp as a combined package. Do both serve the same purpose or is one better than the other, or has more advantages. Can both help equally to meet all our requirements or do we particularly need xampp for certain requirements.

Regards
Rahul
rahuliq
 
Posts: 6
Joined: 22. February 2013 15:22
Operating System: CentsOS 6.3 64 bit

Re: upgrade only php in existing lampp

Postby JonB » 25. March 2013 11:45

The problem with XAMPP/lampp is that the 'installlers' (in the case of Centos [RHEL based] - usually 'yum' - 'apt' for Debian based distros) for Linux distributions are unaware that lampp is installed. Remember, all you do is copy the files into /opt/lampp, there is no installation really.

http://en.wikipedia.org/wiki/RPM_Package_Manager

Normally to update one 'piece' of a traditional LAMP stack you would find a repository that had the component you needed (in the case of Centos - a .rpm file). This file knows all the individual components that are needed to upgrade (dependencies) and where to look for them. The installer file knows where to look for them because starting from when the distribution version was put together, everything that has been installed has been put in the standard location (filesystem path) for that Linux distribution. So, if you wanted to upgrade PHP, it would look in the database of installed files and libraries and determine what needed to be added/updated to make the new PHP version work.

Now comes the problem - the installer doesn't know where to find 'lampp' or its parts. Some minor things can be fixed (compiling a single library or .SO [Shared Object] -- although they would need to be 'transplanted') or updating phpMyAdmin (which is relatively independent of xampp), but Apache, PHP and MySQL may need to be re-compiled. That is nearly impossible, as you don't have all the information needed as to the state of the system as a whole.

The very most basic problem is that XAMPP/lampp is a silent installation that puts all of its components into non-standard locations. That is the downside, the upside is you can instantly start work, you don't have to run all the installs/upgrades - because all of XAMPP's dependencies have been resolved in the package - look in the opt/lampp folders - everything needed is there.

The short analysis is - if you need to change components at will, you should always use an installer based LAMP stack, if you need a quick installation for testing and development with a single stable environment made of the same, matched 'pieces' - XAMPP/lampp is a good solution.

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Can you upgrade only php in existing lampp???

Postby xgecemx » 15. September 2023 19:03

Hey Rahul!

Ah, the classic LAMPP PHP upgrade conundrum! I've danced this dance before.

Alright, so upgrading just the PHP can be a bit tricky, especially if you don't want to mess with the whole stack. Here's a general approach:

Backup Everything: First and foremost, back up your current LAMPP configuration, databases, and everything else you hold dear. Can't stress this enough!

Download and Extract: Head to the official PHP site and grab the version you're looking for (5.4.13 in your case). Extract the downloaded archive.

Replace the Old with the New: Navigate to your lampp folder (typically it's /opt/lampp). Find the php directory and rename it to something like php_old for safety. Then, copy the extracted PHP folder from step 2 into the lampp directory and rename it to php.

Config Tweaks: Now, there might be some paths and configs you'll have to adjust in your new PHP folder, especially in the php.ini file. Make sure it lines up with the settings from your old PHP config.

Test it Out: Restart the LAMPP services and check your PHP version using php -v in the terminal. If everything is golden, you're good to go! If not, you can always revert back using the php_old backup.

That said, remember this is a bit of a hacky way and might not be perfect. Also, keeping older versions could potentially have security risks. But I totally get it if you've got certain constraints and can't upgrade the whole stack.

Hope that points you in the right direction! Cheers, and happy coding!
xgecemx
 
Posts: 2
Joined: 15. September 2023 18:59
XAMPP version: 1.8.3-3
Operating System: Linux

Re: Can you upgrade only php in existing lampp???

Postby Nobbie » 15. September 2023 20:55

@xgecemx:

You answered to a ten(!) years old posting, are you aware of that?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Can you upgrade only php in existing lampp???

Postby xgecemx » 18. September 2023 14:53

Yes,I am
xgecemx
 
Posts: 2
Joined: 15. September 2023 18:59
XAMPP version: 1.8.3-3
Operating System: Linux


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 30 guests