我正在尝试安装phpbrew扩展,因为以下错误:
Fatal error: Call to undefined function imap_open() in /var/www/html/mainframe/mailer.php on line 30
在运行安装功能后,我在CLI窗口中收到了以下信息:
安装代码:
phpbrew extension install imap
结果:
PHP: syntax error, unexpected '(' in /home/COMPUTERNAME/.phpbrew/php/php-5.5.10/etc/php.ini on line 8
===> Installing imap extension...
Log stored at: /home/COMPUTERNAME/.phpbrew/build/php-5.5.10/ext/imap/build.log
Changing directory to /home/COMPUTERNAME/.phpbrew/build/php-5.5.10/ext/imap
===> Phpize...
===> Configuring...
Exception: Command failed: ./configure --with-php-config=/home/COMPUTERNAME/.phpbrew/php/php-5.5.10/bin/php-config >> /home/COMPUtERNAME/.phpbrew/build/php-5.5.10/ext/imap/build.log 2>&1 returns
Trace:
0) PhpBrew\Utils::system('./configure --with-php-config=/home/COMPUTERNAME/.phpbrew/php/php-5.5.10/bin/php-config >> /home/COMPUTERNAME/.phpbrew/build/php-5.5.10/ext/imap/build.log 2>&1', CLIFramework\Logger)
1) PhpBrew\Extension\ExtensionInstaller->install(PhpBrew\Extension\M4Extension, [])
2) PhpBrew\Extension\ExtensionManager->installExtension(PhpBrew\Extension\M4Extension, [])
3) PhpBrew\Command\ExtensionCommand\InstallCommand->execute('imap')
4) call_user_func_array([PhpBrew\Command\ExtensionCommand\InstallCommand, 'execute'], ['imap'])
5) CLIFramework\CommandBase->executeWrapper(['imap'])
6) CLIFramework\Application->run(['/usr/bin/phpbrew', 'extension', 'install', 'imap'])
7) CLIFramework\Application->runWithTry(['/usr/bin/phpbrew', 'extension', 'install', 'imap'])
8) require('phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php')
根@大型机:〜#
答案 0 :(得分:0)
确保使用phpbrew php版本。您可以使用phpbrew列表查看当前使用的php版本的内容。