First what happened, as explained by the MODX output, then some background and finally my investigations so far:
/*
* MODX Console Output
*
* @date 2013-09-22 01:23:30
*/
Attempting to install package with signature: gallery-1.5.2-pl
Package found...now preparing to install.
MODX could not download the file. You must enable allow_url_fopen, cURL or fsockopen to use remote transport packaging.
Could not transfer package gallery-1.5.2-pl.transport.zip to /home/content/53/6837553/html/www/live.teachbridge.com/core/packages/.
Could not install package with signature: gallery-1.5.2-pl
/* EOF */
___________________________________________________
THE PROBLEM
The problem (see above output) is NOT allow_url_fopen (not allowed), cURL (definitely works) or fsockopen (I have no idea, but probably works). The problem is "... to /home/content/53/6837553/html/www/live.teachbridge.com/core/packages/."
BACKGROUND
Hosting Provider: GoDaddy.com (not my choice!) Type: Shared Hosting, Linux with Apache
"Primary Domain": ebooksbridge.com
Hosting Account "Root" Directory: /home/content/53/6837553/
Web-root for ebooksbridge.com: ~/html/
For technical reasons, to avoid accidents and for clarity, the "web-root" directories are all located in: ~/html/www/
(except, of courese, for the primary domain, which however, has all its files in a directory in ~/html/www/).
MODX is used for the web-site of the domain: teachbridge.com (and a couple of others that are "parked" on its web-root).
Despite my dislike of the naming convention, a number of the web-root directories have names like "live.teachbridge.com" (I don't like dots in directory names and the directory names look too much like (sub-)domain names).
The "Live" version of the teachbridge.com domain has the above example as its web-root directory: ~/html/www/live.teachbridge.com/
Sub-domains (which I'm beginning to think are the root cause of the problem) are used for testing (again, my preference is to spend the $10 or less and use fully-fledged domains).
The "Test Environment", used by content developers and web-site developers, uses the sub-domain: test.teachbridge.com
and has a web-root directory: ~/html/www/test.teachbridge.com/
The "Testbed Environment", used by me to test MODX upgrades and packages, uses the sub-domain: testbed.teachbridge.com
and has a web-root directory: ~/html/www/teachbridge_testbed/
THE PROBLEM EXPLAINED
Package installations and updates work fine in the "live environment" which is MODX 2.0.8; package updates appeared to work fine in the "testbed environment" and the "test environment" prior to upgrading to MODX 2.2.9. After the upgrade (done first on the "testbed environment" to work out the quirks), both fail with the same error (except I only tested upgrading an existing package in the "test environment").
INVESTIGATION
All done using the "testbed environment" (prior to attempting to install/update packages, the browser cache was cleared, MODX cache was cleared and .../core/cache/ was emptied):
1. I immediately suspected an error in a config file; however, they all appear fine.
2. Next, a MODX system setting. Browsing them all (both via the MODX manager and by looking at the database using phpAdmin) found no references to "live.teachbridge.com".
3. Then I did a recursive grep starting in the ~/html/www/teachbridge_testbed/ directory (the web-root) for "live". It came up with some extraneous hits, but the following contained references to the web-root directory:
./core/packages/getresources-1.5.1-pl/preserved.php
./core/packages/archivist-1.2.4-pl/preserved.php
./core/packages/getresources-1.6.0-pl/preserved.php
./core/packages/simplesearch-1.6.1-pl/preserved.php
./core/packages/wayfinder-2.3.3-pl/preserved.php
core/cache/logs/error.log
Since there was no Gallery refrence above, the "preserved.php" files appear to be a red herring (but I corrected them to reflect the "testbed environment" anyway).
4. I double-checked, via GoDaddy's hosting control panel, that the two sub-domains were pointed at the appropriate web-root directories (they are).
5. I revisited the MODX database: The config file is pointing at the correct MODX database (NOT the one for the live site!). I browsed what looked like tables the Package Manager might use — saw no references to "live.teach...".
HELP!
I will go back over everything and do some triple-checking. I'll download the SQL file backup of the database and search it, in its entirety for references to "live.teach...", but don't hold your breath, I have a feeling it will be clean.
So, where is that reference coming from? Is the Package Manager stripping off the sub-domain part of the URL and then doing something that gets it pointed at the Live site's web-root?
__________________
John ("JRG")
[ed. note: jrg last edited this post 12 years ago.]