<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>FreeLAMP.com</title>
<link>http://www.freelamp.com</link>
<description>FreeLAMP.com ，像风一样自由</description>
<language>zh-cn</language>
<image> 
<title>FreeLAMP.com</title> 
<url>http://www.freelamp.com/Images/sitetitle_img</url> 
<link>http://www.freelamp.com</link> 
</image> 
<item> 
<title>ps -Zef 截短 Zonename 的解决办法</title> 
<link>http://www.freelamp.com/1192720410</link> 
<description>Solaris 10 的 ZONE 虚拟计算技术日渐走向应用。本技巧解决 ps -Zef 不能显示长 ZONE Name 的办法。&lt;br&gt;ps -Zef 只能显示 8 个字符的 zonename ， 只能用 ps -o 来定制显示的办法解决显示完整 zonename 的问题。 &lt;BR&gt;
&lt;BR&gt;
 # ps -ef -o user,zone,nlwp,stime,args&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-10-18</dc:date>
</item>
<item> 
<title>优化 PHP 代码的 40 个小窍门</title> 
<link>http://www.freelamp.com/1192497823</link> 
<description>摘自： http://reinholdweber.com/?p=3 &lt;br&gt;&lt;BR&gt;
40 Tips for optimizing your php Code&lt;BR&gt;
&lt;BR&gt;
   1. If a method can be static, declare it static. Speed improvement is by a factor of 4.&lt;BR&gt;
   2. echo is faster than print.&lt;BR&gt;
   3. Set the maxvalue for your for-loops before and not in the loop.&lt;BR&gt;
   4. Unset your variables to free memory, especially large arrays.&lt;BR&gt;
   5. Avoid magic like __get, __set, __autoload&lt;BR&gt;
   6. require_once() is expensive&lt;BR&gt;
   7. Use full paths in includes and requires, less time spent on resolving the OS paths.&lt;BR&gt;
   8. If you need to find out the time when the script started executing, $_SERVER[’REQUEST_TIME’] is preferred to time()&lt;BR&gt;
   9. See if you can use strncasecmp, strpbrk and stripos instead of regex&lt;BR&gt;
  10. str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4&lt;BR&gt;
  11. If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.&lt;BR&gt;
  12. Error suppression with @ is very slow.&lt;BR&gt;
  13. $row[’id’] is 7 times faster than $row[id]&lt;BR&gt;
  14. Error messages are expensive&lt;BR&gt;
  15. Do not use functions inside of for loop, such as for ($x=0; $x &amp;lt; count($array); $x) The count() function gets called each time.&lt;BR&gt;
  16. Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.&lt;BR&gt;
  17. Incrementing a global variable is 2 times slow than a local var.&lt;BR&gt;
  18. Incrementing a object property (eg. $this-&amp;gt;prop++) is 3 times slower than a local variable.&lt;BR&gt;
  19. Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.&lt;BR&gt;
  20. Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.&lt;BR&gt;
  21. Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.&lt;BR&gt;
  22. Methods in derived classes run faster than ones defined in the base class.&lt;BR&gt;
  23. A function call with one parameter and an empty function body takes about the same time as doing 7-8 $localvar++ operations. A similar method call is of course about 15 $localvar++ operations.&lt;BR&gt;
  24. Surrounding your string by ' instead of &amp;quot; will make things interpret a little faster since php looks for variables inside &amp;quot;...&amp;quot; but not inside '...'. Of course you can only do this when you don't need to have variables in the string.&lt;BR&gt;
  25. When echoing strings it's faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments.&lt;BR&gt;
  26. A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.&lt;BR&gt;
  27. Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.&lt;BR&gt;
  28. Use memcached - memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load&lt;BR&gt;
  29. Use ip2long() and long2ip() to store IP addresses as integers instead of strings in a database. This will reduce the storage space by almost a factor of four (15 bytes for char(15) vs. 4 bytes for the integer), make it easier to calculate whether a certain address falls within a range, and speed-up searches and sorts (sometimes by quite a bit).&lt;BR&gt;
  30. Partially validate email addresses by checking that the domain name exists with checkdnsrr(). This built-in function checks to ensure that a specified domain name resolves to an IP address. A simple user-defined function that builds on checkdnsrr() to partially valid email addresses can be found in the user comments section in the PHP docs. This is handy for catching those occasional folks who think their email address is ‘joeuser@wwwphp.net’ instead of ‘joeuser@php.net’.&lt;BR&gt;
  31. If you’re using PHP 5 with MySQL 4.1 or above, consider ditching the mysql_* functions for the improved mysqli_* functions. One nice feature is that you can use prepared statements, which may speed up queries if you maintain a database-intensive website. Some benchmarks.&lt;BR&gt;
  32. Learn to love the ternary operator.&lt;BR&gt;
  33. If you get the feeling that you might be reinventing the wheel during a project, check PEAR before you write another line. PEAR is a great resource that many PHP developers are aware of, yet many more are not. It’s an online repository containing over 400 reusable snippets that can be dropped right into your PHP application. Unless your project is trully unique, you ought to be able to find a PEAR package that saves at least a little time. (Also see PECL)&lt;BR&gt;
  34. Automatically print a nicely formatted copy of a page’s source code with highlight_file().This function is handy for when you need to ask for some assistance with a script in a messageboard, IRC, etc. Obviously, some care must be taken not to accidently show your source when it contains DB connection information, passwords, etc.&lt;BR&gt;
  35. Prevent potentially sensitive error messages from being shown to users with the error_reporting(0) function. Ideally error reporting should be completely disabled on a production server from within php.ini. However if you’re on a shared webhost and you aren’t given your own php.ini, then your best bet is to add error_reporting(0); as the first line in each of your scripts (or use it with require_once().) This will prevent potentially sensitive SQL queries and path names from being displayed if things go awry.&lt;BR&gt;
  36. Use gzcompress() and gzuncompress() to transparently compress/decompress large strings before storing them in a database. These built-in functions use the gzip algorithm and can compress plaintext up to 90%. I use these functions almost everytime I read/write to a BLOB field within PHP. The only exception is when I need full text indexing capabilities.&lt;BR&gt;
  37. Return multiple values from a function with “by reference” parameters. Like the ternary operator, most PHP developers who come from a more formalized programming background already know this one. However, those who’s background is more HTML than Pascal, probably have wondered at one time “how do I get multiple values back from a function I wrote, even though I can only use one return value?” The answer is that you precede a variable with “&amp;amp;” and use it “by reference” instead of “by value”.&lt;BR&gt;
  38. Fully understand “magic quotes” and the dangers of SQL injection. I’m hoping that most developers reading this are already familiar with SQL injection. However, I list it here because it’s absolutely critical to understand. If you’ve never heard the term before, spend the entire rest of the day googling and reading.&lt;BR&gt;
  39. When working with strings and you need to check that the string is either of a certain length you'd understandably would want to use the strlen() function. This function is pretty quick since it's operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase &amp;amp; hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using a isset() trick.&lt;BR&gt;
&lt;BR&gt;
      Ex.&lt;BR&gt;
      if (strlen($foo) &amp;lt; 5) { echo &amp;quot;Foo is too short&amp;quot;; }&lt;BR&gt;
      vs.&lt;BR&gt;
      if (!isset($foo{5})) { echo &amp;quot;Foo is too short&amp;quot;; }&lt;BR&gt;
