I'm trying to make this Joomla Update system work for paid extensions, but I'm stuck now.

How I'm going about it is as follows:

  • I'm using Mohameds downloadid.php to populate "extra_query" field in the "_update_sites" table. -- this works fine and field is like this "dlid=345235423542354dgfdfgh5674n6"
  • I have download.php file at my end that should do the following: GET the variable "dlid" from the url, check it against my database/subscription system and return the file or not

I have yet to build the checking queries, but for now, I'm stuck at getting the variable "dlid". This is how I've understood it should work:

  • after you check for updates joomla looks into your xml file and checks for new versions

  • then after it sees a new update is available and you click on update

  • it follows the link in the xml updateserver file adding "?dlid=35423542354" at the end of it (right?)

This is where it fails for me, I can see that download.php is being accessed but no "dlid" value is passed I have set it up to write values into a file like this:

$dlid= $_GET['dlid'];
$dlid.= "\r\n";

file_put_contents($file, $dlid, FILE_APPEND | LOCK_EX);
echo 'done' . PHP_EOL;

If I use the link and add "?dlid=234234" at the end of it manually it gets written into a file with no problems.

How can I check if Joomla is sending the "dlid" variables?

New contributor
Kyuzo is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Things have started working, I haven't changed anything in the code. I do suspect that clearing the cache did the trick (doh!) I've developed the update server handler which logs all access attempts and queries the database for a valid subscription if one is found serves you the update file. I can share the file and the process in the tutorial if anyone is interested. Anyone? – Kyuzo Jan 12 at 5:23
  • Please share, it can help other researchers. – Zollie Jan 12 at 7:55
  • I have developed this solution to use with Akeeba Subs and Akeeba Release System, but I think you are using it with a custom solution, right? please give some information about your development environment. – Mohamed Abdelaziz Jan 12 at 9:44
  • @mohamed-abdelaziz Yes, I'm using a custom solution, a combination of 2 free components, phocaDownload and link PayPerDownload - for a free component it has everything you need when setting up in tandem they work quite flawlessly. I have it all ready for production but one thing is stopping me, and that is the file download to users website. All preliminary checks work and I can download the file manually but when sending the file to joomla update process fails with "Warning-Update path does not exist." , headers maybe? – Kyuzo Jan 13 at 3:11
  • @zollie I'm having trouble sending the file in the correct manner to Joomla, I've tried a lot of combinations. using php header redirect - it does not work if I point it to a local file "download/mod_module.zip" or if I use zip header techniques, It does work however if I point php header redirect to some public phocaDownload link which leads me to believe that the only problem left is sending the file back to the user in the required way – Kyuzo Jan 13 at 3:39

Your Answer

Kyuzo is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.