Aditya Ivaturi wrote: > I recently upgraded from redhat 8.0 to 9.0. I used the server install > option. And now I cannot use PHP on command line. It works fine through the > web. When I execute php on command line, it dumps the following > > Content-type: text/html > > PHP Warning: Function registration failed - duplicate name - imap_open in > Unknown on line 0
Apparently you (or Redhat) compiled the imap extension into the command line (CLI) PHP, but that same imap extension is also loaded from the php.ini that your CLI PHP uses. To find which php.ini is loaded by your CLI PHP: php -i | grep php.ini Than search for "imap", and probably you will find a line like: extension=imap.so Comment that one out, like so: ; extension=imap.so If you want/need to have a different configuration file for your CLI PHP, name it php-cli.ini (it will only be used by the CLI PHP). Regards... Michael