User avatar
D.E.L.B.
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
Contact: Website

Can't launch SH files

Fri Sep 07, 2012 2:16 pm

Hey, I was wondering if anyone would be able to help me. My problem is that when I try to do the command: ./start.sh or whatever, it keeps bringing me up with this:

Code: Select all

Usage: php [options] [-f] <file> [--] [args...]
       php [options] -r <code> [--] [args...]
       php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
       php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
       php [options] -- [args...]
       php [options] -a

  -a               Run interactively
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse and execute <file>.
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -r <code>        Run PHP <code> without using script tags <?..?>
  -B <begin_code>  Run PHP <begin_code> before processing input lines
  -R <code>        Run PHP <code> for every input line
  -F <file>        Parse and execute <file> for every input line
  -E <end_code>    Run PHP <end_code> after processing all input lines
  -H               Hide any passed arguments from external tools.
  -s               Output HTML syntax highlighted source.
  -v               Version number
  -w               Output source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.

  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin

  --ini            Show configuration file names

  --rf <name>      Show information about function <name>.
  --rc <name>      Show information about class <name>.
  --re <name>      Show information about extension <name>.
  --ri <name>      Show configuration for extension <name>.
Now, I have been messing around with update-rc.d lately, and I was wondering if anyone would know what I've done that I can't seem to figure out, I was wanting to test out Raspcontrol but now I can't since I can't launch that specific SH file for Raspcontrol to work.

Thanks!

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Can't launch SH files

Fri Sep 07, 2012 2:35 pm

I assume that the start.sh file in question is set to be executable so that the error message is from the script itself?

You might find that doing the command

Code: Select all

sh -x ./start.sh
allows you to see exactly what command is going wrong.

User avatar
jojopi
Posts: 3287
Joined: Tue Oct 11, 2011 8:38 pm

Re: Can't launch SH files

Fri Sep 07, 2012 2:42 pm

The problem is that your version of php does not support the -S option. Raspcontrol needs php 5.4. What distro are you using, and what do "php -v" and "php5 -v" say?

User avatar
D.E.L.B.
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
Contact: Website

Re: Can't launch SH files

Fri Sep 07, 2012 3:28 pm

php -v:
PHP 5.3.3-7+squeeze8 with Suhosin-Patch (cli) (built: Feb 10 2012 17:00:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

php5 -v:
PHP 5.3.3-7+squeeze8 with Suhosin-Patch (cli) (built: Feb 10 2012 17:00:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

User avatar
D.E.L.B.
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
Contact: Website

Re: Can't launch SH files

Fri Sep 07, 2012 4:17 pm

I'm using Debian Squeeze. I tried doing sudo apt-get install php5 but the version remains the same.

Return to “Troubleshooting”