Version 1.46.2

Released: 2014-09-26

backup_roundcube.php has write error for php 5.3 new

The shebang line for the rouncube backup used:

#!/usr/local/bin/php -n

so that no settings were loaded.

The problem was that php 5.3 defaults to having safe_mode enabled, which caused the following error:

Unable to open /forum_backup/license/backup/ for writing. Unable to backup RoundCube Data.

where changing

$fp = @fopen

to be:

$fp = fopen

show all of the safe_mode warning errors:

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 497 is not allowed to access /path/roundcube.xml owned by uid 532 in /usr/local/directadmin/scripts/backup_roundcube.php on line 138

The fix was to change the shebang line to:

#!/usr/local/bin/php -c/usr/local/directadmin/scripts/php_clean.ini

where there is no space after the -c because shebang only supports 1 option, so:

#!/usr/local/bin/php -c /usr/local/directadmin/scripts/php_clean.ini

will not work.

A new ini file has been created:


with the code:

safe_mode = Off
open_basedir =
disable_functions =

so that any restrictive settings will be disabled.

incorrect exec return values fixed

Changed how the status of waitpid was checked, to return a proper exit code.

Last Updated: