1
我想在我的VPS上使用drupal维护任务。然而,我已经从我安装的firewall的自测结果的建议禁止exec()从PHP。 Drush显然想要这个特权,我见过三个选项来完成这项工作。我应该启用exec(),使用php安全模式还是更改php.ini?
- 使EXEC()
- 使用PHP安全模式
- 变化帐户的php.ini中 “disable_functions选项=系统,EXEC,了shell_exec,中继”
我的账号是唯一的管理员在Linux VPS上,我不打算改变这一点。我是VPS及其安全问题的新手。请告知哪个选项提供更安全的方法。
端子输出:
>exec() has been disabled for security reasons bootstrap.inc:639 [warning]
The following restricted PHP modes have non-empty values: [error]
disable_functions and magic_quotes_gpc. This configuration is
incompatible with drush. Please check your configuration settings in
/usr/local/lib/php.ini or in your drush.ini file; see
examples/example.drush.ini for details.
exec() has been disabled for security reasons exec.inc:150 [warning]
exec() has been disabled for security reasons exec.inc:150 [warning]
exec() has been disabled for security reasons exec.inc:150 [warning]
unlink(/home/site1/drush/lib/package.xml): No such file or [warning]
directory drush.inc:798
The drush command 'status' could not be found. Run `drush [error]
cache-clear drush` to clear the commandfile cache if you have
installed new extensions.
Drush needs a copy of the PEAR Console_Table library in order to [error]
function, and the attempt to download this file automatically failed.
To continue you will need to download the 1.1.3 package from
http://pear.php.net/package/Console_Table, extract it into
/home/site1/drush/lib directory, such that Table.php exists at
/home/site1/drush/lib/Console_Table-1.1.3/Table.php.
你需要exec()来启动drush,或者需要exec()吗? – 2013-05-06 20:13:59
看起来我需要它启动,我已经编辑了包括cli输出的问题。 – dimmech 2013-05-06 20:49:55
如果您只需要启动drush,那么无论您是使用cron定期执行维护还是手动运行它,都可以使用不同的语言编写小脚本来启动应用程序,如Python或Java会没事的。 – 2013-05-07 10:42:30