&lt;BR&gt;
      Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it's execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string's length.&lt;BR&gt;
  40. When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don't go modifying your C or Java code thinking it'll suddenly become faster, it won't. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend's PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.&lt;BR&gt;
  41. Excellent Article about optimizing php by John Lim&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-10-15</dc:date>
</item>
<item> 
<title>低版本 Client 连接 MySQL 4.1 以上版本的口令问题 </title> 
<link>http://www.freelamp.com/1187616916</link> 
<description>一般都用 tarball 编译的方式来安装 LAMP。一个 RHES 4.1 的 Red Hat 上安装的 MySQL 不完整，删除老的 4.1.20 版本后，安装了 MySQL 网站上的 &lt;br&gt;&lt;BR&gt;
MySQL-server-standard-4.1.22-0.rhel4.i386.rpm&lt;BR&gt;
MySQL-client-standard-4.1.22-0.rhel4.i386.rpm&lt;BR&gt;
MySQL-devel-standard-4.1.22-0.rhel4.i386.rpm&lt;BR&gt;
&lt;BR&gt;
MySQL 工作了， 可是原来的 php-mysql 却不支持 PHP 了。 &lt;BR&gt;
只好通过 rpmfind ， 下载 &lt;BR&gt;
&lt;BR&gt;
php-mysql-4.3.11-2.8&lt;BR&gt;
php-pear-4.3.11-2.8&lt;BR&gt;
php-4.3.11-2.8&lt;BR&gt;
&lt;BR&gt;
PHP 上有了 MySQL 支持，可是出现了如下错误：&lt;BR&gt;
&lt;BR&gt;
Client does not support authentication protocol requested by server; consider upgrading MySQL client&lt;BR&gt;
&lt;BR&gt;
解决的办法就是：&lt;BR&gt;
&lt;BR&gt;
 mysql&amp;gt; set PASSWORD  FOR 'miska'@'localhost' = OLD_PASSWORD('muska');&lt;BR&gt;
&lt;BR&gt;
看来， Binary 或者 rpm  安装这些 这些 LAMP 包还确实麻烦。 &lt;BR&gt;
&lt;BR&gt;
====  需要用到的一些 rpm 命令：&lt;BR&gt;
检查已经安装的 PHP 包：&lt;BR&gt;
&lt;BR&gt;
#rpm -qa|grep -i php&lt;BR&gt;
php-mysql-4.3.11-2.8&lt;BR&gt;
php-pear-4.3.11-2.8&lt;BR&gt;
php-4.3.11-2.8&lt;BR&gt;
&lt;BR&gt;
强制删除软件包： rpm -e --nodeps php-4.3.11-2.8&lt;BR&gt;
安装包：  rpm -ivh php-mysql-4.3.11-2.8.i386.rpm&lt;BR&gt;
&lt;BR&gt;
检查软件包包含的文件：&lt;BR&gt;
rpm -qil php-4.3.11-2.8&lt;BR&gt;
&lt;BR&gt;
/etc/httpd/conf.d/php.conf&lt;BR&gt;
/etc/pear.conf&lt;BR&gt;
/etc/php.d&lt;BR&gt;
/etc/php.ini&lt;BR&gt;
/usr/bin/php&lt;BR&gt;
/usr/lib/httpd/modules/libphp4.so&lt;BR&gt;
/usr/lib/php4&lt;BR&gt;
/usr/share/doc/php-4.3.11&lt;BR&gt;
/var/lib/php&lt;BR&gt;
/var/lib/php/session&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-08-20</dc:date>
</item>
<item> 
<title>sendmail 几个常见的配置问题</title> 
<link>http://www.freelamp.com/1182514225</link> 
<description>一个默认安装以后的操作系统其 sendmail 并不一定能如愿运行，这里介绍几个常用的需要修改的参数。&lt;br&gt;1. DaemonPortOptions 修改 sendmail 侦听的 地址和端口，并可以修改 HELO 的名字。&lt;BR&gt;
&lt;BR&gt;
http://www.sendmail.org/~gshapiro/8.10.Training/DaemonPortOptions.html&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
2.MX list for hostname points back to hostname&lt;BR&gt;
&lt;BR&gt;
http://www.sendmail.org/faq/section4.html#4.5&lt;BR&gt;
&lt;BR&gt;
3. /etc/aliases 必须定义的三个名字&lt;BR&gt;
 &lt;BR&gt;
MAILER-DAEMON: root&lt;BR&gt;
postmaster: root&lt;BR&gt;
nobody: /dev/null&lt;BR&gt;
&lt;BR&gt;
http://www.unet.univie.ac.at/aix/aixbman/commadmn/ml_alias.htm</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-06-22</dc:date>
</item>
<item> 
<title>取消PHP代码中的 short_open_tag</title> 
<link>http://www.freelamp.com/1181526502</link> 
<description>一些老的 PHP 程序，采用了 short_open_tag ， 即类似 &lt;BR&gt;
&amp;lt;? &lt;BR&gt;
  这样开头的  PHP 程序， 而不是 &lt;BR&gt;
&amp;lt;?php &lt;BR&gt;
&lt;BR&gt;
本办法采用 Perl 的 pie 语句，一行代码修改所有的 short_open_tag 为标准 tag. &lt;br&gt;&lt;BR&gt;
# find . -name &amp;quot;*.php&amp;quot; |xargs perl -pi -e 's/\&amp;lt;\?$/\&amp;lt;\?php/g'&lt;BR&gt;
&lt;BR&gt;
修改完成后，不要忘记修改 php.ini 的 &lt;BR&gt;
&lt;BR&gt;
short_open_tag = Off&lt;BR&gt;
&lt;BR&gt;
然后重新启动 Apache &lt;BR&gt;
&lt;BR&gt;
# bin/apachectl graceful&lt;BR&gt;
&lt;BR&gt;
可以验证修改是否正确。 &lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-06-10</dc:date>
</item>
<item> 
<title>用 Sun 的 AMP 组合(Cool Stack) 搭建自己的 Blog 服务器</title> 
<link>http://www.freelamp.com/1180538558</link> 
<description>对于那些和我一样，喜欢马上自己动手的人来说，甚至不需要知道它到底是干什么的，最想知道的就是下载地址了。&lt;BR&gt;
&lt;BR&gt;
Sun 的 Cool Stack 组合可以从下面的连接下载： &lt;BR&gt;
http://cooltools.sunsource.net/coolstack/&lt;BR&gt;
&lt;br&gt;&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
Cool Stack 是 经过 Sun 优化以后的一套开放源代码软件组合，最新版本 1.1 包含&lt;BR&gt;
&lt;BR&gt;
    * CSKamp. 加入了  Apache2, MySQL5 和 PHP5 &lt;BR&gt;
    * CSKmysql.  如果需要运行 64 位的 MySQL，请安装本包&lt;BR&gt;
    * CSKperl.  包含了很多 Perl 的扩展 &lt;BR&gt;
    * CSKphplibsBundle. 如果需要 PHP 其他扩展的话，就要安装该包&lt;BR&gt;
    * CSKmemcached.   memcached, 分布式对象缓冲系统&lt;BR&gt;
    * CSKruby. 包含 ruby, rubygems and rails.&lt;BR&gt;
    * CSKsquid. 包含 Squid Web Proxy Cache.&lt;BR&gt;
    * CSKtomcat. 包含 Apache Tomcat  &lt;BR&gt;
    &lt;BR&gt;
