• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: PHP error when trying to install SheevaPlug Installer v1.0  (Read 3026 times)
bananaplug
Newbie
*

Karma: 0
Posts: 5


View Profile
« on: May 06, 2010, 03:03:37 PM »

Hi, I have a globalscale SheevaPlug and I am trying to upgrade to the SheevaPlug Installer v1.0 as recommended by the Wiki.

When I run the runme.php on my Ubuntu host, I get some errors:

root@apatosaurus:/home/john/Downloads/sheevaplug-installer-v1.0# php runme.php nand
PHP Notice:  Undefined index: OS in /home/john/Downloads/sheevaplug-installer-v1.0/runme.php on line 7
PHP Notice:  Undefined index: USER in /home/john/Downloads/sheevaplug-installer-v1.0/runme.php on line 43
You must run this as root

I realized after reading the runme.php file that this is due to PHP somehow not being able to read the environment variables. I suppose I could modify that file and bypass the check for current user, but I'd like to understand why I'm getting this error.

By the way, I could read the same environment variable if I run it like this:
# php -r 'echo $_SERVER["USER"];'
root

but just not with the environment variable like $_ENV["USER"]

Any help is appreciated!

Ubuntu 10.04
PHP 5.3.2-lubuntu4 with Suhosin-Patch (cli) (built: Apr 9 2010 08:23:39)
« Last Edit: May 06, 2010, 03:49:39 PM by bananaplug » Logged

marcus
Jr. Member
**

Karma: 5
Posts: 83


View Profile
« Reply #1 on: May 09, 2010, 06:10:18 AM »

So you are executing on an Ubuntu 10.04 host, as root?

FWIW, I just tried (on my own Ubuntu 10.04) using sudo, and got the same errors. Presumably this is down to a change in PHP.
Logged

bananaplug
Newbie
*

Karma: 0
Posts: 5


View Profile
« Reply #2 on: May 11, 2010, 02:38:20 PM »

Yes, I'm on ubuntu 10.04. I first tried sudo php runme.php nand, but that didn't work, so I did "sudo su".

Well, this question may not be that significant since I was able to proceed by commenting some lines out in runme.php. But, I imagine some others may run into the same issue. For reference, this is what I did:

Comment out line 43 and 44 of runme.php like so

Code:
#    if ($_ENV["USER"] != 'root')
#        die("You must run this as root\n");
Logged

Pages: [1]
Print
Jump to: