'Programming'에 해당되는 글 1795건

  1. 2014.10.10 php php-cgi 차이점?
  2. 2014.10.10 <? <?php 설정
  3. 2014.10.10 lighttpd + php-fpm
  4. 2014.10.08 php 5.3.22 버전 크로스컴파일시 주의사항
  5. 2014.10.07 php - register_globals
  6. 2014.10.07 php EGPCS
  7. 2014.09.25 php-fpm관련
  8. 2014.09.24 perl tutorial
  9. 2014.09.24 perl array sort 하기
  10. 2014.09.23 xcache apc
Programming/php2014. 10. 10. 16:58

php


php-cgi


php-cgi로 사용시에는
php를 강제로 바꿔치기 하면 위와 같이 텍스트로 깨져 나와버린다.

즉, php-cgi와 php는 비슷하지만 전혀 다른 결과물을 내는 별개의 프로그램이란 것 

'Programming > php' 카테고리의 다른 글

php 5.5.17 opcache / arm  (0) 2014.10.14
php - extensions are not supported on this platform / arm  (0) 2014.10.14
<? <?php 설정  (0) 2014.10.10
lighttpd + php-fpm  (0) 2014.10.10
php 5.3.22 버전 크로스컴파일시 주의사항  (0) 2014.10.08
Posted by 구차니
Programming/php2014. 10. 10. 14:49
기본값은
short_open_Tag = Off
(우분투 14.04 LTS / php5.5.9)

기본값이 Off 라서
<? phpinfo(); ?>가 실행이 안되었던 듯

일단 웹 표준(?) 문제나 파싱 문제로 인해서
기본은 Off 인 듯 하니 기억은 해둬야겠다 -_ㅠ