本文将通过介绍安装 WordPress 2.0 的过程以对 Cool Stack 有比较详细的了解。&lt;BR&gt;
 &lt;BR&gt;
 本文介绍的软件需要 Solaris 10 操作系统的支持。&lt;BR&gt;
    &lt;BR&gt;
    1、下载：&lt;BR&gt;
           # mkdir /var/tmp/CoolStack&lt;BR&gt;
           # cd /var/tmp/CoolStack&lt;BR&gt;
           # ftp ftp.sunfreeware.com&lt;BR&gt;
            user:ftp&lt;BR&gt;
            password:youremail@yourcompany.com&lt;BR&gt;
            cd /pub/freeware/CSK/&lt;BR&gt;
            bin&lt;BR&gt;
            get CSKamp_x86.pkg.bz2&lt;BR&gt;
            get CSKmysql_x86.pkg.bz2&lt;BR&gt;
            bye&lt;BR&gt;
          &lt;BR&gt;
    2、安装：&lt;BR&gt;
           # bunzip2 CSKamp_x86.pkg.bz2 CSKmysql_x86.pkg.bz2&lt;BR&gt;
           # pkgadd -d CSKamp_x86.pkg.bz2&lt;BR&gt;
           # pkgadd -d CSKmysql_x86.pkg&lt;BR&gt;
&lt;BR&gt;
    3、配置 Apache &lt;BR&gt;
          # vi /opt/coolstack/apache2/conf/httpd.conf &lt;BR&gt;
          &lt;BR&gt;
          修改运行 Web Server 的用户名和组&lt;BR&gt;
          修改 ServerName &lt;BR&gt;
          修改 ServerAdmin&lt;BR&gt;
          修改 DirectoryIndex 为&lt;BR&gt;
                       DirectoryIndex index.html index.php&lt;BR&gt;
          启动： # /opt/coolstack/apache2/bin/apachectl start &lt;BR&gt;
          如果启动有错误，查看 ErrorLog: &lt;BR&gt;
          # tail -100f /opt/coolstack/apache2/logs/error_log&lt;BR&gt;
          &lt;BR&gt;
          如果原先安装有 Sun 的 Apache 包，建议禁用 &lt;BR&gt;
           # svcadm disable apache2&lt;BR&gt;
           # svcadm refresh apache2&lt;BR&gt;
           &lt;BR&gt;
         然后再移除下面的包（选作）： &lt;BR&gt;
          SUNWapchd&lt;BR&gt;
          SUNWapchu&lt;BR&gt;
          SUNWapchr&lt;BR&gt;
          SUNWapch2d&lt;BR&gt;
          SUNWapch2u&lt;BR&gt;
          SUNWapch2r&lt;BR&gt;
          SUNWaclg&lt;BR&gt;
&lt;BR&gt;
     4、测试 PHP     &lt;BR&gt;
           在 Web 目录下建立一个 test.php&lt;BR&gt;
           &amp;lt;?php&lt;BR&gt;
              phpinfo()?&lt;BR&gt;
            ?&amp;gt;&lt;BR&gt;
           本文假设 Web Server Name 为 freelamp.com，&lt;BR&gt;
          在浏览器输入： http://freelamp.com/test.php 应该会显示 PHP 的编译参数等。&lt;BR&gt;
          &lt;BR&gt;
      5、配置 MySQL &lt;BR&gt;
           用 # isainfo -b 检查服务器是否 64 位 &lt;BR&gt;
          如果是64 则 MySQL 目录为 /opt/coolstack/mysql，32的话则为： /opt/coolstack/mysql_32bit&lt;BR&gt;
          &lt;BR&gt;
          添加 mysql 用户：&lt;BR&gt;
          #groupadd mysql;useradd -g mysql mysql&lt;BR&gt;
          &lt;BR&gt;
          安装初始数据库：&lt;BR&gt;
          # $MYSQL_DIR/bin/mysql_install_db&lt;BR&gt;
          # chown -R mysql $MYSQL_DIR/var&lt;BR&gt;
          启动： &lt;BR&gt;
          # $MYSQL_DIR/bin/mysqld_safe &amp;amp;&lt;BR&gt;
          &lt;BR&gt;
          如果启动失败，请检查 $MYSQL_DIR/var 目录下的 `hostname`.err 文件&lt;BR&gt;
          # tail -100f `hostname`.err&lt;BR&gt;
          &lt;BR&gt;
      6、下载并安装  WordPress&lt;BR&gt;
             下载：&lt;BR&gt;
             # cd /var/tmp&lt;BR&gt;
             # wget http://wordpress.org/latest.tar.gz&lt;BR&gt;
             &lt;BR&gt;
             解压：&lt;BR&gt;
             # cd /opt/coolstack/apache2/htdocs&lt;BR&gt;
             # gzcat /var/tmp/latest.tar.gz|tar xf -&lt;BR&gt;
             &lt;BR&gt;
             建立配置文件：&lt;BR&gt;
             # cd wordpress&lt;BR&gt;
             # mv wp-config-sample.php wp-config.php&lt;BR&gt;
             # vi wp-config.php&lt;BR&gt;
                define('DB_NAME', 'wordpress');    // The name of the database&lt;BR&gt;
                define('DB_USER', 'wordpress');     // Your MySQL username&lt;BR&gt;
                define('DB_PASSWORD', 'wordpress'); // ...and password&lt;BR&gt;
&lt;BR&gt;
            建立数据库：&lt;BR&gt;
            进入 MySQL 命令行：&lt;BR&gt;
            # /opt/coolstack/mysql/bin/mysql -uroot &lt;BR&gt;
             mysql&amp;gt; create database wordpress&lt;BR&gt;
             mysql&amp;gt; grant all on wordpress.* to wordpress@localhost identified by 'wordpress';&lt;BR&gt;
             &lt;BR&gt;
             进入 Web 界面配置：&lt;BR&gt;
                           http://freelamp.com/wordpress/&lt;BR&gt;
             如果数据库配置没有错误的话，系统会提示进入 install.php 安装数据，          &lt;BR&gt;
             安装成功后，记录 admin 的密码登录即可管理自己的 Blog 了。 &lt;BR&gt;
             &lt;BR&gt;
     Sun 的这套 Cool Stack 最为抢眼的应该是经过优化后的 MySQL 64 位版本。美中不足的是 &lt;BR&gt;
     &lt;BR&gt;
     Apache 提供的不是 worker 模块，而是老的 prefork.c 模块。&lt;BR&gt;
     PHP 没有提供 Zend Optimizer&lt;BR&gt;
 &lt;BR&gt;
             &lt;BR&gt;
&lt;BR&gt;
附录： &lt;BR&gt;
&lt;BR&gt;
A. 检查数据库程序的版本(32 还是 64)：&lt;BR&gt;
         &lt;BR&gt;
         bash-3.00# file bin/mysqld&lt;BR&gt;
         bin/mysqld:     ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available&lt;BR&gt;
         bash-3.00# file ../mysql_32bit/bin/mysqld&lt;BR&gt;
         ../mysql_32bit/bin/mysqld:      ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available&lt;BR&gt;
 &lt;BR&gt;
