warning: popen() has been disabled for security reasons (disable_functions) -> now what?
| Project: | backup |
| Version: | 5.x-4.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hi there,
the backup module and it's implementation seems to be quite nice, however I could not make it work. The issue is that my provider - although php safe mode is not turned on - has defined
disable_functions system,passthru,shellexec,popen,escapshellcmd,proc_open
which obviously borks everything resulting in:
warning: popen() has been disabled for security reasons in /var/www/web270/html/sites/all/modules/backup/functions.inc.php on line 64.
backup_database(): Unable to run command 'mysqldump -u web270 -h localhost -pyRXfBrxl usr_web270_3 |gzip >/tmp/drupal-backup-db-74aQwF '
The tools are there: /usr/bin/mysqldump, /bin/tar, /bin/gzip ..
I tried to replace the popen($cmd, "r") calls by exec($cmd) but because passthru is disabled, that gives
backup_database(): Unable to run command 'mysqldump -u web270 -h localhost -pyRXfBrxl usr_web270_3 |gzip >/tmp/drupal-backup-db-JLpZct '
...
I couldn't find a solution to this problem. Any ideas, anyone? Would be cool if this could be made to work.

#1
Setup a cron job (by cron I mean server cron, not Drupal "cron" function) to backup the database.