Author Topic: Upgrade problem (installto.sh) - Not on the "shell" (php-cli)  (Read 4111 times)

Offline zlp

  • Newbie
  • *
  • Posts: 7
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« on: February 07, 2012, 01:10:25 PM »
I'm a longtime roundcube user who usually upgrades manually. Now I'm trying the script method:

I'm on bluehost shared hosting with SSH enabled. I logged into my account and followed the directions in the UPGRADING document, but installto.sh doesn't run. It throws this error:
   Not on the "shell" (php-cli).[my username]@[mydomain.com]
(bracketed stuff is edited for privacy)
I've checked permissions on the script (755) and successfully ran a test script that just reports phpinfo. What am I doing wrong?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #1 on: February 07, 2012, 04:36:43 PM »
Run a php file with the following code from the shell:
Code: [Select]
<?php
echo php_sapi_name();
?>


Offline zlp

  • Newbie
  • *
  • Posts: 7
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #2 on: February 07, 2012, 07:11:45 PM »
Thanks for the quick reply! The result of "php_sapi_name()" is "cgi-fcgi".
This seems odd to my noobie mind because fast cgi is not selected in CPanel. (It's set to "PHP5 with a single php.ini file in public_html".)
The plot thickens?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #3 on: February 08, 2012, 04:24:19 AM »
Very odd that should output "cli" when running the script over ssh, if your sure your running in the shell I'd try removing the:
Code: [Select]
if (php_sapi_name() != 'cli') {
  die('Not on the &quot;shell&quot; (php-cli).');
}
check at the top of /program/include/clisetup.php and see if that works.

Offline zlp

  • Newbie
  • *
  • Posts: 7
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #4 on: February 09, 2012, 01:03:46 AM »
Thanks for your help. I'll try disabling the check tomorrow. I also started a ticket at bluehost to ask why php over ssh is running in fast cgi instead of cli. More later.

Offline zlp

  • Newbie
  • *
  • Posts: 7
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #5 on: February 10, 2012, 12:29:23 AM »
After disabling the CLI check, the script starts but it exits immediately after printing this:
Upgrading from 0.7. Do you want to continue? (y/N)
Update cancelled. See ya!


Also, Bluehost responded: "We do not run mod_php as an Apache module for php.  We do actually run PHP as CGI/FCGI as can be seen here:
phpinfo() "

Any thoughts or should I got back to manual upgrade?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,568
    • http://SKaero.com/
Upgrade problem (installto.sh) - Not on the "shell" (php-cli)
« Reply #6 on: February 10, 2012, 04:03:44 AM »
I'm going to guess that it just isn't going to work the way the server is setup so the manual upgrade is probably the best way forward.