&lt;BR&gt;
B.查看数据库支持的引擎：&lt;BR&gt;
            &lt;BR&gt;
                mysql&amp;gt; show engines;&lt;BR&gt;
         +------------+---------+----------------------------------------------------------------+&lt;BR&gt;
         | Engine     | Support | Comment                                                        |&lt;BR&gt;
         +------------+---------+----------------------------------------------------------------+&lt;BR&gt;
         | MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         |&lt;BR&gt;
         | MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |&lt;BR&gt;
         | InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     |&lt;BR&gt;
         | BerkeleyDB | NO      | Supports transactions and page-level locking                   |&lt;BR&gt;
         | BLACKHOLE  | NO      | /dev/null storage engine (anything you write to it disappears) |&lt;BR&gt;
         | EXAMPLE    | NO      | Example storage engine                                         |&lt;BR&gt;
         | ARCHIVE    | YES     | Archive storage engine                                         |&lt;BR&gt;
         | CSV        | NO      | CSV storage engine                                             |&lt;BR&gt;
         | ndbcluster | NO      | Clustered, fault-tolerant, memory-based tables                 |&lt;BR&gt;
         | FEDERATED  | NO      | Federated MySQL storage engine                                 |&lt;BR&gt;
         | MRG_MYISAM | YES     | Collection of identical MyISAM tables                          |&lt;BR&gt;
         | ISAM       | NO      | Obsolete storage engine                                        |&lt;BR&gt;
         +------------+---------+----------------------------------------------------------------+&lt;BR&gt;
            &lt;BR&gt;
&lt;BR&gt;
C.查看 Apache 编译的模块：&lt;BR&gt;
 &lt;BR&gt;
          bash-3.00# /opt/coolstack/apache2/bin/httpd -l&lt;BR&gt;
          Compiled in modules:&lt;BR&gt;
            core.c&lt;BR&gt;
            prefork.c&lt;BR&gt;
            http_core.c&lt;BR&gt;
            mod_so.c&lt;BR&gt;
           &lt;BR&gt;
本文也发表于 http://samp.nalai.net/57600&lt;BR&gt;
&lt;BR&gt;
更多有关 Solaris 上的 AMP 文章，见于：&lt;BR&gt;
&lt;BR&gt;
 http://samp.nalai.net/&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-05-30</dc:date>
