PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Sep 20, 2019 10:46 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Feb 19, 2015 5:14 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179


Top
 Profile  
 
PostPosted: Thu Feb 19, 2015 5:26 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
CentOS 5 is old. Any reason you're targeting that? CentOS 7 is current.

_________________


Top
 Profile  
 
PostPosted: Thu Feb 19, 2015 8:14 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
Follow the instructions at that link for yum install mysql httpd php. Installing from source is only necessary if you need very fine-grained control of the configuration of those pieces of software. 99.9% of the time the packages are fine -- and much, much easier to maintain.

And yes, upgrade to CentOS 7.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 6:03 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 7:22 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Yum works the same across all distributions that use it.
Syntax: [ Download ] [ Hide ]
$ yum search foo
$ yum install foo

etc. There's no real learning/upgrade curve there. Yum is yum. My more immediate concern would be the version of PHP you'll be stuck with. CentOS, I believe, shipped with 5.1 and later upgraded to 5.2. You may be able to find more recent versions, you may not. The big problem here, in addition to security issues (last release of 5.2 was four years ago), is that your code made just not work. Namespaces and closures weren't available until 5.3. Traits and short array syntax until 5.4. Additionally, I'd be a little concerned about a VPS offering CentOS 5. 6 is fine. 6.6 was released a few months ago. Anyway, just my two cents.

_________________


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 8:28 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
Thanks Celauran, I sent an email to the support people at my host company suggesting they upgrade to CentOS 6 (after I researched their VPS upgrade levels more closely finding they were all CentOS 5 and after my research told me all except one open source control panel package needed CentOS 6 to run). They thanked me for my suggestion. I was about to send them the link to this thread as supporting evidence for my earlier suggestion to them. So your suggestions may be very helpful not just to me but to others looking for a company that is very competitive in some ways but is not keeping up with the industry that well. For me it is a learn on the fly thing. I did not even know CentOS 6 and CentOS 7 existed until this week and I signed up for the service last Friday (Only a $11.24 USD one month investment so not a big loss and it makes you learn faster once you have paid it). I am probably well over 2000 Google searches this week - LOL. Your concerns about my PHP code not working has been my concern all along since even going back to PHP 5.4 causes one command to not work. For me to be able to afford the hosting companies that have VSP on CentOS 6, I need to enact some money saving Phone and Internet changes (Specifically dumping Bell internet for TechSavyy and dumping Bell/Rogers phone for Wind). I was going to delay this until I did the install and I saw how much of my PHP code broke. But after reading your response I may just do it much faster (like today). I was not going to point the domain name at my website until March 20th after testing it for at least a week (myself and 2 friends accessing it via the IP address to test it first). Never having a website before, I don't know how many people might discover it when it is out there only accessible by IP address. Even if 10 people find it over a month and the website is breaking like crazy due to a PHP 5.2 install maybe this is not good. It just occurred to me that even if I sign up with a CentOS 6 hosting company and I put my website out there tested on PHP 5.5.? it may break and I really have no way of doing a test at home unless I can roll back my home install to match it. Either that or I need to be able to get NetBeans out on the VSP so I can step the code. I was thinking I could download the database, test it at home, ship up the new pages or whatever and do it that way. Just another reason to try and get PHP 5.5.? up at the website. (thinking on the fly) Is there any way to bring PHP up to 5.5/? after a yum install of a lower version? I was trying before but I have yet to find the Yum param file to figure out how it points at the place where it gets its data for the install (most likely effecting the versions that are picked up). If I could find this and point it at a site that has a new version of PHP install which would still run on CentOS 5 that would be ideal (assuming PHP 5.5.? can run on CentOS 5).


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:34 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
Finally found the yum param file location. Nice to have a good google hit now and then.
Google search: "change yum repository"
First Hit: https://www.google.ca/webhp?sourceid=ch ... repository
First line: The configuration file for yum and related utilities is located at /etc/yum.conf (more details in the paragraph)

So now maybe the xampp forum will be full of people who have just developed websites with the latest PHP versions asking the same question. "Where to I point yum at to get the latest PHP and will it run on CentOS 5.? under Xen VPS."


Last edited by bowlesj on Fri Feb 20, 2015 9:39 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:37 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
You generally don't. Your distro will handle that for you. As bug fixes and security patches come in, they will be updated in your distro's repository and available through yum. If you're stuck with a really old version of PHP due to CentOS, you can check out .

_________________


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 9:47 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
Thanks Celauran, So do I understand this correctly? (reading the Remi FAQs now so that may answer these assuptions).
Assumption #1: "the repo takes care of the details of upgrades to PHP etc and some repos do it better than others so you can go into the yum configuration file (which I have not studied yet obviously) and change it to point to a different repo such as Remi's?"
Assumption #2: "The people at the repos are experts in the installs, they do the installs and they verify they work so they run yum in such a way as to put everything in the distribution so they can share the successful install with others via the yum utility."


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:12 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
CentOS especially values stability above all else. By the time a package makes its way into their repos, you can be sure it's tested and stable. The flip side to this is that CentOS packages do tend to be dated. Rémi tries to address that and does a brilliant job of it. All of PHP servers at the office use his repos and we haven't encountered any issues.

_________________


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:27 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
Thanks Celauran. Google really is amazing. After doing a quick review of the remi site FAQs I did this google search "change yum to Remi Repository" and the first hit was the remi guide below.
http://blog.famillecollet.com/pages/Config-en. Okay, so I will run the yum tutorial I mentioned in the first post, find the versions I get and if needed use remi. I think I have the command to uninstall first "yum uninstall whatever" (extracted from my very first post).


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 10:30 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Syntax: [ Download ] [ Hide ]
$ yum remove packagename

Unless there's some aliasing I'm unaware of, uninstall won't work.

_________________


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 3:43 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179


Last edited by bowlesj on Fri Feb 20, 2015 4:12 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 4:10 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Syntax: [ Download ] [ Hide ]
PHP 5.1.6
Server version 5.0.95

Oh yeah, you need to update that.

_________________


Top
 Profile  
 
PostPosted: Fri Feb 20, 2015 4:13 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 179
A correction. I must have had a bad character in my phpinfo file. I deleted it and recreated it and now I get the proper PHP status page. So everything worked except that 2nd MySql password entry. Tomorrow I will upgrade the PHP version after a good nights sleep.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group