'리눅스/php'에 해당되는 글 5건

  1. 2016.03.10 php 에러
  2. 2016.02.17 php-common 설치 오류
  3. 2015.07.20 php imap 설치
  4. 2015.06.30 phpinfo.php 다운로드 될때
  5. 2015.06.28 phpinfo.php

php 에러

리눅스/php 2016. 3. 10. 09:17

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given

-> date.timezone 설정 확인       (이 에러의 정확한 이유는 잘 모르겠다...)


# php -r "echo date('Y-m-d H:i:s').PHP_EOL;"

2016-03-10 09:13:30


정상적으로 한줄 출력되면 이상없음


---------------------------------------------------------------------------------


Warning: session_start(): open failed: Permission denied (13)

-> 세션 권한 문제


# vi /php.ini


session.save_path = "/var/lib/php/session"


위처럼 경로 확인 하고 경로로 가서 session 디렉토리의 권한을 확인


'리눅스 > php' 카테고리의 다른 글

php-common 설치 오류  (0) 2016.02.17
php imap 설치  (0) 2015.07.20
phpinfo.php 다운로드 될때  (0) 2015.06.30
phpinfo.php  (0) 2015.06.28
Posted by Narusika
,

yum 설치시 에러. 아마 기존설치된 common과 충돌때문인듯

Error: php53-common conflicts with php-common


삭제

yum remove php-common php-zend-optimizer-debuginfo


다시 설치

yum install php53-devel php53-gd php53-mysql

'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php imap 설치  (0) 2015.07.20
phpinfo.php 다운로드 될때  (0) 2015.06.30
phpinfo.php  (0) 2015.06.28
Posted by Narusika
,

php imap 설치

리눅스/php 2015. 7. 20. 07:56

1. configure:error: Cannot find imap library ( libc-client.a). please check your c-client installaion.  


2. configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.


두가지 에러는 imap 관련 에러


 wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz

 tar zxvf imap-2007f.tar.gz

 cd imap-2007f/src/c-client

 cp *.h /usr/local/include/



cd  /usr/local/src/imap-2007f


make lnp SSLTYPE=unix

or

make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd EXTRACFLAGS=-fPIC IP=4


mkdir /usr/local/imap-2007f/

mkdir /usr/local/imap-2007f/include/

mkdir /usr/local/imap-2007f/lib/

