[Solved] Error executing pear commands “PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0″

I have php5, php5-cli, and php-pear installed on my system. I was trying to install pear package phing from the pear installer. Whenever I tried to run pear commands like

pear channel-discover

I got an error message stating

PHP Deprecated:  Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0

Well, The solution I tried that worked was I edited the mcrypt.ini file located at /etc/php5/cli/conf.d/mcrypt.ini

It contained

# configuration for php MCrypt module
extension=mcrypt.so

I replaced the comment initializer “#” with “;” as in

; configuration for php MCrypt module
extension=mcrypt.so

And it worked just fine!

11 Comments

  1. joel says:

    Gracias..

  2. John says:

    Thanks for sharing that Nitesh. Worked for me also.

  3. matias says:

    gracias!!!

  4. wassim sabry says:

    it’s works thanks alot.

  5. serge says:

    great fix ;-)

  6. Ali Ramzan says:

    thank you its works for me

  7. John Isaacks says:

    Thanks this worked for me as well. I thought this was going to be a hard fix, but you made it easy on me. :)

  8. Red Five says:

    At first I thought this was something in the CLI script I was running, which had #!/usr/bin/env php at the top, but I tried editing the files throwing the errors and it solved the problem. Thanks!

  9. Telnet says:

    it works just fine Thank you dude!!!

  10. vir0e5 says:

    wow….nice trik… ^^

  11. vijay says:

    Thanks for sharing. It works for me too.

Leave a Reply