CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Fatal error: Call to a member function url() on a non-object in /var/www...
Pages: [1]

Author Topic: Fatal error: Call to a member function url() on a non-object in /var/www...  (Read 2812 times)

wfs_tom

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Fatal error: Call to a member function url() on a non-object in /var/www...
March 31, 2014, 09:04:19 am
I've just set up a local development site in a VirtualBox VM, running Drupal 6 with Apache 2 on Ubuntu.

This is an export version of our live site, so my hope is to be able to exactly replicate it for testing purposes.

However, any time I so much as include the codebase (Civi 4.4.4) in the modules folder, Drupal pukes and fails to bootstrap.

The error it returns is:  Fatal error: Call to a member function url() on a non-object in /var/www/www.wfs.org/sites/all/modules/civicrm/CRM/Utils/System.php on line 220

My guess is that this is caused by an incorrect file path variable somewhere in Civi's configuration files, but the only place I could find such a variable was in civicrm.settings.php and that's working fine right now. I'm making this guess because I faced a bunch of similar problems already since the site root on our live server has a different file path.

Does anyone have any ideas/possible next steps for me to take? Thanks so much!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Fatal error: Call to a member function url() on a non-object in /var/www...
March 31, 2014, 09:17:27 am
Try removing civicrm.settings.php and install CiviCRM fresh as a test. Then if it works, edit civicrm.settings.php to point to your real database.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

wfs_tom

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Fatal error: Call to a member function url() on a non-object in /var/www...
March 31, 2014, 09:34:22 am
Removing civicrm.settings.php seems to have done the trick, so I suppose the problem was in there. I'll go about seeing what I can do to fix it, thanks much!

wfs_tom

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 6
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Fatal error: Call to a member function url() on a non-object in /var/www...
March 31, 2014, 09:50:39 am
Actually, it was a different problem, so if anyone's searching for this in the future:

There's a temp files directory for Civi, mine was at /var/www/www.wfs.org/sites/default/files/civicrm/templates_c/en_US/

Somehow the permissions got screwy for this directory and Civi wasn't able to open it or write files; I rm'd en_US, replaced it, and then had to chmod -R 777 en_US/

That's obviously a suboptimal solution from a security standpoint, but since this is a test site on a local VM I'm not really worried.

Things seem to be working, thanks for the hint!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Fatal error: Call to a member function url() on a non-object in /var/www...

This forum was archived on 2017-11-26.