check for safemode before running external commands
mpaler - January 31, 2008 - 00:48
| Project: | Multisite Maintenance |
| Version: | 5.x-0.1 |
| Component: | User interface |
| Category: | task |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Testing out your module and it looks nice! Small error however:
mysqldump: Not found. Your database(s) will not be backed up before you run the mutlisite update. To rectify this, make sure that the path for mysqldump is included in your system's $PATH variable.
Any quick hints on how/where to set this?
(mysqldump works from the command line)
Thanks,
Mike

#1
Sorry for the slow reply. I'm slammed right now. You tell me that mysqldump works from the command line. Can you tell me what gets printed when you run
mysqldump -V
the only way I have to check if you have mysqldump is to check the output of that command for the string "Ver".
Is your site on windows, mac or *nix?
#2
Hi there..
Thanks for getting back.
Here's what I get with that command:
:~$ mysqldump -Vmysqldump Ver 10.10 Distrib 5.0.22, for pc-linux-gnu (i386)
Also, for what it's worth -- here's another warning I'm getting at http://mysite.com/?q=admin/multisite/multisite_maintenance
warning: shell_exec() [function.shell-exec]: Cannot execute using backquotes in Safe Mode in /var/www/vhosts/drupal/sites/mysite/modules/multisite_maintenance/multisite_maintenance.module on line 783.#3
Talk to your host to try and get your php.ini changed to turn safe mode off. If safe mode is on you won't be able to run external commands like mysqldump.
I'm changing this to a task to check for safemode first.
#4
This module is looking for a new maintainer.