<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post/2020/</link>
<title><![CDATA[在ARM Linux上使用Apache+PHP]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sun, 04 Oct 2009 04:15:45 +0000</pubDate> 
<guid>https://jackxiang.com/post/2020/</guid> 
<description>
<![CDATA[ 
	在ARM Linux上使用Apache+PHP<br/>我相信这篇文章同样是国内很难搜到的一个HOWTO（呵呵，截至到我写出来之前），我的最初目的是在ARM上使用PHP，尝试了Busybox的httpd，以及boa都没有办法很方便的和PHP接口，因此我狠下心来，编译了Apache。在ARM上使用PHP，好处仅仅是脚本比cgi好写一些，付出的代价是速度和蜗牛一样慢，不要指望很多人同时访问可以响应得过来。<br/>另外说件事，BLOG上的文章多了，经常发现有人转载，但是有的人却不注出处……难道要我吧我的名字和邮件地址写到文章的每一个部分吗？也许国人就是这样缺乏某种精神，在我看到的转载我文章的BLOG中，基本都是网上各种ARM Linux文章的集合，不可否认他们搜集的很好，但是看了这么多文章，连一点心得体会都没有么，写点原创的东西就这么难么？不管怎样，我还是坚持EE小站的风格——原创性。下面开始正题，本文分为三大部分，apache、php和配置。<br/> <br/>编译apache<br/>下载apache 1.3.39（1.3.41有些bug，没有办法交叉编译）<br/>下载地址http://apache.mirror.phpchina.com/httpd/apache_1.3.39.tar.bz2 <br/><br/> <br/>交叉编译apache总体上需要两个步骤：<br/>1.编译本机代码<br/>2.利用本机代码进行交叉编译<br/> <br/>这是因为编译apache时，需要使用编译生成的工具制作后续编译使用的头文件，交叉编译的工具当然没有办法在PC上运行，因此，需要借用本机编译生成的工具。假设为本机编译的apache代码已经解压缩到/home/lxz/apache-1.3.39-i586，为ARM编译的apache代码已经解压缩到/home/lxz/apache-1.3.39，交叉编译器arm-linux-gcc已设缺省路径，具体步骤还是用命令来说明：<br/> <br/># cd /home/lxz/apache-1.3.39-i586<br/># ./configure<br/> <br/>因为仅仅是借用下本机代码，所以不用设置配置参数，然后编译<br/> <br/># make<br/> <br/>等编译完成后，就可以配置交叉编译的apache了。apache的安装位置为/usr/local/apache<br/> <br/># cd /home/lxz/apache-1.3.39<br/># CC=arm-linux-gcc ./configure --prefix=/usr/local/apache<br/> <br/>会出来这样的提示，因为交叉编译的生成的testfunc这个工具不能在PC上执行，但可以不理会它<br/>./helpers/TestCompile: line 294: /home/lxz/apache-1.3.39/src/helpers/testfunc: cannot execute binary file<br/>打开/home/lxz/apache-1.3.39/src/main/Makefile这个文件，找到这两段代码<br/>uri_delims.h: gen_uri_delims<br/> ./gen_uri_delims &gt;uri_delims.h<br/>test_char.h: gen_test_char<br/> ./gen_test_char &gt;test_char.h<br/>修改为<br/>uri_delims.h: gen_uri_delims<br/> /home/lxz/apache-1.3.39-i586/src/main/gen_uri_delims &gt;uri_delims.h<br/>test_char.h: gen_test_char<br/> /home/lxz/apache-1.3.39-i586/src/main/gen_test_char &gt;test_char.h<br/>这里借用了刚才编译生成的本机代码里的工具，然后<br/> <br/># make<br/> <br/>这就编译好了，下面是安装。由于配置apache的时候“prefix”参数指定的安装位置是/usr/local/apache，在PC上，访问/usr/local是需要有root权限的，需要切换到root用户来进行安装。不建议将apache安装到一个随意的目录然后拷贝，因为这样会造成apache中的脚本调用位置的错误。当然，如果想要将apache安装到一个PC和ARM Linux都能访问的固定位置，如/home/lxz/apache也可以。<br/>如果你不明白上面这段话在说什么，那么请按照下面的步骤进行操作。请确认你的PC Linux上的/usr/local/apache这个目录不存在PC上使用的apache，否则下面的步骤会使你PC Linux上的apache不可用。<br/> <br/># su root<br/> <br/>输入密码<br/> <br/># cd /home/lxz/apache-1.3.39/<br/># make install<br/># exit<br/> <br/>别忘了用exit退出root用户模式，这样，apache的文件就被安装到PC上的/usr/local/apache了。接下来所要做的是将apache拷贝到ARM Linux根文件系统，假设ARM Linux根文件系统在PC上的位置为/home/lxz/root，其中已经有/usr/local这个目录<br/> <br/># cp -r /usr/local/apache /home/lxz/root/usr/local<br/> <br/>如果是一路看着我的BLOG建立起根文件系统的，接下来还必须建立nobody用户和nogroup组，因为apache拒绝使用root用户运行。具体来说就是在ARM Linux根文件系统上建立/etc/passwd和/etc/group两个文件，怎么写这两个文件，可以google下。它们的内容可以如下：<br/> <br/>/etc/passwd<br/>root::0:0:root:/:/bin/ash <br/>nobody::65534:65533:nobody:/:/bin/ash<br/>/etc/group<br/>nobody::65533:<br/>nogroup::65534:nobody<br/>root::0:<br/>users::100:<br/>当然，如果你的ARM Linux根文件系统中有这两个文件，那么你需要检查一下是不是有nobody用户和nogroup组。接下来，可以制作文件系统映像并测试apache是否可以正常工作了，还是用命令来说明。<br/> <br/># mkfs.cramfs /home/lxz/root /home/lxz/root.img<br/> <br/>我一直用cramfs，SUSE 10.2自己就带了mkfs.cramfs这个工具。烧写或者加载文件系统映像的步骤我就不说了，需要注意的是如果你使用了不可写的文件系统，如cramfs，需要把apache的日志路径挂载为临时文件目录，下面这几条命令在ARM Linux上执行。<br/> <br/># mount -t tmpfs tmpfs /usr/local/apache/log<br/> <br/>然后就可以启动apache了<br/> <br/># cd /usr/local/apache/bin<br/># ./apachectl start<br/> <br/>假设ARM板的ip地址是192.168.5.118，在浏览器里输入http://192.168.5.118:8080访问ARM板（不修改默认配置，服务端口是8080）。apache的配置一会儿编译了php再说。<br/><br/>编译php<br/>首先下载php-4.4.8，下载地址：http://cn2.php.net/get/php-4.4.8.tar.bz2/from/this/mirror <br/><br/>交叉编译php同样需要两个步骤：<br/>1.编译本机代码<br/>2.利用本机代码进行交叉编译<br/> <br/>原因我就不重复了，假设为本机编译的php代码已经解压缩到/home/lxz/php-4.4.8-i586，为ARM编译的php代码已经解压缩到/home/lxz/php-4.4.8，交叉编译器arm-linux-gcc已设缺省路径，具体步骤还是用命令来说明：<br/> <br/># cd /home/lxz/php-4.4.8-i586<br/># ./configure<br/># make<br/> <br/>在编译的同时，可以打开/home/lxz/php-4.4.8/configure这个文件，搜索“can not run test program while cross compiling”，会搜索到很多个这样的结果：<br/>{ echo &quot;configure: error: can not run test program while cross compiling&quot; 1&gt;&amp;2; exit 1; }<br/>把它们都改为<br/>{ echo &quot;configure: error: can not run test program while cross compiling&quot; 1&gt;&amp;2; }<br/>这样做的目的是直接无视交叉编译测试程序错误。另外，我使用的是arm-linux-gcc 3.4.1版，和代码不太兼容。找到/home/lxz/php-4.4.8/Zend/zend_strtod.c的第238行<br/>#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + &#92;<br/>&nbsp;&nbsp;&nbsp;&nbsp;defined(IBM) != 1<br/>Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or<br/>IBM should be defined.<br/>#endif<br/>把这段改为<br/>#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + &#92;<br/>&nbsp;&nbsp;&nbsp;&nbsp;defined(IBM) != 1<br/>//Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or<br/>//IBM should be defined.<br/>#endif<br/>在本机php编译完后，输入如下命令<br/> <br/># cd /home/lxz/php-4.4.8<br/># CC=arm-linux-gcc ./configure --prefix=/usr/local/php --host=i586-suse-linux --target=arm-linux<br/> <br/>别以为可以编译了，还有东西要修改，真汗啊……打开/home/lxz/php-4.4.8/Makefile，找到这段<br/>install-pear-packages: $(top_builddir)/sapi/cli/php<br/> @$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) /home/lxz/php-4.4.8/pear/install-pear.php -d &quot;$(peardir)&quot; -b &quot;$(bindir)&quot; /home/lxz/php-4.4.8/pear/packages/*.tar<br/>用上我们刚才编译的本机php里的文件，把它改成<br/>install-pear-packages: /home/lxz/php-4.4.8-i586/sapi/cli/php<br/> @/home/lxz/php-4.4.8-i586/sapi/cli/php $(PEAR_INSTALL_FLAGS) /home/lxz/php-4.4.8/pear/install-pear.php -d &quot;$(peardir)&quot; -b &quot;$(bindir)&quot; /home/lxz/php-4.4.8/pear/packages/*.tar<br/>终于可以编译了<br/> <br/># make<br/> <br/>随后和apache一样，需要切换用户，把php的文件安装到/usr/local/php<br/> <br/># su<br/> <br/>输入密码<br/> <br/># cd /home/lxz/php-4.4.8<br/># make install<br/># exit<br/> <br/>这样，php就编译完成了。<br/> <br/>配置Apache和PHP<br/>接下来就需要修改配置文件，让apache和php能够链接起来工作。这个配置过程和Windows下使用apache+php的过程类似，因为我不是把apache和php一起编译的，只是让apache认识“.php”这个扩展名，然后调用php。为了方便，直接给出apache的配置文件，配置文件的位置在ARM Linux文件系统的/usr/local/apache/conf/httpd.conf，其中红色字是在默认配置文件基础上修改或添加的内容。<br/>ServerType standalone<br/>ServerRoot &quot;/usr/local/apache&quot;<br/>PidFile /usr/local/apache/logs/httpd.pid<br/>ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard<br/>Timeout 300<br/>KeepAlive On<br/>MaxKeepAliveRequests 100<br/>KeepAliveTimeout 15<br/>MinSpareServers 5<br/>MaxSpareServers 10<br/>StartServers 5<br/>MaxClients 150<br/>MaxRequestsPerChild 0<br/>Port 80<br/>User nobody<br/>Group nobody<br/>ServerAdmin cosine@126.com<br/>DocumentRoot &quot;/home/webroot&quot;<br/>&lt;Directory /&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;Options FollowSymLinks<br/>&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br/>&lt;/Directory&gt;<br/>&lt;Directory &quot;/home/webroot&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes FollowSymLinks MultiViews<br/>&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br/>&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br/>&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br/>&lt;/Directory&gt;<br/>&lt;IfModule mod_userdir.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;UserDir public_html<br/>&lt;/IfModule&gt;<br/>&lt;IfModule mod_dir.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;DirectoryIndex index.html<br/>&nbsp;&nbsp;&nbsp;&nbsp;DirectoryIndex index.php<br/>&nbsp;&nbsp;&nbsp;&nbsp;DirectoryIndex index.php3<br/>&nbsp;&nbsp;&nbsp;&nbsp;DirectoryIndex index.phtml<br/>&lt;/IfModule&gt;<br/>AccessFileName .htaccess<br/>&lt;Files ~ &quot;^&#92;.ht&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br/>&nbsp;&nbsp;&nbsp;&nbsp;Deny from all<br/>&nbsp;&nbsp;&nbsp;&nbsp;Satisfy All<br/>&lt;/Files&gt;<br/>UseCanonicalName On<br/>&lt;IfModule mod_mime.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;TypesConfig /usr/local/apache/conf/mime.types<br/>&lt;/IfModule&gt;<br/>DefaultType text/plain<br/>&lt;IfModule mod_mime_magic.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;MIMEMagicFile /usr/local/apache/conf/magic<br/>&lt;/IfModule&gt;<br/>HostnameLookups Off<br/>ErrorLog /usr/local/apache/logs/error_log<br/>LogLevel warn<br/>LogFormat &quot;%h %l %u %t &#92;&quot;%r&#92;&quot; %&gt;s %b &#92;&quot;%{Referer}i&#92;&quot; &#92;&quot;%{User-Agent}i&#92;&quot;&quot; combined<br/>LogFormat &quot;%h %l %u %t &#92;&quot;%r&#92;&quot; %&gt;s %b&quot; common<br/>LogFormat &quot;%{Referer}i -&gt; %U&quot; referer<br/>LogFormat &quot;%{User-agent}i&quot; agent<br/>CustomLog /usr/local/apache/logs/access_log common<br/>ServerSignature On<br/>&lt;IfModule mod_alias.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;Alias /icons/ &quot;/usr/local/apache/icons/&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory &quot;/usr/local/apache/icons&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes MultiViews<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Directory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;Alias /manual/ &quot;/usr/local/apache/htdocs/manual/&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory &quot;/usr/local/apache/htdocs/manual&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options Indexes FollowSymlinks MultiViews<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Directory&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ScriptAlias /cgi-bin/ &quot;/usr/local/apache/cgi-bin/&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ScriptAlias /php4/ &quot;/usr/local/php/bin/&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;# 注意 &quot;/usr/local/php/bin/&quot; 中最后一个&quot;/&quot;不可少<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;Directory &quot;/usr/local/apache/cgi-bin&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options None<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Directory&gt;<br/>&lt;/IfModule&gt;<br/>&lt;IfModule mod_autoindex.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;IndexOptions FancyIndexing<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIconByType (TXT,/icons/text.gif) text/*<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIconByType (IMG,/icons/image2.gif) image/*<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIconByType (SND,/icons/sound2.gif) audio/*<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIconByType (VID,/icons/movie.gif) video/*<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/binary.gif .bin .exe<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/binhex.gif .hqx<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/tar.gif .tar<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/a.gif .ps .ai .eps<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/layout.gif .html .shtml .htm .pdf<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/text.gif .txt<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/c.gif .c<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/p.gif .pl .py<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/f.gif .for<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/dvi.gif .dvi<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/uuencoded.gif .uu<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/tex.gif .tex<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/bomb.gif core<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/back.gif ..<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/hand.right.gif README<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/folder.gif ^^DIRECTORY^^<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddIcon /icons/blank.gif ^^BLANKICON^^<br/>&nbsp;&nbsp;&nbsp;&nbsp;DefaultIcon /icons/unknown.gif<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReadmeName README.html<br/>&nbsp;&nbsp;&nbsp;&nbsp;HeaderName HEADER.html<br/>&nbsp;&nbsp;&nbsp;&nbsp;IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t<br/>&lt;/IfModule&gt;<br/>&lt;IfModule mod_mime.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage da .dk<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage nl .nl<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage en .en<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage et .ee<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage fr .fr<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage de .de<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage el .el<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage he .he<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset ISO-8859-8 .iso8859-8<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage it .it<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage ja .ja<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset ISO-2022-JP .jis<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage kr .kr<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset ISO-2022-KR .iso-kr<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage nn .nn<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage no .no<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage pl .po<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset ISO-8859-2 .iso-pl<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage pt .pt<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage pt-br .pt-br<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage ltz .lu<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage ca .ca<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage es .es<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage sv .sv<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage cs .cz .cs<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage ru .ru<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddLanguage zh-TW .zh-tw<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset Big5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Big5&nbsp;&nbsp;&nbsp;&nbsp;.big5<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset WINDOWS-1251 .cp-1251<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset CP866&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.cp866<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset ISO-8859-5&nbsp;&nbsp; .iso-ru<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset KOI8-R&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .koi8-r<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset UCS-2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.ucs2<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset UCS-4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.ucs4<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddCharset UTF-8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.utf8<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;IfModule mod_negotiation.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/IfModule&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddType application/x-tar .tgz<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddType application/x-httpd-php .php3<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddType application/x-httpd-php .php<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddType application/x-httpd-php .phtml<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddEncoding x-compress .Z<br/>&nbsp;&nbsp;&nbsp;&nbsp;AddEncoding x-gzip .gz .tgz<br/>&lt;/IfModule&gt;<br/>Action application/x-httpd-php &quot;/php4/php&quot;<br/>&lt;IfModule mod_setenvif.c&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;BrowserMatch &quot;Mozilla/2&quot; nokeepalive<br/>&nbsp;&nbsp;&nbsp;&nbsp;BrowserMatch &quot;MSIE 4&#92;.0b2;&quot; nokeepalive downgrade-1.0 force-response-1.0<br/>&nbsp;&nbsp;&nbsp;&nbsp;BrowserMatch &quot;RealPlayer 4&#92;.0&quot; force-response-1.0<br/>&nbsp;&nbsp;&nbsp;&nbsp;BrowserMatch &quot;Java/1&#92;.0&quot; force-response-1.0<br/>&nbsp;&nbsp;&nbsp;&nbsp;BrowserMatch &quot;JDK/1&#92;.0&quot; force-response-1.0<br/>&lt;/IfModule&gt;<br/>php也有配置文件，但是修改起来比较简单，只需要把/home/lxz/php-4.4.8/php.ini-dist复制到ARM Linux文件系统的/usr/local/php/lib，并改名为php.ini，找到<br/>register_globals = Off<br/>修改为<br/>register_globals = On<br/>保存就可以了。<br/>如果你觉得上面的一切都很麻烦，可以在EE小站的SkyDrive下载我制作好的压缩包，地址http://cid-4201fdc93932ddaf.skydrive.live.com/self.aspx/EE%e5%b0%8f%e7%ab%99%e7%90%90%e7%a2%8e%e6%96%87%e4%bb%b6/armv4-apache-php.tar.bz2，解压缩到ARM Linux根文件系统的/。这个压缩包包含apache 1.3.39和php 4.4.8，默认的网页服务器根目录为/home/webroot，默认监听端口为80。<br/>另外，我在资料站上开了个wiki来测试ARM Linux上Apache+PHP的组合，地址http://cosine.oicp.net/dokuwiki/。测试的时间不会很长，但我会保证这个链接在2008年4月1号前有效。（2009年2月21日追加：这个地址已经失效快一年了）
]]>
</description>
</item><item>
<link>https://jackxiang.com/post/2020/#blogcomment63927</link>
<title><![CDATA[[评论] 在ARM Linux上使用Apache+PHP]]></title> 
<author>liekkas_zx &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 07 Jan 2014 06:31:14 +0000</pubDate> 
<guid>https://jackxiang.com/post/2020/#blogcomment63927</guid> 
<description>
<![CDATA[ 
	您好，我最近尝试在嵌入式开发板上移植Apache+php+sqlite,遇到一些问题，由于php5本身就支持sqlite2，所以我有重新编译了php5，并且配置Apache和php5之后，phpinfo()测试页面通过，但是在php脚本中加入数据库操作,出现服务器内部错误，错误日志：Premature end of script headers: /usr/local/php5-arm/bin/php-cgi，我始终没有解决这个问题，请问你做过相关的试验么，能否给点意见，谢谢~
]]>
</description>
</item><item>
<link>https://jackxiang.com/post/2020/#blogcomment63928</link>
<title><![CDATA[[评论] 在ARM Linux上使用Apache+PHP]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 12 Jan 2014 03:14:11 +0000</pubDate> 
<guid>https://jackxiang.com/post/2020/#blogcomment63928</guid> 
<description>
<![CDATA[ 
	1）估计是访问权限的问题，你把你要访问的文件夹权限设置一下2）在phpinfo里查看sqlite是否编译得对，连接路径什么的。
]]>
</description>
</item>
</channel>
</rss>