'Programming'에 해당되는 글 1786건

  1. 2014.10.14 php - extensions are not supported on this platform / arm
  2. 2014.10.10 php php-cgi 차이점?
  3. 2014.10.10 <? <?php 설정
  4. 2014.10.10 lighttpd + php-fpm
  5. 2014.10.08 php 5.3.22 버전 크로스컴파일시 주의사항
  6. 2014.10.07 php - register_globals
  7. 2014.10.07 php EGPCS
  8. 2014.09.25 php-fpm관련
  9. 2014.09.24 perl tutorial
  10. 2014.09.24 perl array sort 하기
Programming/php2014. 10. 14. 10:57
크로스컴파일 해서 넣는데
php / php-cgi를 실행하면 계속 확장기능을 쓸수 없다고 나와서
의아한 나머지 검색을 해보니

dlopen 이라는 녀석에서 no가 뜬다 -_-!!
Running system checks
checking for sendmail... no
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... unknown
checking whether writing to stdout works... no
checking for socket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for yp_get_default_domain... no
checking for __yp_get_default_domain... no
checking for yp_get_default_domain in -lnsl... yes
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes 

소스를 뒤져보면.. dlopen이라는게 이렇게 있는데 
$ vi Zend/zend.h
#if defined(HAVE_LIBDL) && !defined(ZEND_WIN32)

# ifndef RTLD_LAZY
#  define RTLD_LAZY 1    /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif

# ifndef RTLD_GLOBAL
#  define RTLD_GLOBAL 0
# endif

# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
#  define DL_LOAD(libname)          dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
# elif defined(RTLD_DEEPBIND)
#  define DL_LOAD(libname)          dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
# else
#  define DL_LOAD(libname)          dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# endif
# define DL_UNLOAD                  dlclose
# if defined(DLSYM_NEEDS_UNDERSCORE)
#  define DL_FETCH_SYMBOL(h,s)      dlsym((h), "_" s)
# else
#  define DL_FETCH_SYMBOL           dlsym
# endif
# define DL_ERROR                   dlerror
# define DL_HANDLE                  void *
# define ZEND_EXTENSIONS_SUPPORT    1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname)           LoadLibrary(libname)
# define DL_FETCH_SYMBOL            GetProcAddress
# define DL_UNLOAD                  FreeLibrary
# define DL_HANDLE                  HMODULE
# define ZEND_EXTENSIONS_SUPPORT    1
#else
# define DL_HANDLE                  void *
# define ZEND_EXTENSIONS_SUPPORT    0
#endif 

[링크 : http://www.opensource.apple.com/.../apache_mod_php-18.8/php/Zend/zend_extensions.c

*.so로 제공되는 확장기능을 당연히 dlopen()을 쓸수 없으면 dynamic linking을 쓸수 없기에 비활성화 되는 것 -_-
configure에서 강제로 해당 부분을 주석 처리하고 넘기는 수 밖에 없다. 
Name
dladdr, dlclose, dlerror, dlopen, dlsym, dlvsym - programming interface to dynamic linking loader

Synopsis
#include <dlfcn.h>
void *dlopen(const char *filename, int flag);
char *dlerror(void);
void *dlsym(void *handle, const char *symbol);
int dlclose(void *handle);

Link with -ldl.

[링크 : http://linux.die.net/man/3/dlopen

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

php 5.3.22 / xcache 1.3.2  (0) 2014.10.15
php 5.5.17 opcache / arm  (0) 2014.10.14
php php-cgi 차이점?  (0) 2014.10.10
<? <?php 설정  (0) 2014.10.10
lighttpd + php-fpm  (0) 2014.10.10
Posted by 구차니
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 구차니