缺少openssl扩展(Composer安装openSUSE)

时间:2017-01-27 19:08:59

标签: php laravel composer-php php-openssl

我从作曲家网站下载了作曲家安装程序文件 我尝试使用命令安装它:

 ~> php installer

输出:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

我修改了php.ini文件并删除了; extension=php_openssl.dll前面的apache2 然后我重新启动了我的class Template { /** * Config * * @access private */ private static $config; /** * Path templates * * @access private */ private $tpl_path = null; /** * Values * * @access private */ private $values = array(); /** * Constructor * * @access public */ public function __construct($tpl_path) { self::$config = config_load('template'); $this->tpl_path = $tpl_path; } /** * Set a template variable * * @access public */ public function set($name, $value = null) { if(is_array($name)) { foreach ($name as $key => $value) { $this->values[$key] = $value; } } else { $this->values[$name] = $value; } } /** * Display the template file * * @access public */ public function display($template) { if ($this->values) { extract($this->values); } if (file_exists($this->tpl_path . $template . self::$config['template_extension'])) { ob_start(); include($this->tpl_path . $template . self::$config['template_extension']); $output = ob_get_contents(); ob_end_clean(); } else { die('Template file '. $this->tpl_path . $template . self::$config['template_extension'] . ' not found.'); } if ($output) echo $output; } } ?> serever,但它仍然是相同的错误消息。

1 个答案:

答案 0 :(得分:1)

解决了问题。

尝试输入命令

$ zypper install php5-openssl