</item>
<item> 
<title>测试您的 PHP 水平</title> 
<link>http://www.freelamp.com/1179487534</link> 
<description>在 Unix Review 上看到这个很有意思的测试，和大家共享。 &lt;br&gt;UnixReview.com&lt;BR&gt;
May 2007&lt;BR&gt;
Test Your Knowledge of PHP&lt;BR&gt;
by Emmett Dulaney&lt;BR&gt;
&lt;BR&gt;
From:  http://www.unixreview.com/documents/s=10130/ur0705d/&lt;BR&gt;
&lt;BR&gt;
Increasingly, PHP seems to be the tool/language that is used to make Web sites dynamic. While it is far from the only open source scripting language available, PHP's abilities and features are quickly making it not only a must-have in the Web world but also a topic on many certification exams. Following are fifty questions on PHP at the knowledge level found on beginning/intermediate certification exams. Good luck (answers are at the end of the article)!&lt;BR&gt;
&lt;BR&gt;
1. What is the closing tag used by a PHP-driven web page?&lt;BR&gt;
&lt;BR&gt;
A. /&amp;gt;&lt;BR&gt;
B. #&amp;gt;&lt;BR&gt;
C. ?&amp;gt;&lt;BR&gt;
D. .&amp;gt;&lt;BR&gt;
&lt;BR&gt;
2. Which PHP conditional operator means the values are equal AND of the same data type?&lt;BR&gt;
&lt;BR&gt;
A. ==&lt;BR&gt;
B. ||&lt;BR&gt;
C. ===&lt;BR&gt;
D. ==?&lt;BR&gt;
&lt;BR&gt;
3. Which of the following statements is true regarding variables in PHP (choose two)?&lt;BR&gt;
&lt;BR&gt;
A. Variable names in PHP are case sensitive.&lt;BR&gt;
B. Variable names in PHP are not case sensitive.&lt;BR&gt;
C. PHP variables need to be declared before they can be used.&lt;BR&gt;
D. PHP variables do not need to be declared before they can be used.&lt;BR&gt;
&lt;BR&gt;
4. You are evaluating a script written by a previous employee. That script contains a require statement that causes the script to exit when an error occurs. You want to change this so the script will generate a warning when such an error occurs, but keep on running. What should you replace require with?&lt;BR&gt;
&lt;BR&gt;
A. involve&lt;BR&gt;
B. need&lt;BR&gt;
C. include&lt;BR&gt;
D. call_for&lt;BR&gt;
&lt;BR&gt;
5. Which of the following does not represent a comment in a PHP script?&lt;BR&gt;
&lt;BR&gt;
A. // This is a comment&lt;BR&gt;
B. &amp;lt;?comment This is a comment /&amp;gt;&lt;BR&gt;
C. # This is a comment&lt;BR&gt;
D. /* This is a comment */&lt;BR&gt;
&lt;BR&gt;
6. Which escape character in PHP renders a linefeed?&lt;BR&gt;
&lt;BR&gt;
A. \n&lt;BR&gt;
B. \r&lt;BR&gt;
C. \t&lt;BR&gt;
D. \\&lt;BR&gt;
&lt;BR&gt;
7. What file is used to configure global PHP settings? ______________ (Fill in the blank.)&lt;BR&gt;
&lt;BR&gt;
8. If the value of $AU is currently 7, what is its value as a result of the command $AU++;&lt;BR&gt;
&lt;BR&gt;
A. 8&lt;BR&gt;
B. 9&lt;BR&gt;
C. 14&lt;BR&gt;
D. 49&lt;BR&gt;
&lt;BR&gt;
9. Which printf type specifier is used for a floating point value?&lt;BR&gt;
&lt;BR&gt;
A. d&lt;BR&gt;
B. f&lt;BR&gt;
C. s&lt;BR&gt;
D. u&lt;BR&gt;
&lt;BR&gt;
10. Which PHP logical operator is used to see if both a and b are true?&lt;BR&gt;
&lt;BR&gt;
A. a &amp;amp; b&lt;BR&gt;
B. a &amp;amp;&amp;amp; b&lt;BR&gt;
C. a | b&lt;BR&gt;
D. a || b&lt;BR&gt;
&lt;BR&gt;
11. If an array holds 100 entries, which identifier signifies the first entry?&lt;BR&gt;
&lt;BR&gt;
A. 100&lt;BR&gt;
B. 99&lt;BR&gt;
C. 1&lt;BR&gt;
D. 0&lt;BR&gt;
&lt;BR&gt;
12. What function must be called to send the random number generator before array_rand()?&lt;BR&gt;
&lt;BR&gt;
A. limit()&lt;BR&gt;
B. scope()&lt;BR&gt;
C. srand()&lt;BR&gt;
D. hinum()&lt;BR&gt;
&lt;BR&gt;
13. Which two choices below represent the default order resulting from a sort utilizing asort()?&lt;BR&gt;
&lt;BR&gt;
A. A-Z&lt;BR&gt;
B. Z-A&lt;BR&gt;
C. 0-9&lt;BR&gt;
D. 9-0&lt;BR&gt;
&lt;BR&gt;
14. Which of the following is not true for variable names?&lt;BR&gt;
&lt;BR&gt;
A. They can contain an underscore character&lt;BR&gt;
B. They can begin with a numeric character&lt;BR&gt;
C. They can begin with an alpha character&lt;BR&gt;
D. They can contain alphanumeric characters&lt;BR&gt;
&lt;BR&gt;
15. What is the opening tag used on a PHP-driven web page?&lt;BR&gt;
&lt;BR&gt;
A. &amp;lt;?php&lt;BR&gt;
B. &amp;lt;php&lt;BR&gt;
C. &amp;lt;/php&lt;BR&gt;
D. &amp;lt;P&lt;BR&gt;
&lt;BR&gt;
16. What are used to separate blocks of statements within a control structure?&lt;BR&gt;
&lt;BR&gt;
A. brackets [ ]&lt;BR&gt;
B. parentheses ( )&lt;BR&gt;
C. curly braces { }&lt;BR&gt;
D. quotation marks &amp;quot;&amp;quot;&lt;BR&gt;
&lt;BR&gt;
17. Which function can be used to assign a data type to a variable?&lt;BR&gt;
&lt;BR&gt;
A. assign&lt;BR&gt;
B. assigntype&lt;BR&gt;
C. settype&lt;BR&gt;
D. type&lt;BR&gt;
&lt;BR&gt;
18. Which HTTP variable contains the IP address of the machine making a request?&lt;BR&gt;
&lt;BR&gt;
A. ADDR_IP&lt;BR&gt;
B. ADDR&lt;BR&gt;
C. IP_ADDR&lt;BR&gt;
D. REMOTE_ADDR&lt;BR&gt;
&lt;BR&gt;
19. You are creating a simple form for web users to send you a message. Which method should be used with that form?&lt;BR&gt;
&lt;BR&gt;
A. POST&lt;BR&gt;
B. GET&lt;BR&gt;
C. SEND&lt;BR&gt;
D. READ&lt;BR&gt;
&lt;BR&gt;
20. Within your PHP script, you are performing a division operation on two variables. What data type is assigned to the division result, by default, if it is a fractional result?&lt;BR&gt;
&lt;BR&gt;
A. integer&lt;BR&gt;
B. double&lt;BR&gt;
C. string&lt;BR&gt;
D. Boolean&lt;BR&gt;
&lt;BR&gt;
21. Which mode of the fopen() function opens a file for reading or writing, maintains exiting content, and places the file pointer at the beginning of the file?&lt;BR&gt;
&lt;BR&gt;
A. w&lt;BR&gt;
B. a&lt;BR&gt;
C. r+&lt;BR&gt;
D. w+&lt;BR&gt;
&lt;BR&gt;
22. Which function can be used to copy a file?&lt;BR&gt;
&lt;BR&gt;
A. copy()&lt;BR&gt;
B. clone()&lt;BR&gt;
C. rename()&lt;BR&gt;
D. repr()&lt;BR&gt;
&lt;BR&gt;
23. Which of the following is used to set a cookie to expire 24 hours from now?&lt;BR&gt;
&lt;BR&gt;
A. $cookie_expire = time() +24&lt;BR&gt;
B. $cookie_expire = time() +1440&lt;BR&gt;
C. $cookie_expire = time() +86400&lt;BR&gt;
&lt;BR&gt;
24. Which character is used as a statement terminator to indicate the end of a PHP command?&lt;BR&gt;
&lt;BR&gt;
A. =&lt;BR&gt;
B. #&lt;BR&gt;
C. |&lt;BR&gt;
D. ;&lt;BR&gt;
&lt;BR&gt;
25. Which of the following commands will initialize the $days array?&lt;BR&gt;
&lt;BR&gt;
A. $days = ()&lt;BR&gt;
B. $days = array();&lt;BR&gt;
C. $days = &amp;quot;&amp;quot;&lt;BR&gt;
D. $days = initialize [ ]&lt;BR&gt;
E. 12345&lt;BR&gt;
F. 12,3,45&lt;BR&gt;
G. 1{2,3,4}5&lt;BR&gt;
&lt;BR&gt;
26. What function can be used to see if a file exists?&lt;BR&gt;
&lt;BR&gt;
A. file()&lt;BR&gt;
B. file_there()&lt;BR&gt;
C. exist_file()&lt;BR&gt;
D. file_exists()&lt;BR&gt;
&lt;BR&gt;
27. To create a cookie, your code uses the following entry: SetCookie (&amp;quot;user&amp;quot;, &amp;quot;Emmett Dulaney&amp;quot;, time() +1800); Which of the following is the best to use to see the value &amp;quot;Emmett Dulaney&amp;quot;?&lt;BR&gt;
&lt;BR&gt;
A. $user&lt;BR&gt;
B. $COOKIE[user]&lt;BR&gt;
C. $_COOKIE[user]&lt;BR&gt;
D. $COOKIE_user&lt;BR&gt;
&lt;BR&gt;
28. Which of the following should be used to combine two or more existing arrays?&lt;BR&gt;
&lt;BR&gt;
A. array_add()&lt;BR&gt;
B. array_merge()&lt;BR&gt;
C. array_join()&lt;BR&gt;
D. array_combine()&lt;BR&gt;
&lt;BR&gt;
29. What function is used to determine whether a session has been started for the current user and then start one if necessary? __________ (Fill in the blank.)&lt;BR&gt;
&lt;BR&gt;
30. After opening a file with the fopen() function, what is used to close the file pointer?&lt;BR&gt;
&lt;BR&gt;
A. fclose()&lt;BR&gt;
B. close()&lt;BR&gt;
C. die()&lt;BR&gt;
D. end()&lt;BR&gt;
&lt;BR&gt;
31. Which of the following functions can be used to show the data type for the $remain variable?&lt;BR&gt;
&lt;BR&gt;
A. echo show($remain);&lt;BR&gt;
B. echo gettype($remain);&lt;BR&gt;
C. echo type($remain);&lt;BR&gt;
D. echo explain($remain);&lt;BR&gt;
&lt;BR&gt;
32. Which of the following functions removes a directory from a file system?&lt;BR&gt;
&lt;BR&gt;
A. rmdir()&lt;BR&gt;
B. dir()&lt;BR&gt;
C. del()&lt;BR&gt;
D. dir_gone()&lt;BR&gt;
&lt;BR&gt;
33. What is the difference between sleep() and usleep()?&lt;BR&gt;
&lt;BR&gt;
A. sleep() suspends operations and usleep() resumes them&lt;BR&gt;
B. sleep() accepts seconds and usleep() accepts milliseconds&lt;BR&gt;
C. sleep() works for the current process and usleep() works for all processes&lt;BR&gt;
D. sleep() can only be specified for the current user and usleep() can be specified for all users&lt;BR&gt;
&lt;BR&gt;
34. You need to know how many elements are in an array. What function should you use to count this?&lt;BR&gt;
&lt;BR&gt;
A. list()&lt;BR&gt;
B. count()&lt;BR&gt;
C. number()&lt;BR&gt;
D. sizeof()&lt;BR&gt;
&lt;BR&gt;
35. Information about a session, by default, is configured in the PHP configuration file to be saved beneath which directory?&lt;BR&gt;
&lt;BR&gt;
A. /var&lt;BR&gt;
B. /etc&lt;BR&gt;
C. /tmp&lt;BR&gt;
D. /usr&lt;BR&gt;
&lt;BR&gt;
36. Which of the following contains variables provided to a script by means of the server environment?&lt;BR&gt;
&lt;BR&gt;
A. $_FILES&lt;BR&gt;
B. $_POST&lt;BR&gt;
C. $_GET&lt;BR&gt;
D. $_ENV&lt;BR&gt;
&lt;BR&gt;
37. Which of the following can be used to delete a file?&lt;BR&gt;
&lt;BR&gt;
A. delete()&lt;BR&gt;
B. rid()&lt;BR&gt;
C. unlink()&lt;BR&gt;
D. close()&lt;BR&gt;
&lt;BR&gt;
38. Which of the following functions can be used to destroy a variable?&lt;BR&gt;
&lt;BR&gt;
A. erase&lt;BR&gt;
B. fi&lt;BR&gt;
C. remove&lt;BR&gt;
D. unset&lt;BR&gt;
&lt;BR&gt;
39. Which mode of the fopen() function opens a file for writing and places the file pointer at the end of the file?&lt;BR&gt;
&lt;BR&gt;
A. w&lt;BR&gt;
B. a&lt;BR&gt;
C. r+&lt;BR&gt;
D. w+&lt;BR&gt;
&lt;BR&gt;
40. Which HTTP variable contains the browser type, and browser version, among other values?&lt;BR&gt;
&lt;BR&gt;
A. BROWSE_AGENT&lt;BR&gt;
B. BROWSER_TYPE&lt;BR&gt;
C. BROWSER_ENV&lt;BR&gt;
D. HTTP_USER_AGENT&lt;BR&gt;
&lt;BR&gt;
41. If the current value of $bsns is 4400, what is the new value as a result of this command: $bsns -= 150;&lt;BR&gt;
&lt;BR&gt;
A. -150&lt;BR&gt;
B. 150&lt;BR&gt;
C. 4250&lt;BR&gt;
D. 4400&lt;BR&gt;
E. 4550&lt;BR&gt;
F. &amp;quot;4400-150&amp;quot;&lt;BR&gt;
&lt;BR&gt;
42. What are used to enclose conditional expressions?&lt;BR&gt;
&lt;BR&gt;
A. brackets [ ]&lt;BR&gt;
B. parentheses ( )&lt;BR&gt;
C. curly braces { }&lt;BR&gt;
D. quotation marks &amp;quot; &amp;quot;&lt;BR&gt;
&lt;BR&gt;
43. Which PHP data type can be either TRUE or FALSE?&lt;BR&gt;
&lt;BR&gt;
A. Truth&lt;BR&gt;
B. Integer&lt;BR&gt;
C. Boolean&lt;BR&gt;
D. Float&lt;BR&gt;
&lt;BR&gt;
44. Which of the following contains variables provided to a script by means of file uploads?&lt;BR&gt;
&lt;BR&gt;
A. $_FILES&lt;BR&gt;
B. $_POST&lt;BR&gt;
C. $_GET&lt;BR&gt;
D. $_ENV&lt;BR&gt;
&lt;BR&gt;
45. Which constant identifies the highest random number that the system can generate?&lt;BR&gt;
&lt;BR&gt;
A. URAND&lt;BR&gt;
B. END_NUMBER&lt;BR&gt;
C. ULIMIT&lt;BR&gt;
D. RAND_MAX&lt;BR&gt;
&lt;BR&gt;
46. PHP provides support for POSIX through functions of which class?&lt;BR&gt;
&lt;BR&gt;
A. grep&lt;BR&gt;
B. ereg&lt;BR&gt;
C. psx&lt;BR&gt;
D. efgrp&lt;BR&gt;
&lt;BR&gt;
47. From a Boolean standpoint, every zero value in PHP is considered:&lt;BR&gt;
&lt;BR&gt;
A. True&lt;BR&gt;
B. False&lt;BR&gt;
C. Error&lt;BR&gt;
D. Null&lt;BR&gt;
&lt;BR&gt;
48. Which function places results in the opposite order of asort()?&lt;BR&gt;
&lt;BR&gt;
A. arsort()&lt;BR&gt;
B. rev()&lt;BR&gt;
C. trosa()&lt;BR&gt;
D. zsort()&lt;BR&gt;
&lt;BR&gt;
49. Which printf type specifier is used for a string?&lt;BR&gt;
&lt;BR&gt;
A. d&lt;BR&gt;
B. f&lt;BR&gt;
C. s&lt;BR&gt;
D. u&lt;BR&gt;
&lt;BR&gt;
50.Which PHP conditional operator means not equal to?&lt;BR&gt;
&lt;BR&gt;
A. !=&lt;BR&gt;
B. =!&lt;BR&gt;
C. &amp;lt;=&amp;gt;&lt;BR&gt;
D. &amp;lt;&amp;gt;&lt;BR&gt;
&lt;BR&gt;
Answers&lt;BR&gt;
&lt;BR&gt;
1. The closing tag used by PHP is ?&amp;gt;. Answer: C.&lt;BR&gt;
&lt;BR&gt;
2. The PHP conditional operator of three equal signs (===) means the values are equal and of the same data type. Answer: C.&lt;BR&gt;
&lt;BR&gt;
3. PHP variable names are case sensitive and variables do not need to be declared before they can be used. Answer: A and D.&lt;BR&gt;
&lt;BR&gt;
4. The include instruction will create a warning, but allow the script to continue running when an error is encountered. Answer: C.&lt;BR&gt;
&lt;BR&gt;
5. There are at least three ways to create comments in a PHP script, and &amp;lt;comment is not one of them. Answer: B.&lt;BR&gt;
&lt;BR&gt;
6. The \n escape character in PHP renders a linefeed. Answer: A.&lt;BR&gt;
&lt;BR&gt;
7. The global configuration file is php.ini.&lt;BR&gt;
&lt;BR&gt;
8. The command $AU++; increments the variable by one – changing it from 7 to 8. Answer: A.&lt;BR&gt;
&lt;BR&gt;
9. The printf type specifier f is used for a floating point value. Answer: B.&lt;BR&gt;
&lt;BR&gt;
10. The PHP logical operator to use to see if both a and b are true would be a &amp;amp;&amp;amp; b. Answer: B.&lt;BR&gt;
&lt;BR&gt;
11. The first entry is 0, the second is 1, and the numbers increment from there. Answer: D.&lt;BR&gt;
&lt;BR&gt;
12. The srand() function must be called to send the random number generator before array_rand(). Answer: C.&lt;BR&gt;
&lt;BR&gt;
13. The default order resulting from a sort utilizing asort() is alphabetic (A-Z) and lowest to highest (0-9). Answer: A and C.&lt;BR&gt;
&lt;BR&gt;
14. Variable names cannot begin with a numeric character. Answer: B.&lt;BR&gt;
&lt;BR&gt;
15. The opening tag used by PHP is &amp;lt;?php. Answer: A.&lt;BR&gt;
&lt;BR&gt;
16. Curly braces are used to separate blocks of statements within a control structure. Answer: C.&lt;BR&gt;
&lt;BR&gt;
17. The settype function can be used to assign a data type to a variable. Answer: C.&lt;BR&gt;
&lt;BR&gt;
18. The REMOTE_ADDR HTTP variable contains the IP address of the machine making a request. Answer: D.&lt;BR&gt;
&lt;BR&gt;
19. The POST method should be used for a form as described. Answer: A.&lt;BR&gt;
&lt;BR&gt;
20. If the result is not a whole number, it is assigned the double data type If it is a whole number, integer is assigned. Answer: B.&lt;BR&gt;
&lt;BR&gt;
21. The r+ mode of the fopen() function opens a file for reading or writing, maintains exiting content, and places the file pointer at the beginning of the file. Answer: C.&lt;BR&gt;
&lt;BR&gt;
22. The copy() function can be used to copy a file. Answer: A.&lt;BR&gt;
&lt;BR&gt;
23. To set a cookie to expire 24 hours from now, compute the number of seconds and use the time() function: $cookie_expire = time() +86400. Answer: C.&lt;BR&gt;
&lt;BR&gt;
24. The semicolon character (;) is used as a statement terminator to indicate the end of a PHP command. Answer: D.&lt;BR&gt;
&lt;BR&gt;
25. The command $days = array(); will initialize the $days array. Answer: B.&lt;BR&gt;
&lt;BR&gt;
26. The file_exists() function can be used to see if a file by the given name is already in existence. Answer: D.&lt;BR&gt;
&lt;BR&gt;
27. The value of $_COOKIE[user] is equal to what was set in the cookie. Answer: C.&lt;BR&gt;
&lt;BR&gt;
28. The array_merge() function should be used to combine two or more existing arrays. Answer: B.&lt;BR&gt;
&lt;BR&gt;
29. The function to use is session_start()&lt;BR&gt;
&lt;BR&gt;
30. After opening a file with the fopen() function, fclose() is used to close the file pointer. Answer: A.&lt;BR&gt;
&lt;BR&gt;
31. The gettype function can be used to show the data type for a variable. Answer: B.&lt;BR&gt;
&lt;BR&gt;
32. The rmdir() function removes a directory from a file system. Answer: A.&lt;BR&gt;
&lt;BR&gt;
33. sleep() accepts seconds and usleep() accepts milliseconds. Answer: B.&lt;BR&gt;
&lt;BR&gt;
34. The sizeof() function can tell how many elements are in an array Answer: D.&lt;BR&gt;
&lt;BR&gt;
35. Information about a session, by default, is configured in the PHP configuration file to be saved beneath /tmp. Answer: C.&lt;BR&gt;
&lt;BR&gt;
36. $_ENV contains variables provided to a script by means of the server environment. Answer: D.&lt;BR&gt;
&lt;BR&gt;
37. The unlink() function can be used to delete a file. Answer: C.&lt;BR&gt;
&lt;BR&gt;
38. The unset function can be used to destroy a variable. Answer: D.&lt;BR&gt;
&lt;BR&gt;
39. The &amp;quot;a&amp;quot; mode of the fopen() function opens a file for writing and places the file pointer at the end of the file. Answer: B.&lt;BR&gt;
&lt;BR&gt;
40. The HTTP_USER_AGENT HTTP variable contains the browser type, and browser version, among other values. Answer: D.&lt;BR&gt;
&lt;BR&gt;
41. This operation subtracts 150 from the existing value. Answer: C.&lt;BR&gt;
&lt;BR&gt;
42. Parentheses are used to enclose conditional expressions. Answer: B.&lt;BR&gt;
&lt;BR&gt;
43. The Boolean PHP data type can be either TRUE or FALSE. Answer: C.&lt;BR&gt;
&lt;BR&gt;
44. $_FILES contains variables provided to a script by means of file uploads. Answer: A.&lt;BR&gt;
&lt;BR&gt;
45. The RAND_MAX constant identifies the highest random number that a system can generate. Answer: D.&lt;BR&gt;
&lt;BR&gt;
46. PHP provides support for POSIX through functions of the ereg class. Answer: B.&lt;BR&gt;
&lt;BR&gt;
47. From a Boolean standpoint, every zero value in PHP is considered false. Answer: B.&lt;BR&gt;
&lt;BR&gt;
48. The arsort() function places results in the opposite order of asort(). Answer: A.&lt;BR&gt;
&lt;BR&gt;
49. The printf type specifier s is used for a string. Answer: C.&lt;BR&gt;
&lt;BR&gt;
50. The != PHP conditional operator means not equal to. Answer: A.&lt;BR&gt;
&lt;BR&gt;
Emmett Dulaney is the author of the several books on Linux/Unix and certification as well as a columnist for UnixReview.com. Emmett's blog can be found at: http://edulaney.blogspot.com, and he can be reached (and welcomes your comments) at: edulaney@insightbb.com.&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-05-18</dc:date>
</item>
<item> 
<title>ASP.Net __VIEWSTATE 处理</title> 
<link>http://www.freelamp.com/1179321120</link> 
<description>要用 PHP 的 curl 库去 POST  一个 .aspx 程序，发现其中的 __VIEWSTATE  字段不好处理。 &lt;BR&gt;
把自己的做法，简要写在这里。&lt;br&gt;$url='http://blahblah/loginlq.aspx?';&lt;BR&gt;
&lt;BR&gt;
$post=&amp;quot;regid=$stid&amp;amp;home_phone=$phone&amp;amp;modifyinfo=&amp;lt;B2&amp;gt;&amp;lt;E9&amp;gt;&amp;lt;D1&amp;gt;&amp;lt;AF&amp;gt;&amp;quot;;&lt;BR&gt;
&lt;BR&gt;
$post .= '&amp;amp;__VIEWSTATE='.urlencode(&amp;quot;dDwtOTA1ODA5NjM1Ozs+19FeGCtdvXhDgOViOQijIJZiM0U=&amp;quot;);&lt;BR&gt;
&lt;BR&gt;
$url .= $post;&lt;BR&gt;
        &lt;BR&gt;
