-1

I just installed the php5-cli package in Ubuntu 11.04. If I run:

/usr/bin/php5 -a    # The -a is for interactive mode

I get the output: Could not startup.. However, if I add the -n option, which makes it ignore the php.ini file, everything works fine. The php.ini file is basically the default one, with some minor changes (memory limit, error reporting level, etc.).

Any ideas?

Vinicius Pinto
  • 113
  • 2
  • 6

2 Answers2

3

It would seem fairly likely that you've made a mess of your php.ini. Comment out one change at a time until it starts working again, then leave that change commented and uncomment one chang at a time. If it stops working again, then leave that one commented and continue. Once you've got only the known troublemakers commented out, you can then work on those problematic configuration items one by one until they both work, and do what you want to do.

womble
  • 95,029
  • 29
  • 173
  • 228
  • Thanks, but the changes are fine (PHP is working with Apache). I tried using a clean php.ini for CLI, but I'm still getting that cryptic error. – Vinicius Pinto Aug 15 '11 at 00:25
0

Well, turns out php-cli wasn't finding the php.ini file (and for some reason didn't told me so :). Specifying it with the -c option did the trick.

Vinicius Pinto
  • 113
  • 2
  • 6