[링크 : http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=15692 ]
[링크 : http://php.net/manual/en/ini.core.php#ini.short-open-tag ]

'Programming > php' 카테고리의 다른 글

php - extensions are not supported on this platform / arm  (0) 2014.10.14
php php-cgi 차이점?  (0) 2014.10.10
lighttpd + php-fpm  (0) 2014.10.10
php 5.3.22 버전 크로스컴파일시 주의사항  (0) 2014.10.08
php - register_globals  (0) 2014.10.07
Posted by 구차니
Programming/php2014. 10. 10. 14:43
[링크 : http://www.howtoforge.com/installing-lighttpd-with-php5-php-fpm-and-mysql-support-on-ubuntu-12.04]
[링크:  http://stackoverflow.com/.../php-what-are-the-effects-of-cgi-fix-pathinfo-1-in-php-ini-on-a-webserver]


 $ sudo vi /etc/php5/fpm/pool.d/www.conf
 ;listen = /var/run/php5-fpm.sock
 listen=127.0.0.1:9000 

[링크 : http://docs.cubieboard.org/tutorials/common/applications/lighttpd_and_php-fpm ]

Server API - CGI/FastCGI

 
Server API - FPM/FastCGI

 

php를 /bin/php-cgi로 바인딩 되어 있으면
fpm 설정을 해놔도 무조건 fcgi로 연결된다.
그러니 fpm으로 사용시에는 cgi.assign 부분에서 php를 반드시 주석처리 해야 한다.

$ vi /etc/lighttpd.conf
server.modules              = (
                                "mod_alias",
                                "mod_access",
                                "mod_auth",
                                "mod_cgi",
                                "mod_fastcgi")

cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
                               ".html" => "/usr/bin/php",
                               ".php" => "/bin/php-cgi",
                               ".cgi" => "" )

fastcgi.server = ( ".php" =>
        ((
                "host" => "127.0.0.1",
                "port" => "9000",
                "max-procs" => 1,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "1",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"),
        )) 
) 

'Programming > php' 카테고리의 다른 글

php php-cgi 차이점?  (0) 2014.10.10
<? <?php 설정  (0) 2014.10.10
php 5.3.22 버전 크로스컴파일시 주의사항  (0) 2014.10.08
php - register_globals  (0) 2014.10.07
php EGPCS  (0) 2014.10.07
Posted by 구차니
Programming/php2014. 10. 8. 09:15
config.cache를 반드시 지우고 할 것
안지우면 마지막 configure 설정이 유지된다.

'Programming > php' 카테고리의 다른 글

<? <?php 설정  (0) 2014.10.10
lighttpd + php-fpm  (0) 2014.10.10
php - register_globals  (0) 2014.10.07
php EGPCS  (0) 2014.10.07
php-fpm관련  (0) 2014.09.25
Posted by 구차니
Programming/php2014. 10. 7. 11:05
register globals 라고
EGPCS 변수들을 글로벌 변수로 바꿔주는 옵션이 있으나

5.3.22
; Whether or not to register the EGPCS variables as global variables.  You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data.
; You should do your best to write your scripts so that they do not require
; register_globals to be on;  Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
; http://php.net/register-globals
register_globals = On 

5.4대로 가면서 deprecated 되어 이를 회피하기 위한 방법으로 각각 페이지 마다 
옵션을 주어 사용하는 방법이 있다고 한다. 
@extract($_GET);
@extract($_POST);
@extract($_SERVER); 

'Programming > php' 카테고리의 다른 글

lighttpd + php-fpm  (0) 2014.10.10
php 5.3.22 버전 크로스컴파일시 주의사항  (0) 2014.10.08
php EGPCS  (0) 2014.10.07
php-fpm관련  (0) 2014.09.25
xcache apc  (0) 2014.09.23
Posted by 구차니
Programming/php2014. 10. 7. 10:49

'Programming > php' 카테고리의 다른 글

php 5.3.22 버전 크로스컴파일시 주의사항  (0) 2014.10.08
php - register_globals  (0) 2014.10.07
php-fpm관련  (0) 2014.09.25
xcache apc  (0) 2014.09.23
lighthttpd / php / FastCGI  (0) 2014.08.28
Posted by 구차니
Programming/php2014. 9. 25. 15:22

'Programming > php' 카테고리의 다른 글

php - register_globals  (0) 2014.10.07
php EGPCS  (0) 2014.10.07
xcache apc  (0) 2014.09.23
lighthttpd / php / FastCGI  (0) 2014.08.28
php5 class / object oriented programming  (4) 2014.07.07
Posted by 구차니
Programming/perl2014. 9. 24. 18:18

'Programming > perl' 카테고리의 다른 글

perl array sort 하기  (0) 2014.09.24
Posted by 구차니
Programming/perl2014. 9. 24. 17:52

'Programming > perl' 카테고리의 다른 글

perl tutorial  (0) 2014.09.24
Posted by 구차니
Programming/php2014. 9. 23. 18:33
xcache - ubuntu 14.04 기준
/etc/php5/mods-available/xcache.ini
/usr/lib/php5/20121212/xcache.so

$ vi /etc/php5/fpm/php.ini
extension=xcache.so

$ vi /etc/php5/mod-available/xcache.ini
[xcache.admin]
;xcache.admin.enable_auth = On
xcache.admin.enable_auth = Off
 

[링크 : http://xcache.lighttpd.net]
[링크 : http://www.tecmint.com/install-xcache-to-accelerate-and-optimize-php-performance/] xcache 설치 / 최적화


[링크 : http://blog.pages.kr/217]
[링크 : http://php.net/manual/en/book.apc.php]



[링크 : http://en.m.wikipedia.org/wiki/List_of_PHP_accelerators]

'Programming > php' 카테고리의 다른 글

php EGPCS  (0) 2014.10.07
php-fpm관련  (0) 2014.09.25
lighthttpd / php / FastCGI  (0) 2014.08.28
php5 class / object oriented programming  (4) 2014.07.07
웹소켓 (websocket)  (0) 2014.07.03
Posted by 구차니