the 'help' arg causes a fatal error for all php executables (dump.php, erase.php, find.php, merge.php, raise_increments.php, restore.php). error below:

Warning: require(): Filename cannot be empty in /home/arthur/Dev/adaptingtoscarcity/a2s.com/tools/dbscripts/dbscripts.module on line 2080

Fatal error: require(): Failed opening required '' (include_path='.:/usr/share/php:/usr/share/pear') in /home/arthur/Dev/adaptingtoscarcity/a2s.com/tools/dbscripts/dbscripts.module on line 2080
CommentFileSizeAuthor
#2 dbscripts-help-724838-2.patch3.8 KBawjrichards

Comments

awjrichards’s picture

Note that in the above example, line 2080 should actually be 2077 from the dbscripts.module from latest HEAD

awjrichards’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new3.8 KB

Attached is a patch resolving this issue. dbscripts_help() had no way of determining the config file. The patch adds the $options param to dbscripts_help and in each of the php executable files, passes in $_SERVER['argv'] as the $options param when the user requests 'help'.

hefox’s picture

Status: Patch (to be ported) » Needs review

Oops! Redid some code and that probably slipped through the cracks, as I didn't use help.

stephan_allner’s picture

works for me, thanks awjrichards

(should i mark this as tested by the community ?)

willvincent’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. Please commit it! :)

allanamiller’s picture

I would say that this change should be committed. I just started using dbscripts, and of course, the first thing that I wanted to do was to read the help. It wasn't exactly warm-and-fuzzy time when THAT didn't work.