안녕하세요?

 

https://xetown.com/tiptalk/1059211

 

여기 글을 보고 관리자페이지 - 콘텐츠 - 파일에서 대기파일을 확인해봤더니 3500개 넘게 있더라구요

 

그래서 clean_garbage_files.php 실행해봤더니 

 

./clean_garbage_files.php: line 1: ?php: No such file or directory
./clean_garbage_files.php: line 3: /**: No such file or directory
./clean_garbage_files.php: line 4: clean_empty_dirs.php: command not found
./clean_garbage_files.php: line 5: clean_empty_dirs.php: command not found
./clean_garbage_files.php: line 6: syntax error near unexpected token `)'
./clean_garbage_files.php: line 6: ` * Files can remain in an invalid status for two reasons: 1) a user abandons'

 

라고 나오면서 syntax 에러가 나오는데.. 혹시 라이믹스가 최신버전이 아니라서 그럴까요?

 

제가 터미널에서 입력했던 것들 입니다.

 

[user@dmm ~]$ cd public_html/common/scripts/
[user@dmm scripts]$ ls
clean_empty_dirs.php  clean_garbage_files.php  clean_old_notifications.php  clean_old_thumbnails.php  common.php
[user@dmm scripts]$ ./clean_garbage_files.php
jailshell: ./clean_garbage_files.php: Permission denied
[user@dmm scripts]$ ls -al
total 28
\drwxrwxr-x.  2 user user 4096 Sep 11 13:53 .
drwxrwxr-x. 13 user user 4096 May 28  2017 ..
-rw-rw-r--.  1 user user 1698 Mar 10  2017 clean_empty_dirs.php
-rw-rw-r--.  1 user user 2250 Mar 10  2017 clean_garbage_files.php
-rw-rw-r--.  1 user user  934 Mar 10  2017 clean_old_notifications.php
-rw-rw-r--.  1 user user 1182 Mar 10  2017 clean_old_thumbnails.php
-rw-rw-r--.  1 user user 1289 Mar 10  2017 common.php
[user@dmm scripts]$ chmod 777 clean_garbage_files.php
[user@dmm scripts]$ ./clean_garbage_files.php
./clean_garbage_files.php: line 1: ?php: No such file or directory
./clean_garbage_files.php: line 3: /**: No such file or directory
./clean_garbage_files.php: line 4: clean_empty_dirs.php: command not found
./clean_garbage_files.php: line 5: clean_empty_dirs.php: command not found
./clean_garbage_files.php: line 6: syntax error near unexpected token `)'
./clean_garbage_files.php: line 6: ` * Files can remain in an invalid status for two reasons: 1) a user abandons'
[user@dmm scripts]$

 

 

  • Lv37

    실행파일이 아니므로 직접 실행할 수 없습니다. 퍼미션 바꿔도 소용없습니다.

    서버에 php-cli가 설치되어 있다면 php 명령을 사용해서

     

    php clean_garbage_files.php

     

    이렇게 실행하셔야 합니다.

     

    참고: https://github.com/rhymix/rhymix-docs/blob/master/ko/misc/crontab.md

  • Lv37 ?
    잘 되네용 감사합니다^^^