I’ve just moved my website to a different host, and in the most part everything went smoothly. However I am having issues with FiledownloadR. It doesn’t seem to be able to populate the placeholders.
If I try to use the &toArray option I don’t get any output at all either.
I have tried removing and reinstalling the extra (even removing the database tables) but no matter what I do it doesn’t seem to work. It does throw up warnings in the installation:
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/installed.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/InstalledVersions.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/autoload_namespaces.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/autoload_psr4.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/autoload_classmap.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/autoload_static.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/platform_check.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/autoload.php): failed to open stream: No such file or directory
PHP warning: file_get_contents(***/core/components/filedownloadr/vendor/composer/autoload_real.php): failed to open stream: No such file or directory
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update `.
type or paste code here
The permissions are good on the file (I’ve checked both in the file browser and by directly inputting the url into the address bar).
Any ideas about how I would go about checking to see if there is a missing extension. I wouldn’t even know how to start to check, and what is needed and what isn’t.
What version of MODX are you using? Did you rerun the setup after the migration? (Does the rest of your site work normally?)
What version of FileDownloadR are you using? Is this the same version that you used on your old setup or did it change?
What is the exact snippet tag ([[!FileDownloadLink...]]) that you use?
During the installation of the extra, composer runs to install dependencies. If the dependencies are available (paths core/components/filedownloadr/vendor/ip2location/ipinfodb-php and core/components/filedownloadr/vendor/ralouphie/mimey) then I don’t think this is the cause of the problem.
The documentation has a list of required PHP extensions. (Not sure if this list is complete.)
You could use phpinfo() to see what’s installed. In the MODX manager go to → “Reports” → “System Info” and click the “View” link in the row “phpinfo():”.
Hmmm. It looks like it might be something deeper than that, I’ve just checked another site that I set up on the same host, and FileDownloadR was working perfectly there, but it’s stopped working on that site now also, so it must be something with the hosting service rather than my specific sites set up.
Although, I’ve no idea what could have changed to cause it to stop working. At this point I think I will have to find an alternative.
I had a similar thing happen with a different extra and was getting the same “lock file is not up to date” error. The problem was that PHP was updated on the server, and they uninstalled the “fileinfo” extension. Once that was turned back on, I reinstalled the extra and that fixed the problem. Contact your host and make sure fileinfo is enabled, or turn it on yourself through cPanel if that is available.