Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: DanB35 on July 13, 2015, 09:55:30 PM

Title: Software collections - PHP at the command line?
Post by: DanB35 on July 13, 2015, 09:55:30 PM
I hope that subject line makes sense...

tl;dr: How can I use a software collections version of PHP (e.g., PHP 5.5) to run a script at the command line?

Background:

I have Owncloud 8.0.4 installed on my SME 9.0 server, and I'm using software collections to enable PHP 5.5 on the ibay that houses owncloud.  Owncloud 8.1 has been released, and upgrading to 8.1 is going to require that I install the upgrade from the shell.

As part of the upgrade, there are a couple of PHP migration scripts that need to be run.  They can be run from the owncloud web interface, but they will time out if there's too much data to process.  So, the owncloud documentation recommends running them from the shell instead.  But when I run "php somefile.php", the system PHP version (5.3.3) is run, not the version specified for the ibay.
Title: Re: Software collections - PHP at the command line?
Post by: Daniel B. on July 13, 2015, 10:22:32 PM
It should be:

Code: [Select]
scl enable php55 'php -v'
Title: Re: Software collections - PHP at the command line?
Post by: DanB35 on July 13, 2015, 10:37:05 PM
Code: [Select]
[root@e-smith ~]# scl ebable php55 'php -v'
warning: /opt/remi/php55//ebable scriptlet does not exist!
Edit: it would help if I could type--"enable", not "ebable"...
Title: Re: Software collections - PHP at the command line?
Post by: DanB35 on July 14, 2015, 12:08:30 AM
Once I managed to type it correctly, that did the trick.  Thanks!
Title: Re: Software collections - PHP at the command line?
Post by: stephdl on July 14, 2015, 06:47:27 PM
@dan i'm out of home...can you add this to the relevant wiki page ... Merci.
Title: Re: Software collections - PHP at the command line?
Post by: Daniel B. on July 14, 2015, 07:15:23 PM
Done, see http://wiki.contribs.org/index.php?title=Software_Collections_Repositories&diff=28176&oldid=27627
Title: Re: Software collections - PHP at the command line?
Post by: guest22 on July 15, 2015, 01:28:57 AM
That directive was already on each individual software collection wiki page. One needs to read the carefully crafted wiki pages.

The usage of a scl collection application has no place on a repo page. It is related to a general understanding on how to use software collections. We can not take responsibility on documentation that is already documented elsewhere.

The Software applications wiki page is already pointing to proper documentation. Has nothing to do with anything SME Server specific.
Title: Re: Software collections - PHP at the command line?
Post by: stephdl on July 15, 2015, 09:21:08 AM
Thanks dani and hsf....as i alway said...the most important is not to write the information elsewhere in the wiki...it is to write it where the the sysadmin needs it.

After installing the contrib, it makes senses to write this there since that it is needed by dan but mayne we can do a proper chapter for that

@dan any chance to get a wiki page on how install owncloud8 on sme9. I will be interested ;)
Title: Re: Software collections - PHP at the command line?
Post by: DanB35 on July 15, 2015, 03:56:37 PM
@dan any chance to get a wiki page on how install owncloud8 on sme9. I will be interested ;)
I'd be glad to, but I think the existing wiki page (http://wiki.contribs.org/OwnCloud) pretty well covers it.  Was there something you felt was missing from that page?
Title: Re: Software collections - PHP at the command line?
Post by: stephdl on July 16, 2015, 10:22:53 AM
I think that owncloud 8 need to be tricked if you want to install it. You need a major php version, run scripts....maybe that could be interesting to get a separated page

I would be interested by the migration scripts that you talked about....some detailled steps and hint to the owncloud documentation.

What do you think dan ?
Title: Re: Software collections - PHP at the command line?
Post by: Daniel B. on July 16, 2015, 10:24:38 AM
My only opinion on this is that it should be discussed in another thread. I personally don't use nor like OwnCloud, so I can't comment :-)