Answers.Body: <p>I had exactly this problem too and it seemed to me that the missing class should have been loaded earlier in the sequence. In Civi 4.6 there is an extra statement on line 646 of /home/[USERNAME]/public_html/info/administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php so I made my 4.4.20 version look like this (with Joomla 3.4.5):</p>
  
  <pre><code>if( version_compare(JVERSION, '3.0', 'lt') ) {
    require $joomlaBase . '/libraries/joomla/environment/uri.php';
    require $joomlaBase . '/libraries/joomla/application/component/helper.php';
  }
  else {
    require $joomlaBase . '/libraries/cms.php';
    require $joomlaBase . '/libraries/joomla/uri/uri.php';
  }
  </code></pre>
  
  <p>It is the require $joomlaBase . '/libraries/cms.php'; statement that I added.</p>
  
  <p>I am not sending mail at the moment but at least the crons have stopped sending me error messages every 10 minutes. I could not upgrade to 4.6 so this will have to do for me for now.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-15T21:55:45.160Z
Answers.Text: Thanks! That did it. I had been editing the exact same file to try to fix it but didn't get anywhere. I've been manually running my crons since I noticed the problem. I'm amazed that more people are not noticing this. Makes me wonder how many people are running civicrm LTS version with Joomla. Is it just that everyone is getting this error and not noticing it?
Answers.UserDisplayName: Jay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-14T19:57:11.883Z
Answers.LastActivityDate: 2015-12-14T19:57:11.883Z
Answers.UserDisplayName: user3402785
Body: <p>I'm running civicrm 4.4.19 with Joomla 3.4.4. Sometime back in September my scheduled crons stopped running. Debugging shows that it is throwing an error of:</p>
  
  <p>Fatal error: Class 'Joomla\Uri\Uri' not found in /home/XYZW/public_html/libraries/joomla/uri/uri.php on line 24</p>
  
  <p>I've gotten the same error both by using the cron execution of the php file and by browsing to:</p>
  
  <p><a href="http://sitename.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&amp;pass=PASSWORD&amp;key=SITEKEY" rel="nofollow">http://sitename.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&amp;pass=PASSWORD&amp;key=SITEKEY</a></p>
  
  <p>I get the same error if I type the wrong username or password, but not the key (then I get invalid key error).</p>
  
  <p>It looks like the cron had stopped working when I updated from Joomla 2.5 to 3.4 back in September.</p>
  
  <p>Ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-03T17:30:27.090Z
Comments.Text: I was already on 3.4 in September and upgraded to the newest Joomla 3.4 version for security reasons and Cron stopped working for me too with the same fatal error. So I would assume this would happen to everyone running the latest Joomla with Civi 4.4.
Comments.UserDisplayName: KevinK
Tags: <joomla><cron-job><cron>
Title: cron.php error with joomla 3.4 uri.php
ThreadText: # cron.php error with joomla 3.4 uri.php
  
  (Asked by: username_0 on 2015-10-20)
  
  I'm running civicrm 4.4.19 with Joomla 3.4.4. Sometime back in September my scheduled crons stopped running. Debugging shows that it is throwing an error of:
  
  Fatal error: Class 'Joomla\Uri\Uri' not found in /home/XYZW/public\_html/libraries/joomla/uri/uri.php on line 24
  
  I've gotten the same error both by using the cron execution of the php file and by browsing to:
  
  <http://sitename.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&pass=PASSWORD&key=SITEKEY>
  
  I get the same error if I type the wrong username or password, but not the key (then I get invalid key error).
  
  It looks like the cron had stopped working when I updated from Joomla 2.5 to 3.4 back in September.
  
  Ideas?
  
  **Tags:** joomla, cron-job, cron
  
  > **Comments:**
  > **username_1**: I was already on 3.4 in September and upgraded to the newest Joomla 3.4 version for security reasons and Cron stopped working for me too with the same fatal error. So I would assume this would happen to everyone running the latest Joomla with Civi 4.4.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-12-14. Score: 2
  
  I had exactly this problem too and it seemed to me that the missing class should have been loaded earlier in the sequence. In Civi 4.6 there is an extra statement on line 646 of /home/[USERNAME]/public\_html/info/administrator/components/com\_civicrm/civicrm/CRM/Utils/System/Joomla.php so I made my 4.4.20 version look like this (with Joomla 3.4.5):
  
  ```
  if( version_compare(JVERSION, '3.0', 'lt') ) {
    require $joomlaBase . '/libraries/joomla/environment/uri.php';
    require $joomlaBase . '/libraries/joomla/application/component/helper.php';
  }
  else {
    require $joomlaBase . '/libraries/cms.php';
    require $joomlaBase . '/libraries/joomla/uri/uri.php';
  }
  
  ```
  
  It is the require $joomlaBase . '/libraries/cms.php'; statement that I added.
  
  I am not sending mail at the moment but at least the crons have stopped sending me error messages every 10 minutes. I could not upgrade to 4.6 so this will have to do for me for now.
  
  > **Comments:**
  > **username_0**: Thanks! That did it. I had been editing the exact same file to try to fix it but didn't get anywhere. I've been manually running my crons since I noticed the problem. I'm amazed that more people are not noticing this. Makes me wonder how many people are running civicrm LTS version with Joomla. Is it just that everyone is getting this error and not noticing it?  
  
  ---
  
  