$contents = post($url);&lt;BR&gt;
&lt;BR&gt;
其中的 dDwtOTA1ODA5NjM1Ozs+19FeGCtdvXhDgOViOQijIJZiM0U= 在处理之前必须先 urlencode ，否则不能为服务器所识别。 &lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
关于 VIEWSTATE 可以参考： &lt;BR&gt;
&lt;BR&gt;
http://www.webreference.com/programming/asp/viewstate/index.html&lt;BR&gt;
http://www.eggheadcafe.com/articles/20060208.asp</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-05-16</dc:date>
</item>
<item> 
<title>Mambo 的 Cache 可以关了</title> 
<link>http://www.freelamp.com/1177376603</link> 
<description>昨天网站的一个文件系统快满了，查看一下，原来是 Mambo 的 Cache 占用了好几个 G 的空间，这么多的文件 Cache 没有自动删除功能，反而变成了累赘。 &lt;br&gt;删除以后，根本就不影响性能。 &lt;BR&gt;
&lt;BR&gt;
所以， Mambo  的 Content Cache 功能可以休矣！&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-04-23</dc:date>
</item>
<item> 
<title>HTTP/Apache 错误代码汇总</title> 
<link>http://www.freelamp.com/1177326600</link> 
<description>刚才用标题的关键字去 Google 搜索居然都是 IIS 的错误代码汇总。 很愤然。 决定发布这个页面。 &lt;p&gt;&lt;br&gt;</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-04-23</dc:date>
</item>
<item> 
<title>qmail-scanner 没有添加垃圾邮件的标题</title> 
<link>http://www.freelamp.com/1177309427</link> 
<description>qmail-scanner 和 Spam-Assassin 的垃圾邮件过滤器结合目前十分流行，能有效的对垃圾邮件进行分拣。在配置 qmail-scanner 过程中，如果没有选择好参数，垃圾邮件的标题将不会修改。&lt;br&gt;尽管在 local.cf 文件中设置了 &lt;BR&gt;
  &lt;BR&gt;
  rewrite_header subject **SPAM**&lt;BR&gt;
