newbackup_roundcube.php has write error for php 5.3
The shebang line for the rouncube backup used:
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/license.directadmin.com/email/data/roundcube.xml for writing. Unable to backup RoundCube Data.
$fp = @fopen
$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:
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:
[PHP] safe_mode = Off open_basedir = disable_functions =
so that any restrictive settings will be disabled.
fixedincorrect exec return values
Changed how the status of waitpid was checked, to return a proper exit code.