本站首页    管理页面    写新日志    退出


«October 2019»
12345
6789101112
13141516171819
20212223242526
2728293031


公告

戒除浮躁,读好书,交益友


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:邢红瑞的blog
日志总数:523
评论数量:1142
留言数量:0
访问次数:9313930
建立时间:2004年12月20日




[opensource]安装php5
原创空间,  文章收藏,  软件技术,  电脑与网络

邢红瑞 发表于 2011-5-26 16:55:04

 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-xml --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/lib  --with-zlib --disable-debug --enable-safe-mode --enable-trans-sid --enable-memory-limit --enable-short-tags --disable-posix --enable-exif --enable-ftp --enable-sockets --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl make make install make clean cp php.ini-dist /usr/local/lib/php.ini 编辑php.ini文件: 查找: ;default_charset = "iso-8859-1" 在这行下面加一行 default_charset = "gbk" 不能把AddType application/x-httpd-php .php 直接加入httpd.conf文件启动apache出现Invalid command 'AddType', perhaps misspelled or defined by a module not included in the server configuration加入<IfModule mime_module>    #    # TypesConfig points to the file containing the list of mappings from    # filename extension to MIME-type.    #    TypesConfig conf/mime.types     #    # AddType allows you to add to or override the MIME configuration    # file specified in TypesConfig for specific file types.    #    #AddType application/x-gzip .tgz    #    # AddEncoding allows you to have certain browsers uncompress    # information on the fly. Note: Not all browsers support this.    #    #AddEncoding x-compress .Z    #AddEncoding x-gzip .gz .tgz    #    # If the AddEncoding directives above are commented-out, then you    # probably should define those extensions to indicate media types:    #    AddType application/x-compress .Z    AddType application/x-gzip .gz .tgz    AddType application/x-httpd-php .php    #    # AddHandler allows you to map certain file extensions to "handlers":    # actions unrelated to filetype. These can be either built into the server    # or added with the Action directive (see below)    #    # To use CGI scripts outside of ScriptAliased directories:    # (You will also need to add "ExecCGI" to the "Options" directive.)    #    #AddHandler cgi-script .cgi     # For type maps (negotiated resources):    #AddHandler type-map var     #    # Filters allow you to process content before it is sent to the client.    #    # To parse .shtml files for server-side includes (SSI):    # (You will also need to add "Includes" to the "Options" directive.)    #    #AddType text/html .shtml    #AddOutputFilter INCLUDES .shtml</IfModule><IfModule dir_module>    DirectoryIndex index.html index.php</IfModule>修改httpd.conf加入LoadModule authz_host_module modules/mod_authz_host.soLoadFile /usr/lib/libxml2.soLoadModule mime_module  modules/mod_mime.so LoadModule php5_module        modules/libphp5.so否则会出现[Thu May 26 22:22:22 2011] [error] [client 192.168.100.216] Attempt to serve directory: /usr/local/apache2/htdocs/[Thu May 26 22:39:47 2011] [notice] caught SIGTERM, shutting down[Thu May 26 22:39:50 2011] [notice] Apache/2.2.17 (Unix) PHP/5.2.17 configured -- resuming normal operations[Thu May 26 22:43:07 2011] [notice] caught SIGTERM, shutting down  


阅读全文(5191) | 回复(-3) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.031 second(s), page refreshed 144320919 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号