可以向 php 添加 GD 支持来中断网站服务吗?
对于一个网站,我需要添加一个小脚本,用于在 php 中调整图像大小。为此,我使用了 GD 函数。这在开发机器上运行得很好,问题是在生产中不起作用,因为没有安装 php GD 支持。 问题是,我不是服务器配置和维护方面的专家(我的经验主要是开发,在其他工作中其他人负责服务器,但是这家公司很小,所以......),我有有点担心,如果我简单地安装 php-gd 支持,生产服务器可能会出现问题。
任何建议将不胜感激。
For one website, I need to add a litle script who resize images in php. For that, I used the GD functions. That worked very well in the dev machine, the problem is that in production doesn't work because php GD support isn't installed.
The things is, I'am not expert in server configurations and maintenance (my experience is mostly develop, and in others jobs other people were in charge of the servers, but this company is very small, so...), and I have a little fear that, if simple I install php-gd support, something wrong could happens to the productions server.
Any advice would be greatly appreciate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然安装过程中可能会出现问题,但可以通过备份来缓解这种情况。我在 php 方面唯一能想象到的就是方法定义 - 如果有人定义了一个与预定义的 mod_gd 名称完全相同的方法,它就会崩溃。
如果您想真正确定:获取生产服务器的完整备份,将其安装在虚拟机中并测试向其添加 GD 支持。如果它不会破坏虚拟机安装,也不会破坏生产服务器。
While there is the possibility of something going wrong during the install, this can be mitigated by backups. Only thing I could imagine on the php side is concerning method definition - if somebody defined a method with the exact same name of a predefined mod_gd one, it will break.
If you want to be really sure: get a full backup of the production server, install it in a VM and test adding the GD support to it. If it doesn't break the VM install, it won't break the production server either.