안녕하세요 서버를 이전하면 nginx+php 로 변경을 하였습니다.

크론탭에 php프로그램 하나를 예약을 걸려고 하는데 경로를 못 찾겠습니다.ㅠㅠ

 

*/60 * * * * /usr/local/php/bin/php /home/user1/respring.php

기존은 위와 같이 크론탭을 걸어서 사용을 하였고

이전을 하면서

 

Ubuntu 16.04 LTS 웹서버 세팅방법 (Nginx + PHP7-FPM + MariaDB)

https://blog.lael.be/post/2600

 

을 참고하여 가상서버를 세팅하였습니다.

세팅한 서버의 phpinfo(); 를 보면 

 

1.png

 

 

위와 같습니다.

여기서 php의 실행경로를 알 수 있을까요?

 

/etc/php/5.5/fpm /home/user1/respring.php

쉘에서 실행해보니 파일이나 디렉토리가 없다고 합니다ㅠㅠ;;;

  • profile

    우분투에서 패키지 설치했다면 /usr/bin/php입니다.

    이 경로가 아니라면 which php 명령으로 찾아보세요.

  • ?
    안녕하세요. 답변 감사합니다!
    실행해보니 /usr/bin/php 경로가 맞는것 같습니다.

    실행을 하니 이온큐브가 설치가 안됐다는 에러가 나오는 것 같은데
    Site error: the file <b>/home/user1/www/src/data/start.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.5.so to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.

    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.2, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

    phpinfo 상으로 이온큐브는 설치가 되었고 실제 이온큐브가 설치되어야만
    돌아가는 프로그램을 돌리는 중입니다.

    이온큐브를 설치할때 설치가 잘못된 것일까요?

    이온큐브 설치마법사를 다시 돌려보니

    Loader Installed
    The ionCube Loader version 5.1.2 for PHP 5.5 is already installed but it is an old version. It is recommended that the Loader be upgraded to the latest version if possible.

    Loader Upgrade Instructions
    To upgrade from version 5.1.2 to version 6.0.5 of the ionCube Loader, please replace your existing loader file, ioncube_loader_lin_5.5.so, with the file of the same name from one of the following packages:

    zip
    tar.gz
    Once you have replaced the loader file please restart your web server.

    위와 같이 나옵니다.
  • ?
    이온큐브 설정은
    /etc/php/5.5/fpm/php.ini 의 최하단에

    [Zend]
    zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.5.so

    이렇게 적용하였고요
  • profile
    fpm이 사용하는 설정과 cli(쉘환경)가 사용하는 설정이 다른 것 같습니다. php -i 로 cli가 사용하는 설정을 볼 수 있습니다.
  • ?
    각각 나뉘어져 있는지 몰랐네요. cli에도 이온큐브 로더 명령줄을 넣어주니
    잘 작동합니다. 오늘도 하나 배웠네요 감사합니다^^