Koozali.org: home of the SME Server

Software collections - PHP at the command line?

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Software collections - PHP at the command line?
« 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.
......

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Software collections - PHP at the command line?
« Reply #1 on: July 13, 2015, 10:22:32 PM »
It should be:

Code: [Select]
scl enable php55 'php -v'
C'est la fin du monde !!! :lol:

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software collections - PHP at the command line?
« Reply #2 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"...
« Last Edit: July 13, 2015, 10:38:38 PM by DanB35 »
......

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software collections - PHP at the command line?
« Reply #3 on: July 14, 2015, 12:08:30 AM »
Once I managed to type it correctly, that did the trick.  Thanks!
......

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Software collections - PHP at the command line?
« Reply #4 on: July 14, 2015, 06:47:27 PM »
@dan i'm out of home...can you add this to the relevant wiki page ... Merci.
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!


guest22

Re: Software collections - PHP at the command line?
« Reply #6 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.

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Software collections - PHP at the command line?
« Reply #7 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 ;)
« Last Edit: July 15, 2015, 09:22:56 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Software collections - PHP at the command line?
« Reply #8 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?
......

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Software collections - PHP at the command line?
« Reply #9 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 ?
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Software collections - PHP at the command line?
« Reply #10 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 :-)
C'est la fin du monde !!! :lol: