我正在尝试设置我的config.yaml,这样我可以在执行流浪之后立即使用PHP的ImageMagick库。目前我可以让它工作的唯一方法是在启动服务器和SSH之后手动安装所有软件包。当尝试通过vagrant安装时,它会安装软件包,但是PHP无法识别库原因。
我正在使用Vagrant 1.8.4。
以下是我在config.yaml中执行的相关配置:
服务器配置
server:
install: '1'
packages:
- vim
- htop
- git
- tmux
- pv
- imagemagick
PHP配置
php:
install: '1'
settings:
version: '55'
modules:
php:
- cli
- cgi
- intl
- imagick
pear: { }
pecl: { }
ini:
engine=On: '0'
engine: 'On'
short_open_tag: 'On' # We still use this in some places; also (bad) libraries might use this
asp_tags: 'Off'
precision: '14'
output_buffering: '4096'
zlib.output_compression: 'Off'
implicit_flush: 'Off'
serialize_precision: '17'
disable_functions: 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_│+ wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,'
zend.enable_gc: 'On'
expose_php: 'On'
max_execution_time: '30'
max_input_time: '60'
memory_limit: 128M
error_reporting: 'E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING'
display_errors: 'Off' # Only turn on in personal VM
display_startup_errors: 'Off' # Only turn on in personal VM
log_errors: 'On'
log_errors_max_len: '1024'
error_log: /var/log/php/php.log # We have to log errors to a place that has write permissions for www-user (Apache user)
ignore_repeated_errors: 'Off'
ignore_repeated_source: 'Off'
report_memleaks: 'On'
track_errors: 'Off'
html_errors: 'On'
variables_order: GPCS
request_order: GP
register_argc_argv: 'Off'
auto_globals_jit: 'On'
post_max_size: 8M
default_mimetype: text/html
enable_dl: 'Off'
file_uploads: 'On'
upload_max_filesize: 2M
max_file_uploads: '20'
allow_url_fopen: 'On'
allow_url_include: 'Off'
default_socket_timeout: '60'
cli_server.color: 'On'
SMTP: localhost
smtp_port: '25'
mail.add_x_header: 'On'
sql.safe_mode: 'Off'
odbc.allow_persistent: 'On'
odbc.check_persistent: 'On'
odbc.max_persistent: '-1'
odbc.max_links: '-1'
odbc.defaultlrl: '4096'
odbc.defaultbinmode: '1'
ibase.allow_persistent: '1'
ibase.max_persistent: '-1'
ibase.max_links: '-1'
ibase.timestampformat: '%Y-%m-%d %H:%M:%S'
ibase.dateformat: '%Y-%m-%d'
session.save_handler: files
session.use_cookies: '1'
非常感谢任何帮助。
答案 0 :(得分:1)
仅供参考,原来我们正在安装php5-imagick而不是php5.6-imagick,这产生了巨大的变化。我不确定为什么通过apt-get安装可以更好地处理这种差异。