&lt;BR&gt;
但是，检测的垃圾邮件标题还是没有丝毫修改的意思。 这是因为在配置 qmail-scanner  的时候， 没有指定 &lt;BR&gt;
&lt;BR&gt;
--scanners 'fast_spamassassin=string' &lt;BR&gt;
&lt;BR&gt;
把 string 给忘记加入了。 重新配置， 重新启动 spamd 以后，邮件标题都会加上 string 了。 &lt;BR&gt;
&lt;BR&gt;
当然你可以把 string 设置为  **SPAM** 等。 &lt;BR&gt;
&lt;BR&gt;
qmail-scanner 版本为： 2.01 ， SpamAssassin 版本为 3.18&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
Received: from 218.1.68.177 ...... with qmail-scanner-2.01 &lt;BR&gt;
 (spamassassin: 3.1.8.  &lt;BR&gt;
 Clear:RC:0(218.1.68.177):SA:1(8.9/5.0):. &lt;BR&gt;
 Processed in 2.674731 secs); 23 Apr 2007 05:32:14 -0000&lt;BR&gt;
X-Spam-Status: Yes, score=8.9 required=5.0&lt;BR&gt;
X-Spam-Level: ++++++++&lt;BR&gt;
&lt;BR&gt;
补充 qmail-scanner 的配置： &lt;BR&gt;
&lt;BR&gt;
  ./configure --spooldir /var/spool/qscan --qmaildir /var/qmail --bindir /var/qmail/bin --qmail-queue-binary /var/qmail/bin/qmail-q&lt;BR&gt;
