1. ERROR! The server quit without updating PID file
    可能原因是PID檔案寫入失敗
    解決方式是

jeffath 發表在 痞客邦 留言(0) 人氣()

  1. 當多個server block時,server name匹配順序為:

  2. 完全符合的server_name,意味裡面沒有萬用字元*

  3. 以星號起始的server_name

  4. 以星號結尾的server_name

  5. 第一個符合正則表達式的server_name(第一個是由在nginx.conf中的順序決定)

jeffath 發表在 痞客邦 留言(0) 人氣()

sudo su -

yum update

yum install nginx php-fpm php-xml php-pdo php-odbc \

php-soap php-common php-cli php-mbstring php-bcmath php-ldap \

php-imap php-gd php-pecl-apc

jeffath 發表在 痞客邦 留言(0) 人氣()

RewriteEngine On

#強制轉到/api下 拿掉的話就轉到該相對目錄

#RewriteBase /api

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

jeffath 發表在 痞客邦 留言(0) 人氣()

http://www.slideshare.net/billkarwin/models-for-hierarchical-data

jeffath 發表在 痞客邦 留言(0) 人氣()

Apache Custom Log Formats


Format StringDescription

jeffath 發表在 痞客邦 留言(0) 人氣()

SELECT * FROM (SELECT country, sum(id) as cnt FROM mygroup GROUP BY country WITH rollup) t ORDER BY cnt;

參考網址: http://www.sqlusa.com/bestpractices2005/subtotaltotalgrandtotal/

jeffath 發表在 痞客邦 留言(0) 人氣()

http://www.greaterscope.net/documentation/php_database_abstraction_class_comparison.html

節錄如下

Comparison of PHP Database Abstraction Classes

Simplicity/Usability Comparison

The main purpose of this is to show that database interaction doesn't have to be convoluted.

jeffath 發表在 痞客邦 留言(0) 人氣()

function Read_Excel_File2($file_name,&$result){
    require_once 'include/PHPExcel/Classes/PHPExcel/IOFactory.php';
    $result=null;
    $objReader = PHPExcel_IOFactory::createReader('Excel5');
//    $objReader->setReadDataOnly(true);

jeffath 發表在 痞客邦 留言(0) 人氣()

今天在使用PHPExcel撰寫匯出EXCEL表格的功能時,之前一向用的好好的,但這次卻莫名其妙停住了。

看了一下Apache error log 顯示PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted 

暫時將記憶體使用限制調整為 1024M也不行

ini_set( 'memory_limit', '1024M' );

http://phpexcel.codeplex.com/workitem/ 搜尋了一下,找到這篇文章 Memory leak 。

jeffath 發表在 痞客邦 留言(1) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。