Posted in PHP, Apache at 20:29 Author:仲远


最近需要用到PHP扩展Zlib,却发现原来安装的PHP扩展中没有Zlib,于是只好想办法安装Zlib。上网搜索了“如何安装php扩展”,结果都不好使。于是只好自己探索,由于我们原来的PHP是使用源码安装的,和使用ports安装的php位置以及配置都不同,因此直接在Ports中安装完Zlib还不起作用。上网查了查资料,说是直接修改php.ini也可以,于是我就尝试修改了php.ini , 将其中的extension=php_zip.dll 前的”;” 去掉,再改为extension = /usr/local/lib/php/20060613/zlib.so 。退出保存。


后来不经意地发现,重启了一下apache,zlib扩展成功载入!所以以后大家记得增加PHP扩展一定要重启apahce哦!不过可能需要重启apache的原因是因为我直接修改了php.ini ,如果是修改 extensions.ini ,或许就不用了吧?

转载自仲子说 [ http://www.wangzhongyuan.com/ ]


  1. tc said,

    2007年June7日 at 16:00


  2. 阿斯顿 said,

    2008年April16日 at 20:23


  3. 仲远 said,

    2008年April17日 at 9:10


  4. 91Sherrill said,

    2017年April5日 at 18:29

    I must say you have very interesting articles here. Your blog should go
    viral. You need initial traffic only. How to get it?
    Search for; Miftolo’s tools go viral

  5. DeandreConne said,

    2017年April13日 at 12:52

    I see your site needs some fresh & unique content.
    Writing manually is time consuming, but there is solution for this hard task.

    Just search for: Miftolo’s tools rewriter

  6. PM Deneen said,

    2017年May19日 at 14:32

    It’s a shame you don’t have a donate button! I’d definitely donate to this excellent blog!
    I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will talk about this blog with my Facebook group.

    Talk soon!

  7. tabletki na odchudzanie Shaun said,

    2017年May20日 at 17:33

    I want to to thank you for this fantastic read!! I certainly enjoyed every bit of it.

    I’ve got you bookmarked to look at new things you post…

Leave a Comment

To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word