2016-10-06 2 views
0

phpinfo();을 실행중인 사이트의 index.php (또는 공백 페이지)에 추가하면 서버가 빈 응답을 보냅니다. 관련 정보 :phpinfo 빈 응답 (MacPorts) 보내기

  • phpinfo();을 제거하면 페이지가 예상대로 작동합니다. 사이트는 Apache 리디렉션 지시문도 준수합니다.
  • 저는 PHP와 Apache 모두 MacPorts를 사용합니다.
  • 저는 최근에 최신 macOS와 최신 버전의 MacPorts로 업그레이드했습니다.
  • 은 이미 명령 행 (놀라운 일이 아니다)에 sudo port upgrade outdated
  • phpinfo 작품을 달렸다.
  • php.ini 파일에는 disable_functions 목록에 phpinfo이 포함되어 있지 않습니다.

답변

0

그것은 PHP 마법 부여 라이브러리의 문제점입니다. There is already a bug reported related to this. 사용자는 실제로 내가 아래에 복사 한 특히 유용한 스크립트를 생성

:

#!/usr/bin/env bash 

# list installed, don't try to deactivate php56-apache2handler|php56-curl because of dependencies 
for thePort in $(port echo installed | awk '{if($1~'/^php56-/') print $1 ;}' | grep -v -E 'php56-apache2handler|php56-curl') ; do 
    # try do deactivate a module 
    echo -n "Test without $thePort : " 
    port deactivate $thePort 
    if [ ! "$?" -eq "0" ] ; then 
     echo "Error for deactivate" 
     exit 1 
    fi 
    # began tests 
    /opt/local/bin/php -i &> /dev/null 
    if [ ! "$?" -eq "0" ] ; then 
     echo "ERROR php -i" 
    else 
     echo "OK" 
     echo -n "Web test : " 
     port unload apache2 
     sleep 2 
     port load apache2 
     sleep 1 
     # The address of the web server; <?php phpinfo(); in the file 
     curl http://127.0.0.1/info.php &> ~/tmpCurlOut 
     # If the curl command exits with an error, then we've 
     if [ ! "$?" -eq "0" ] ; then 
      echo "web test past" 
     else 
      echo "Faulty module is $thePort" 
      exit 1  
     fi  
    fi 
    # on reactive 
    port activate $thePort 
    if [ ! "$?" -eq "0" ] ; then 
     echo "Error for activate" 
     exit 1 
    fi 
done