Image processing - Apache image not displaying problem
迷茫
迷茫 2017-05-16 17:00:53
0
1
545

The server software is apache2.4, php7. The result picture shows garbled characters, which is the same as opening it with txt. It is probably a configuration problem, but I don’t know where the specific problem is. I hope you can give me some advice.

The picture shows the test connection: http://shouke.luopan.me/test.jpg

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
给我你的怀抱

The reason is that the mime type is not configured properly.
But the default /etc/mine.type should be fine, so I guess you deleted something in the apache configuration. /etc/mine.type 应该是好的,所以估计是你在apache的配置里删除了什么东西吧。
所以主要看,配置里有没有类似:TypesConfig /etc/mime.types的配置。
并且看一下mime模块有没有加载,类似与LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so 的配置
如果都有可能就是 你的 /etc/mime.types 有问题。可以在apache的配置里加一句。AddType image/jpeg .jpg .jpegSo the main thing to check is whether there is a configuration similar to: TypesConfig /etc/mime.types.

And check whether the mime module is loaded, similar to the configuration of LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so 🎜If so, it may be that your /etc/mime.types has it question. You can add a sentence to the apache configuration. AddType image/jpeg .jpg .jpeg. But this only solves the problem of jpg files. Since this should be good in the default configuration, but it is not working, so it is estimated that a certain configuration sentence has been deleted, resulting in the apache configuration that is not imported by default on the system)🎜
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!