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 »
  • Standalone Installations (Moderator: cap10morgan) »
  • Failed opening required 'DB.php'
Pages: [1]

Author Topic: Failed opening required 'DB.php'  (Read 13188 times)

asiams

  • Guest
Failed opening required 'DB.php'
March 01, 2010, 04:38:33 pm
Hello

I am trying to install standalone installation.

I have followed everything from the installation guide.

At the installation link, all of the db info and setup is all green (OK), but when I click installation, it stops there.

I went to check error_log and found the following:

[Tue Mar  2 09:30:14 2010] [error] PHP Warning:  require_once(DB.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/qfyeqo/public_html/civicrm/install/civicrm.php on line 136
[Tue Mar  2 09:30:14 2010] [error] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/qfyeqo/php') in /home/qfyeqo/public_html/civicrm/install/civicrm.php on line 136

What does this suggests?

It seems that the installation process seeks a file called db.php.

I further sought where is this file, and found it is located at /civicrm/packages/db.php.

However, the installation process seeks this file from /usr/lib/php or /usr/local/lib/php or /home/qfyeqo/php

The last one is directory from the root just before the public_html.

Can someone direct me where to look for?

Aapche 1.3.4
PHP 5.2.12
Mysql 5.0.89 Community
PCRE under PHP setup version 7

Thanks.

asiams

  • Guest
Re: Failed opening required 'DB.php'
March 01, 2010, 05:06:01 pm
I opened civicrm.php file around line 136 and found the following:

----------------------------------------------------

function civicrm_source( $dsn, $fileName, $lineMode = false ) {
    global $crmPath;

    require_once 'DB.php';

----------------------------------------------------

The $crmPath: should be ../packages/

But I don't know why it is searching for /home/xxx/php directory.

Or system directories like /usr/local etc.

Can this be a bug?

Any comments?


asiams

  • Guest
Re: Failed opening required 'DB.php'
March 01, 2010, 05:35:24 pm
OK.

Here is what I did to install to success:

I copied /packages to /home/xxx/.

And rename packages to php since  the install process seeks php from /home/xxx/php.

Now the whole process to install has successful:

-----------------------------------------

Installing CiviCRM...

I am now running through the installation steps (this should take a few minutes)

If you receive a fatal error, refresh this page to continue the installation

Building database schema and setup files...

CiviCRM has been successfully installed

    * Click here to go to your CiviCRM Standalone home page.

-----------------------------------------

The problem continues:

I went to above link at /installed-url/civicrm/standalone/index.php, now it is a blank page.

Any idea?

Thanks.


asiams

  • Guest
Re: Failed opening required 'DB.php'
March 01, 2010, 06:47:49 pm
Since /civicrm/standalone/error_log show the following:

-------------------------------------------------

[02-Mar-2010 10:35:45] PHP Warning:  require_once(CRM/Core/Config.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/qfyeqo/public_html/civicrm/standalone/bootstrap_common.php on line 42
[02-Mar-2010 10:35:45] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'CRM/Core/Config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/qfyeqo/php') in /home/qfyeqo/public_html/civicrm/standalone/bootstrap_common.php on line 42
[02-Mar-2010 10:35:46] PHP Warning:  require_once(CRM/Core/Config.php) [<a href='function.require-once'>function.require-

-------------------------------------------------

I copied CRM directory and all of its files to /home/xxx/php

and copied standalone directory and all of its files to /home/xxx/php

And now I can log in to /civicrm/standalone/index.php

Everything went ok now.

This is self solution, but this is just a twisted method.

I hope installation process will search for /civicrm/ directory instead of /home/xxx/php directory when php open file is initiated.

Thanks for reading.


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Failed opening required 'DB.php'
March 01, 2010, 07:09:45 pm

1. Copying CiviCRM files/directories is a bad idea and will lead to problems down the road

2. You might want to consider using CiviCRM + Drupal instead of the standalone version.

3. Seems like you did not run the installer

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

asiams

  • Guest
Re: Failed opening required 'DB.php'
March 01, 2010, 08:17:43 pm
Hello
Quote
1. Copying CiviCRM files/directories is a bad idea and will lead to problems down the road

Why this is bad idea? Can you explain a bit more in detail?
Quote
2. You might want to consider using CiviCRM + Drupal instead of the standalone version.

I use Joomla, but the installation was ok, but began to have blank page. It was very heavy to run so I decided to use standalone. And it seems be faster to process.

Is there any particular reason why Drupal combination is better than standalone version?

Quote
3. Seems like you did not run the installer

Yes, I did ran installer. The installer is keep making errors like I mentioned earlier.

Questions:

1. Multilingual site need to have root access to mysql? Superuser access?

2. Any performance enhancement method you recommend?

Thanks.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Failed opening required 'DB.php'
March 02, 2010, 07:59:16 am
1. you do not move files around in  a distributed package. The package assumes a certain layout and might not function properly

2. standalone has been supported by one org / person that is no longer supporting it. We are considering dropping standalone support from 3.2. Check: http://civicrm.org/blogs/lobo/dropping-support-civicrm-standalone-v32

3. you might want to hire someone from http://civicrm.org/professional

lobo
« Last Edit: March 02, 2010, 08:36:48 am by Donald Lobo »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Standalone Installations (Moderator: cap10morgan) »
  • Failed opening required 'DB.php'

This forum was archived on 2017-11-26.