ueue --admin virusadmin --domain mydomain.com --admin-description &amp;quot;System Anti-Virus Administrator&amp;quot; --notify admin --local-domains  abc.com,abcd.com  --max-scan-size 100000000 --silent-viruses auto --sa-&lt;BR&gt;
quarantine 5 --lang en_GB --debug 0 --unzip 0 --max-zip-size 1000000000 --add-dscr-hdrs 0 --normalize yes --archive 0 --redundant y&lt;BR&gt;
es --skip-text-msgs 1 --log-details syslog --log-crypto 0 --fix-mime 2  --ignore-eol-check 0 --scanners &amp;quot;fast_spamassassin=**SPAM**&amp;quot; --install &lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-04-23</dc:date>
</item>
<item> 
<title>被列为 Open Proxy 以后</title> 
<link>http://www.freelamp.com/1177245731</link> 
<description>因为不小心打开了 http_access allow all ，导致本站的 IP 地址被列入了 Open HTTP Proxy 。 &lt;br&gt;刚才看到了这样的日志：&lt;BR&gt;
&lt;BR&gt;
69.73.152.121 - - [22/Apr/2007:20:38:46 +0800] &amp;quot;GET http://proxy.org/proxy.pl?url=http://www.x.com/&amp;amp;proxy=collegefree.info&amp;amp;submit=++GO++ HTTP/1.1&amp;quot; 301 342 &amp;quot;-&amp;quot; &amp;quot;FireFox/0.9 (Mozilla 5.0; compatible;)&amp;quot;&lt;BR&gt;
&lt;BR&gt;
去 Proxy.org 查看，原来是一个 Web 方式的代理服务器。 &lt;BR&gt;
&lt;BR&gt;
善哉！&lt;BR&gt;
&lt;BR&gt;
301 也好， 302 也罢， 都变成 403 吧！</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-04-22</dc:date>
</item>
<item> 
<title>Squid 配置时的一个错误</title> 
<link>http://www.freelamp.com/1177085746</link> 
<description>Squid 是非常好的缓冲服务器，3.0 还支持 ESI 。 前些日子把公司经常要挂机的 WebLogic 升级到 6.1SP7 并把前面一级的 Apache 1.3 升级为支持 MPM 的 worker 模式的 Apache 2.0.59 ，最后加上 Squid，不仅解决了 Java 挂机的问题，还在速度上有了很大的提升。 
&lt;p&gt;&lt;br&gt;然而，在升级 FreeLAMP.com 时，不幸的是，在配置中采用了一个 &lt;p&gt;

never_direct allow all
&lt;p&gt;
导致 Zope 的管理界面用户名和口令不能向后台的 Zope 的传递。 &lt;p&gt;

搞得我以为口令错误，拼命检查 $INSTANCE 下的 inituser 或者 Zope Home 下的 access 文件，当然都不能解决。 &lt;p&gt;

&lt;p&gt;
相关连接：&lt;p&gt;
&lt;a href=&quot;http://www.plope.com/Books/2_7Edition/Security.stx#1-4&quot;&gt;Zope Book&lt;/a&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.visolve.com/squid/squid24s1/miscellaneous.php#never_direct&quot;&gt;Squid Manual&lt;/a&gt;</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-04-20</dc:date>
</item>
<item> 
<title>外资电子商务公司招聘资深 Unix 系统管理员 </title> 
<link>http://www.freelamp.com/1174871876</link> 
<description>请有意者发送简历给作者，作为内部推荐，您将会有很高的成功率被录用。 本广告有效期截至到八月底。 &lt;BR&gt;
&lt;BR&gt;
&lt;br&gt;要求：5年以上大型企业 Unix 系统管理经验，英文听说写流利。&lt;BR&gt;
&lt;BR&gt;
请发送英文简历到： albertxu@freelamp.com &lt;BR&gt;
Subject：Apply Senior Unix SA Position&lt;BR&gt;
&lt;BR&gt;
===========================================&lt;BR&gt;
Description:&lt;BR&gt;
&lt;BR&gt;
The UNIX System Administrator is a member of a top UNIX System Administration Team responsible for  global UNIX services and infrastructure.&lt;BR&gt;
Required to keep e-commerce business running 24x7.&lt;BR&gt;
&lt;BR&gt;
Responsibilities:&lt;BR&gt;
   Serves on cross-functional project teams as the UNIX platform&lt;BR&gt;
   Builds, maintains and upgrades a multitude of Sun Solaris and Linux systems&lt;BR&gt;
   Proficiency in trouble-shooting and performance tuning&lt;BR&gt;
   Working in a demanding and fast-paced environment&lt;BR&gt;
&lt;BR&gt;
Key Success Factors&lt;BR&gt;
   Excellent multi-tasking skills. Prioritizes and performs a variety of concurrent tasks with minimal direction.&lt;BR&gt;
   Assumes total responsibility for work assigned and delivers on commitments&lt;BR&gt;
   Proactively identifies opportunities for improvement of the computing environment&lt;BR&gt;
   Passionate in UNIX technology&lt;BR&gt;
&lt;BR&gt;
Qualification:&lt;BR&gt;
   Education: Bachelor degree in computer science or equivalent education&lt;BR&gt;
   Experience Level: 5+ years UNIX SA experience in large enterprise system environment supporting mission-critical systems and applications. Ideally with experience in telecom, ISP, ICP and e-commerce company.&lt;BR&gt;
   &lt;BR&gt;
   Technical Qualifications:&lt;BR&gt;
  o 5+ years experience with Sun Solaris operating system&lt;BR&gt;
 o Experience with a variety of Sun server platforms&lt;BR&gt;
 o Extensive knowledge of TCP/IP networking and load balancing technology&lt;BR&gt;
 o Experience with Veritas Volume Manager and File System&lt;BR&gt;
  o Experience with Veritas Cluster&lt;BR&gt;
 o Experience with system monitoring and management software&lt;BR&gt;
   &lt;BR&gt;
   Communication skills: Effective communication skills including written and verbal in English&lt;BR&gt;
&lt;BR&gt;
</description>
<dc:creator>徐永久</dc:creator>
<dc:date>2007-07-04</dc:date>
</item>
</channel> 
</rss> 
