Hello all. Just to be clear this is not a request for help - this is just to outline a fix for a problem with the "package_ftp" structure:
Sources/Packages.php Line 1575: $detect_path provides incorrect or incomplete path...
'path' => : $detect_path,
Replacement line to provide correct value obtained from {db_prefix}_settings database table:
'path' => isset($modSettings['package_path']) ? $modSettings['package_path'] : $detect_path,
For reference here is the database table - in my case {db_prefix} = "smf"
mysql> select * from smf_settings where variable rlike "package";
+----------------------+---------------+
| variable | value |
+----------------------+---------------+
| package_make_backups | |
| package_path | /var/www/html |
| package_server | localhost |
| package_port | 21 |
| package_username | www-data |
+----------------------+---------------+
5 rows in set (0.00 sec)
the path to packages is defined by the variable that defines the board directory and then packages is a subdirectory.
if you have anything else, then you have modified the core routines
I'm not 100% sure I follow the issue outlined, but the actual FTP accessible directory structure will vary based on your FTP user - There is no real actual way for SMF to know what it is,
so I think the detect_path is simply attempting to provide you with a hint, and anything you fix for yourself might not work for others.
First of all, I certainly haven't modified core routines. I did however update from an older version. Yes, I think $detect_path is related to the FTP user path but it can be set and that setting seems to have been stored in the database (perhaps by a previous version of SMF - I sure didn't place it there).
As this is not really a support request, I'm moving this to the Tips and Tricks board which hopefully is the best place for it.