Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

[ANSWER AT THE END OF THIS POST]

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?

ANSWER (I can't post an answer to my own post yet):

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.

share|improve this question
    
I can't post an answer to my own post Yes you can. –  yannis May 31 at 9:28
add comment

1 Answer

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.

share|improve this answer
    
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 0:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.