cp c-client/*.h /usr/local/imap-2007f/include/

cp c-client/*.c /usr/local/imap-2007f/lib/

cp c-client/c-client.a /usr/local/imap-2007f/lib/libc-client.a


해당 작업 후 php컴파일 옵션중

--with-imap-ssl=/usr/local/imap-2007f \

--with-imap=/usr/local/imap-2007f \



make가 안되는 경우



osdep.c:106: warning: 'struct pam_response' declared inside parameter list

osdep.c:106: warning: its scope is only this definition or declaration, which is probably not what you want

osdep.c:106: warning: 'struct pam_message' declared inside parameter list

osdep.c: In function 'checkpw_conv':

osdep.c:110: error: invalid application of 'sizeof' to incomplete type 'struct pam_response'

osdep.c:111: error: dereferencing pointer to incomplete type

osdep.c:112: error: 'PAM_PROMPT_ECHO_ON' undeclared (first use in this function)

osdep.c:112: error: (Each undeclared identifier is reported only once

osdep.c:112: error: for each function it appears in.)

osdep.c:113: error: invalid use of undefined type 'struct pam_response'

osdep.c:113: error: dereferencing pointer to incomplete type

osdep.c:113: error: 'PAM_SUCCESS' undeclared (first use in this function)

osdep.c:114: error: invalid use of undefined type 'struct pam_response'

osdep.c:114: error: dereferencing pointer to incomplete type

osdep.c:116: error: 'PAM_PROMPT_ECHO_OFF' undeclared (first use in this function)

osdep.c:117: error: invalid use of undefined type 'struct pam_response'

osdep.c:117: error: dereferencing pointer to incomplete type

osdep.c:118: error: invalid use of undefined type 'struct pam_response'

osdep.c:118: error: dereferencing pointer to incomplete type

osdep.c:120: error: 'PAM_TEXT_INFO' undeclared (first use in this function)

osdep.c:121: error: 'PAM_ERROR_MSG' undeclared (first use in this function)

osdep.c:122: error: invalid use of undefined type 'struct pam_response'

osdep.c:122: error: dereferencing pointer to incomplete type

osdep.c:123: error: invalid use of undefined type 'struct pam_response'

osdep.c:123: error: dereferencing pointer to incomplete type

osdep.c:127: error: 'PAM_CONV_ERR' undeclared (first use in this function)

osdep.c: At top level:

osdep.c:138: error: expected ')' before '*' token

osdep.c: In function 'checkpw':

osdep.c:155: error: 'pam_handle_t' undeclared (first use in this function)

osdep.c:155: error: 'hdl' undeclared (first use in this function)

osdep.c:156: error: storage size of 'conv' isn't known

osdep.c:164: error: 'PAM_SUCCESS' undeclared (first use in this function)

osdep.c:165: error: 'PAM_RHOST' undeclared (first use in this function)

osdep.c:168: error: 'PAM_ESTABLISH_CRED' undeclared (first use in this function)

osdep.c:184: error: 'checkpw_cleanup' undeclared (first use in this function)

make[3]: *** [osdep.o] Error 1

make[3]: Leaving directory `/home/kit/imap-2007f/c-client'

make[2]: *** [lnp] Error 2

make[2]: Leaving directory `/home/kit/imap-2007f/c-client'

make[1]: *** [OSTYPE] Error 2

make[1]: Leaving directory `/home/kit/imap-2007f'

make: *** [ldb] Error 2


이런식의 메시지가 뜨면서 imap 이 안되는 경우


yum install pam-devel 설치후 다시 make


------------------------------------------------------------------------------------------------------


yum install php-imap   으로 설치하고 모듈을 php.ini 에 

extension=imap.so

해주는 방법이 있다


------------------------------------------------------------------------------------------------------

위처럼해도 안될 경우


yum remove libc-client



ln -s c-client.a /usr/lib64/libc-client.a

ln -s c-client.a /usr/lib/libc-client.a

c-client.a 를 링크걸어주자 


'--with-imap=/usr/local/imap-2007f' \

'--with-imap-ssl=/usr/local/imap-2007f' \

"--with-imap-ssl" \


yum install rpm-build

이건 잘 모르곘,,,

'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php-common 설치 오류  (0) 2016.02.17
phpinfo.php 다운로드 될때  (0) 2015.06.30
phpinfo.php  (0) 2015.06.28
Posted by Narusika
,

php 에러는 /var/log/message에 나타난다.


에러가 없다면 php는 정상적으로 설치된것.


phpinfo.php 파일이 정상적으로 보이지 않고 다운로드가 된다면 


아파치 httpd.conf에 AddType을 확인해 보고, php.ini 에서 short open tag = on 으로 해놓았다면


phpinfo파일에 <? phpinfo(); ?> 까지만 적어주자 <?php phpinfo(); ?> 로 하면 페이지 다운이 된다.

'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php-common 설치 오류  (0) 2016.02.17
php imap 설치  (0) 2015.07.20
phpinfo.php  (0) 2015.06.28
Posted by Narusika
,

phpinfo.php

리눅스/php 2015. 6. 28. 14:32

버전을 낮추거나 높였을때 

phpinfo.php를 웹페이지에서 확인하면 버전 변경이 안되어있는 경우가 있다.



libphp5.so   그때는 이파일을 apache 모듈 폴더에서 확인하자.


'리눅스 > php' 카테고리의 다른 글

php 에러  (0) 2016.03.10
php-common 설치 오류  (0) 2016.02.17
php imap 설치  (0) 2015.07.20
phpinfo.php 다운로드 될때  (0) 2015.06.30
Posted by Narusika
,